An interface to attempt to simplify IoT ThingSpeak networks.
The intended network topology for this code is:
Arduino - XBee (AT Router/End Point) \
Arduino - XBee (AT Router/End Point) -- XBee (API Coordinator) - Raspberry Pi - ThingSpeak
Arduino - XBee (AT Router/End Point) /
The Arduino endpoints are set up as data loggers. See GenericDataLogger for info. The code is tested using Arduino Uno, but should be applicable to other boards.
For testing, the Sparkfun Weather Shield was used.
The LAN is a ZigBee mesh, based on the recommendations of Gadgeteer@HCI-Lab. Data points are set up in AT mode for simple transmission, whereas the coordinator is set up in API mode to enable message tracking. The abridged setup process is as follows:
- Set up coordinator with API firmware.
- Reset coordinator settings to default.
- Set the following settings:
Set PAN (ID) to desired network ID (common to all) Set API Enable (AP) to 2 Set name (NI) to desired name (unique)
- Set up other modules as routers or end points.
- Reset these module's setting to default.
- Set the following settings:
Set PAN (ID) to desired network ID (same as coordinator) Set Dest. high (DH) to 0 Set Dest. low (DL) to 0 Set Chan. ver. (JV) to 1 Set name (NI) to desired name (unique)
XBee Pro S2B modules were used for testing, but the code and process should be applicable to other ZigBee enabled XBee modules.
Under Development
Under Development
There are a number of dependencies for each part of the software.
There are no direct dependencies for the library, however the example file uses the following:
- MemoryFree: For debugging purposes.
- HTU21D: Sparkfun weather shield humidity sensor.
- MPL3115A2: Sparufun weather shield pressure sensor.
If you don't already have Python 3:
sudo apt-get install python3 pip3
This may require you to use sudo, the command is likely pip3 but may be pip.
pip3 install numpy, pyserial, xbee
http://blog.hcilab.org/gadgeteer/2012/12/xbee-zigbee-howto/
http://serdmanczyk.github.io/XBeeAPI-PythonArduino-Tutorial/