Smart Water Management System
This project is a Flask-based web application that manages and monitors water usage using MQTT and a database. It features manual and automatic motor control, data logging, real-time updates, and graphical water usage reports.
Features
- Manual and Automatic motor control modes
- Real-time water level monitoring via MQTT
- Water usage logging and status history
- Daily, weekly, and monthly water usage reports
- Graphical representation of water usage trends
- Dynamic status updates on the dashboard
- Responsive UI using HTML and JavaScript
Tech Stack
- Python (Flask)
- SQLite (database)
- MQTT (via
paho-mqtt) - HTML/CSS/JavaScript
- Matplotlib (for plotting graphs)
Folder Structure
project/ │ ├── app.py # Main Flask application ├── db/ # SQLite database directory │ └── app.db # Database file (created on first run) ├── web/ # HTML templates │ ├── index.html # Landing page │ └── home.html # Dashboard page ├── assets/ │ ├── images/ │ │ ├── total_usage_graph.png # Generated total usage graph │ │ └── weekly_graph.png # Generated weekly usage graph