The idea for this project was to log the dht sensor output data over time. I have succsessfully integrated the dht-22 sensor via Homebridge into Homekit, but there wasn't any abillity to log the sensor data over the course of time.
-
Raspberry Pi Zero WH plus DHT-22 sensor: This combination logs the temperature and humidity data every 5 minutes. In addition the cpu temperature of both Raspberrys is also stored in the database. The record intervall can be adjusted in klima_logger.py. The data is going to be stored in a sqlite file.
-
Raspberry Pi 4B: This Raspi runs the local flask-server and pulls the database from the Raspi Zero. I tried to run the flask-server on the Raspi Zero but that was way too slow (due to the lack of RAM).
-
The connection between the Raspi Zero and Raspi 4B is handled via SSH through the package paramiko.
-
The interactive charts are created with pygal.
- Transfer and start the script klima_logger.py to the Raspi Zero
- Transfer the app data to another Raspi with enough RAM
- Adjust the script config.py with your local settings
- Run
pip install -r requirements.txt
- Run
main.py
- Open
127.0.0.1:8000/dashboard