Design and Implementation of an ESP32-Based Smart Energy Monitoring System with Real-Time Anomaly Alerting
Most Indonesian households observe their electricity use only through a prepaid balance or a monthly bill, so faults and wasteful usage remain unnoticed. This study designed and implemented a low-cost smart energy monitoring system based on an ESP32 microcontroller and a PZEM-004T v3.0 module that measured voltage, current, power, energy, frequency and power factor every second. Anomalies were detected at two levels: threshold rules and a rolling z-score ran on the device, while an Isolation Forest model on the server identified contextual anomalies. Data were published via MQTT to a Node-RED, InfluxDB and Grafana stack, and alerts were sent through a Telegram bot, a buzzer and an automatic relay. Against a reference meter, the mean absolute percentage errors were 0.42% for voltage, 1.22% for current and 1.32% for active power. During a 14-day deployment with 60 injected events, the combined detector achieved a precision of 95.1%, a recall of 96.7% and an F1-score of 95.9%, with a median alert latency of 1.8 s and a packet delivery ratio of 99.62%. At approximately Rp 480,000, the system was affordable for homes and small businesses.
Authors
- Rina Marlina
- Budi Santoso
Publication Details
- Journal
- Journal of Information Technology computer science and Electrical Engineering
- Published
- 2026-11-18
- DOI
- https://doi.org/10.61306/adz79s10
- Primary Topic
- Smart Grid Energy Management
- Type
- article
- Field-Weighted Citation Impact
- 0.00