Simple flask webapp dashboard running on Raspberry Pi and SenseHat shield.
Shows temperature, humidity, barometric pressure and relative Plotly graph with autorefresh.
Get sensor values every "n" seconds (due to Settings section).
Values are sending (websocket) to client according to delta value from previous one (minimum delta value to trigger is specified in Setting section).
A Stats section shows a table with all stored data (due to Settings section).
SenseHat hardware connected to Raspberry Pi or, if not, a "demo mode" starts automatically.
From project root create virtual environment, activate it and install requirements:
~/THPHat_pi$ python3 -m venv venv
~/THPHat_pi$ source venv/bin/activate
~/THPHat_pi$ pip install -r requirements.txt
~/THPHat_pi$ python3 init-db.py
as app
export FLASK_APP=flaskr
flask run
as wsgi server
gunicorn --worker-class eventlet -w 1 -b localhost:8080 wsgi
As seen above, as any wsgi app.
Franco Parodi [email protected]
This project is licensed under the MIT License.