ESP32-S3-based single-phase smart meter with containerized IoT backend and residential consumption forecasting
摘要
This paper presents a low-cost IoT-based architecture for residential electricity metering and consumption forecasting, centered on a single-phase smart meter with Wi-Fi connectivity and an ESP32-S3 microcontroller. The proposed system combines local signal acquisition with an end-to-end communication infrastructure based on MQTT, enabling real-time transmission of electrical measurements from the edge device to a remote server for storage, visualization, and predictive analysis. Experimental results demonstrated satisfactory metering performance, with an average current MAE of 0.23 A and MAPE of 4.56% when compared with a CW500 reference power analyzer. From the telecommunications perspective, the communication tests showed low gateway latency, ranging from 1.53 to 12.8 ms, and server latency between 203.63 and 290.86 ms, indicating adequate responsiveness for real-time monitoring applications. For consumption forecasting, the AI models were trained and evaluated using the Low Carbon London dataset rather than data collected entirely by the prototype; the 1D CNN achieved MAE = 0.009109 and MSE = 0.000195, while the LSTM obtained MAE = 0.015597 and MSE = 0.000538. The architecture integrates open-source networking and data services, including Mosquitto, Telegraf, InfluxDB, Grafana, and Docker Compose, resulting in a replicable and scalable platform for smart energy monitoring in residential IoT environments.