Author Topic: Moteino Architecture Explanation  (Read 1561 times)

Sergegsx

  • Jr. Member
  • **
  • Posts: 87
  • Country: es
Moteino Architecture Explanation
« on: September 24, 2015, 09:27:25 AM »
Hi everyone,

First of all I would like to congratulate Felix for the amazing job done creating Moteino and specially his dedication to teach others by building this website, youtube videos, etc.

I have a similar system build on my own, but I must admit its far more basic although its nice to see very close similarities in some aspects.

I have developed everything based on http requests, either by ESP8266 directly to my NAS, or by xbee communication to a raspberry pi which performs the http requests (via python).

I was wondering if there is any document, video or any kind of explanation of how all your setup works. Something like a flowchart showing which nodes perform http requests or websocket connection or serial rf sending...etc. how are the python scripts called, etc etc

I am in the process of learning websockets and deciding how to include this more advanced system in my setup.

Any info is greatly appreciated.

Regards.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino Architecture Explanation
« Reply #1 on: September 24, 2015, 10:25:39 AM »
Hi Sergegsx,
Welcome to the forum and thanks for the compliments.
All the information related to this framework are and will be posted on the dedicated "Gateway" page.
I don't think I have such specific documentation, but part of the guide and install I try to explain how everything works and interacts. I plan to enhance this page and add more documentation once I free up from other projects I have going on.
My architecture is pretty simple. The hardware is composed of a gateway based on RaspberryPi, which sits on the local LAN at a dedicated address and has a "gateway Moteino" that is the relay to the remote wireless nodes that can control things or report sensors/metrics. The gateway Moteino is attached via serial (either GPIO or USB) and talks to the main gateway application, gateway.js which acts as a relay between the web and the Moteino framework of nodes via secured websockets for real time updates. The sample definitions for sample hardware I offer is included in metrics.js and settings for email/sms and database are stored in settings.js. I just released a new version of it which can allow you to add non-moteino based nodes and communicate to IP based nodes like ESP8266 via a REST HTTP interface using the nodeJS request module. This is mentioned in this recent blog post. I know this is a very big picture but I hope it helps. The core application logic is included in the following files: gateway.js, metrics.js, index.php, which you can check out at this [urlhttps://github.com/LowPowerLab/RaspberryPi-Gateway]Github repo[/url].
Best,
-Felix