Work

Design and Implementation of an ESP32-Based Smart Energy Monitoring System with Real-Time Anomaly Alerting

Year: 2026
Type: article
Abstract: 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.
Language: English
Open Access status: hybrid
OpenAlex ID: W7236655175
FWCI:
Cites:
Cited by:
Related to: 10