/plant_buddy

Demonstration project using the InfluxDB platform as the backend for a Flask web service.

Primary LanguagePython

IOX Version (February 2023)

For those looking for the IOX version of this project

Plant Buddy with Dash

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: PlantBuddy_Architecture

Hardware List

List of hardware required to recreate demo:

Control Board

or

Sensor List

Hardware Wiring

Plant_Buddy_bb

Installation

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

Setup

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

Troubleshooting

Screen Shot 2022-01-13 at 10 18 28 AM

This probably indicates that your data is not being loaded in from the IOT side.

Contributing

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.