Using the Modern Radio IOT Stick With a Raspberry Pi
by MDRDIO in Circuits > Electronics
228 Views, 3 Favorites, 0 Comments
Using the Modern Radio IOT Stick With a Raspberry Pi
The Modern Radio IOT Stick is a BLE gateway that scans and return the readings from various other Modern Radio sensors within proximity. it uses a console program that is capable of running across multiple platforms. In this tutorial we will use the IOT stick with a raspberry pi along with a modern radio Environment Monitor and Smart Moisture probe. The environment monitor will relay temperature and humidity data back to the IOT Stick while the Smart Moisture probe will send temperature and a capacitance index value indicating the moisture level. The data will then be posted to Dweet.io where it can b tracked visually.
Supplies
- Raspberry Pi (just about any model will work)
- Modern Radio IOT Stick
- Modern Radio Environment Monitor
- Modern Radio Smart Moisture Probe
Place Sensors
Place your sensors where you would like to collect readings. I placed my Smart Moisture probe near a plant in my shrub bed and the environment monitor in my garage. Be sure the raspberry pi and the IOT Stick are in a central location to these sensors.
Copy Files
Create a "bin" folder on your pi at "/home/pi/bin", and copy all of the files from the GitHub page to the "bin" directory on the pi.
Configure the Pi
Use the following tutorials to install an MQTT client and broker that the IOT Stick console program will use for communication. In order to run the IOT stick console program on the pi we will also need to install mono.
- Paho MQTT Python Client - http://www.steves-internet-guide.com/into-mqtt-python-client/
Get Sensor Readings
To start collecting data from the environment monitor sensor, we will run the collector.py downloaded earlier. On the raspberry pi navigate to the the directory "/home/pi/bin/net472" and enter the command: "python3 /home/pi/bin/collector.py". The console program should start.
Retrieve the Readings From Dweet.io
From a web browser, navigate to Dweet.io and click on the discover link. Do a ctrl+f and enter the Mac address of your environment monitor. The data record for the sensor should be located. clicking on the record will display Temperature humid, RSSI, and battery voltage.