Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home Energy Monitoring System

An IoT-based Smart Home Energy Monitoring System that monitors electricity usage in real time and displays energy statistics through a modern web dashboard.

Project Overview

The system collects electrical measurements from an ESP32 and PZEM-004T energy meter and sends the data to a Flask REST API.

The backend stores readings in SQLite and provides APIs to the React dashboard.

The dashboard displays:

  • Voltage
  • Current
  • Power
  • Energy consumption
  • Electricity cost
  • Appliance status
  • Alerts
  • Power consumption charts
  • Monthly energy statistics

Architecture

Electrical Appliances
        │
        ▼
   PZEM-004T Sensor
        │
        ▼
       ESP32
        │
        │ Wi-Fi
        ▼
   Flask REST API
        │
        ▼
      SQLite
        │
        ▼
   React Dashboard
        │
        ├── Energy Monitoring
        ├── Appliance Management
        ├── Charts
        ├── Cost Calculation
        └── Alerts
        Technology Stack
Hardware
ESP32
PZEM-004T
AC electrical meter
Wi-Fi
Backend
Python
Flask
Flask-CORS
SQLite
REST API
Frontend
React
Vite
Recharts
JavaScript
CSS
Development Tools
VS Code
PowerShell
Arduino IDE

**Project Structure**
Smart-Home-Energy-Monitoring-System/
│
├── .gitignore
├── .env
├── README.md
│
├── backend/
│   ├── app.py
│   ├── requirements.txt
│   │
│   ├── config/
│   │   ├── __init__.py
│   │   └── config.py
│   │
│   ├── database/
│   │   ├── __init__.py
│   │   └── database.py
│   │
│   ├── models/
│   │   ├── __init__.py
│   │   └── schemas.py
│   │
│   ├── routes/
│   │   ├── __init__.py
│   │   ├── dashboard.py
│   │   ├── readings.py
│   │   ├── appliances.py
│   │   └── alerts.py
│   │
│   └── services/
│       ├── __init__.py
│       └── energy_service.py
│
├── frontend/
│   ├── package.json
│   ├── vite.config.js
│   ├── index.html
│   │
│   └── src/
│       ├── App.jsx
│       ├── main.jsx
│       ├── styles.css
│       │
│       ├── components/
│       │   ├── Header.jsx
│       │   ├── StatCard.jsx
│       │   └── EnergyChart.jsx
│       │
│       ├── pages/
│       │   └── Dashboard.jsx
│       │
│       └── services/
│           └── api.js
│
└── esp32/
    └── energy_monitor.ino

    Safety

This project may interface with mains electricity through
an energy meter. Mains wiring can cause serious injury or death.

Use properly rated hardware, isolation, enclosure, fusing,
and qualified electrical installation procedures when working
with AC mains.

Future Improvements

Possible upgrades:

User authentication
Email/SMS alerts
Monthly bill prediction
AI-based energy recommendations
Appliance-level energy disaggregation
IoT cloud integration
MQTT support
Mobile application
Historical reports
Solar power monitoring
Smart scheduling

About

I am particularly interested in developing AI-powered applications, cybersecurity tools, smart-home systems, and modern web dashboards. I also enjoy learning new technologies, debugging complex technical issues, and continuously improving my programming and project-development skills.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages