Skip to content

Files

Latest commit

Dec 5, 2024
b1aa927 · Dec 5, 2024

History

History
74 lines (63 loc) · 2.12 KB

README.md

File metadata and controls

74 lines (63 loc) · 2.12 KB

dht22-webui

A lightweight Flask-based web interface for monitoring DHT22 temperature and humidity sensor data with real-time updates and historical data visualization.

preview

preview

Ruff

Features

  • 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

Requirements

  • Raspberry Pi
  • DHT22 temperature and humidity sensor
  • Python 3.12+
  • MongoDB database

Installation

  1. Clone the repository
git clone https://github.com/z1xus/dht22-webui
cd dht22-webui
  1. Install dependencies
pip install -r requirements.txt
  1. 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
  1. Run the server
python main.py

Usage

  1. Connect your DHT22 sensor to your Raspberry Pi (default: GPIO4)
  2. Start the application
  3. Access the web interface at:

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.