An open, reproducible device-to-edge-to-cloud architecture for real-time smart home energy monitoring.
EdgeNergy is an edge-computing platform for real-time energy monitoring, appliance disaggregation, and intelligent power analytics. The platform combines IoT telemetry, MQTT messaging, and lightweight AI inference running directly at the network edge to enable low-latency, privacy-preserving energy intelligence.
It includes firmware templates, edge preprocessing logic, TinyML models (NILM, anomaly detection, forecasting), cloud integration templates, web dashboards, and test suites for benchmarking latency, accuracy, privacy, and bandwidth efficiency.
- 📡 Real-Time Telemetry: Sub-second ingestion of voltage, current, and active power.
- 🔌 MQTT Communication: Lightweight, asynchronous device messaging using Eclipse Mosquitto.
- 🧠 TinyML Inference: Low-latency appliance disaggregation running directly at the edge via TensorFlow Lite.
- 📊 Energy Analytics: Live disaggregated power load breakdown and transient event logging.
- 🏠 Local-First & Private: Process all telemetry locally on the network edge (e.g., Raspberry Pi, Orange Pi) without cloud dependency.
- 🐳 Dockerized Stack: Easy one-command deployment of the broker, AI application, and web dashboard.
EdgeNergy/
├── docker-compose.yml # Orchestrates Mosquitto, Edge AI App, and Dashboard
├── mosquitto.conf # MQTT broker configuration (TCP & WebSockets)
├── README.md # Project documentation
├── LICENSE # BSD 3-Clause License
├── images/
│ ├── EdgeNergy.svg # Main project logo
│ └── EdgeNergyLogo.svg # Hexagon lightning emblem
├── docs/ # PWA asset sizes & banners
├── edge/
│ ├── Dockerfile # Builds python edge application
│ ├── app/
│ │ ├── config.py # Environment variables & topic configs
│ │ ├── preprocess.py # Raw payload validation & transient detector
│ │ ├── infer.py # NILM TFLite regression interpreter
│ │ ├── signatures.py # Appliance load signature database
│ │ └── main.py # Coordinates telemetry loop and event publisher
│ ├── dashboard/
│ │ ├── Dockerfile # Nginx static server builder
│ │ ├── index.html # Dashboard UI
│ │ ├── styles.css # Light corporate theme stylesheets
│ │ └── app.js # MQTT WebSockets listener & UI updater
│ ├── models/
│ │ └── nilm.tflite # Trained NILM regression model
│ └── tests/
│ └── test_infer.py # Test suites (units & fallbacks)
└── tools/
├── convert_images.sh # Script to convert SVGs to PNG sizes
├── generate_dummy_tflite.py
└── mock_power_publisher.py # Simulated device telemetry generator
EdgeNergy expects device messages in JSON format on the home/energy topic:
{
"ts": "2025-11-16T05:00:00.123Z",
"device_id": "esp32-001",
"house_id": "home-01",
"sample_rate": 50,
"v": 230.2,
"i": 0.48,
"p": 110.5,
"ct_sample": [0.12, 0.13, 0.11]
}| Field | Type | Description |
|---|---|---|
ts |
String | UTC ISO 8601 Timestamp |
device_id |
String | Unique hardware sensor identifier |
house_id |
String | Unique household identifier |
sample_rate |
Integer | AC sampling frequency (Hz) |
v |
Float | RMS Voltage (V) |
i |
Float | RMS Current (A) |
p |
Float | Active Power (W) |
ct_sample |
Array | Optional current transformer raw waveform samples |
Ensure you have the following installed on your host system:
- Docker
- Docker Compose
- Python 3.10+ (if running the mock publisher locally)
git clone https://github.com/imosudi/EdgeNergy.git
cd EdgeNergyCompile the containers and launch the edge application, Mosquitto broker, and Nginx web server:
docker compose build --no-cache
docker compose up -dTo test the pipeline, run the simulator to stream realistic appliance loads:
docker run --rm --network host \
-v $(pwd)/tools:/app/tools \
--entrypoint python \
smart-edge-energy-monitoring-edge-app /app/tools/mock_power_publisher.pyOnce started, navigate to your web browser: 👉 http://localhost:8080
-
[x] Phase 1 — MVP:
- MQTT Telemetry Ingestion (
home/energy) - Telemetry parsing & validation
- Dummy TFLite inference integration
- Dockerized broker & application deployment
- MQTT Telemetry Ingestion (
-
[x] Phase 2 — Energy Intelligence:
- Piecewise regression disaggregation model (
nilm.tflite) - Transient power transition detection (
$\Delta P$ ) - Appliance load signature verification
- State change event logging on topic
home/events - Upgraded light corporate Web Dashboard with breakdown bars and Event Log
- Piecewise regression disaggregation model (
-
[ ] Phase 3 — Advanced Analytics:
- Edge Anomaly detection (overcurrent & voltage sags)
- Load forecasting & demand prediction models
- Federated learning pipeline for model updates
-
[ ] Phase 4 — Cloud & Multi-Tenant:
- Cloud database synchronization (TimescaleDB / InfluxDB)
- User authentication & multi-tenant support
- Mobile application dashboard companion
- Network Isolation: MQTT broker and Edge AI processor run in isolated docker bridge networks.
- Privacy-Preserving: Telemetry disaggregation occurs entirely inside your local network; no private load usage patterns are leaked online.
- Minimal Cloud Exposure: Communication to cloud database synchers is unidirectional and encrypted.
Contributions are welcome! If you would like to submit improvements:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Mosudi Isiaka
This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.
If you use EdgeNergy in your research or academic work, please cite it as:
@software{EdgeNergy2025,
author = {Isiaka, Mosudi},
title = {EdgeNergy: An open, reproducible device-to-edge-to-cloud architecture for real-time smart home energy monitoring.},
year = {2025},
url = {https://github.com/imosudi/EdgeNergy},
license = {BSD-3-Clause}
}