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
When setting up the project you will need to add a secret folder in src and add your token in a token.json file like so:
{"token":"imatokensupersecret"}
You will want to edit the line in secret_store.py:
f = open ('/myfilestructure/plant-buddy/src/secret/token.json', "r")
You might need to change the port in serial_read.py depending on the device you are using:
port = '/dev/tty.usbmodem141101'
in app.py you will want to add your own org and bucket:
cloud_org = "yourorgid"
cloud_bucket = "yourbucket"
To run the project you want to run from the src file:
python3 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.