A lightweight Flask-based web interface for monitoring DHT22 temperature and humidity sensor data with real-time updates and historical data visualization.
- Real-time temperature and humidity monitoring
- Historical data visualization with interactive charts
- Multiple timeframe views (1h, 24h, 7d, 30d)
- Temperature unit conversion (°C/°F)
- Time format selection (12h/24h)
- MongoDB integration for data storage
- Raspberry Pi
- DHT22 temperature and humidity sensor
- Python 3.12+
- MongoDB database
- Clone the repository
git clone https://github.com/z1xus/dht22-webui
cd dht22-webui
- Install dependencies
pip install -r requirements.txt
- Configure your .env file
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>?retryWrites=true&w=majority
MONGO_DB_NAME=humidity_db
MONGO_COLLECTION_NAME=sensor_readings
DATA_COLLECTION_INTERVAL=60
- Run the server
python main.py
- Connect your DHT22 sensor to your Raspberry Pi (default: GPIO4)
- Start the application
- Access the web interface at:
- Local: http://localhost:5000
- Network: http://<your_pi_ip>:5000
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.