Skip to content

A simple and lightweight web-interface for monitoring temperature and humidity from your DHT22 sensor.

License

Notifications You must be signed in to change notification settings

Z1xus/dht22-webui

Repository files navigation

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.

About

A simple and lightweight web-interface for monitoring temperature and humidity from your DHT22 sensor.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published