Simple flask webapp Thermostat running on Raspberry Pi
Home thermostat with weekly scheduling.
Get sensor values (temperature and humidity) 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).
DHT22 hardware and Relay (Songle SRD-05DC-SL-C) connected to Raspberry Pi or, if not, a "demo mode" starts automatically.
From project root create virtual environment, activate it and install requirements:
~/ThermoHome_pi$ python3 -m venv venv
~/ThermoHome_pi$ source venv/bin/activate
~/ThermoHome_pi$ pip install -r requirements.txt
~/ThermoHome_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.