For those looking for the IOX version of this project
This demo is based of the Plant Buddy IoT project created by Rick Spencer.
The goal: This demo shows how InfluxDB can be successfully used as a storage backend for a Flask server. Leverage Flux queries to filter and retrive your IoT data and then use Dash plotly to visualise. The below BPMN outlines the overall architecture and data flow:
List of hardware required to recreate demo:
or
- DS18B20 Temperature Sensor(Waterproof)
- Soil Moisture Sensor v1.2
- Photoresistor module
- DH11 Temperature Humidity Sensor
For development and testing it's easiest to create a python virtual environment where you can install Plantbuddy's dependencies:
virtualenv --python=python3 ./venv
./venv/bin/pip install -r requirements.txt
When setting up the project you will need to add your InfluxDB authentication information. You can do this by making a copy of the default_settings.py
file and changing the values it contains.
cp ./src/default_settings.py ./src/local_settings.py
Later you will tell the server which settings to use with the PLANTBUDDY_SETTINGS
environment variable.
You might need to change the port in serial_read.py depending on the device you are using:
port = '/dev/tty.usbmodem141101'
To run the project:
export PLANTBUDDY_SETTINGS=local_settings.py
./venv/bin/python ./src/app.py
This probably indicates that your data is not being loaded in from the IOT side.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.