A DHT Weather Station project using Python, Flask, Flask-SocketIO, and Bootstrap that displays real-time temperature and humidity sensor readings using your Raspberry Pi
https://www.donskytech.com/raspberry-pi-dht22-weather-station-project/
Make sure to install the DHT22 driver on your Raspberry Pi using the Adafruit_circuitPython_dht library.
Follow the following post https://www.donskytech.com/raspberry-pi-how-to-interface-with-a-dht22-sensor/
- Clone the repository
git clone https://github.com/donskytech/dht22-weather-station-python-flask-socketio.git
cd dht22-weather-station-python-flask-socketio
- Create a Python virtual environment
python -m venv .venv
source .venv/bin/activate
- Install the dependencies
pip install -r requirements.txt
- Run the application
flask run --host=0.0.0.0
- Access the application using the following URL
http://<IP>:5000
This is a follow up project to this project. It will display dynamic number of DHT22 sensors and its readings. https://www.donskytech.com/raspberry-pi-weather-station/
Code:
https://github.com/donskytech/dht22-weather-station-python-flask-socketio-multiple-sensors
https://www.donskytech.com/raspberry-pi-how-to-start-python-script-on-boot/