Design and Implementation of an ESP32-Based Smart Home Electricity Monitoring and Control Module Using MQTT Dash and Telegram Integration
DOI:
https://doi.org/10.32664/smatika.v16i02.2321Keywords:
ESP32, Energy Monitoring, Iot, MQTT, SmarthomeAbstract
This study presents the design and implementation of an ESP32-based smart home box module that integrates multi-channel load control, real-time electrical energy monitoring, and automated user reporting within a single compact and modular system. The proposed module employs an eight-channel relay for household appliance control using the MQTT communication protocol, with MQTT Dash providing real-time visualization and manual control. Electrical parameters, including voltage, current, active power, and cumulative energy consumption (kWh), are measured using a PZEM-004T sensor and transmitted continuously via MQTT. The main contribution of this work lies in the unified system architecture that consolidates device control, energy measurement, and user interaction without reliance on proprietary cloud platforms. In addition to dashboard-based monitoring, a Telegram bot is integrated to deliver real-time system status notifications, on-demand energy reports summarizing average power and total consumption, and fully automated 24-hour periodic reports. This dual interaction mechanism enables both active real-time supervision and passive long-term monitoring, addressing limitations commonly found in prior IoT smart home implementations. Experimental evaluations confirm that the proposed system operates reliably, responsively, and with acceptable measurement accuracy for residential applications. All relays on the eight-channel module respond stably to ON/OFF commands from the MQTT Dash interface with delays of less than one second, ensuring dependable real-time control. The PZEM-004T-based monitoring subsystem provides voltage, current, power, and energy data with power measurement errors ranging from 0.83% to 2.66%, which is suitable for daily household energy monitoring. Tests under various single and combined load conditions demonstrate consistent detection of power variations. Overall, the results indicate that the proposed smart home box module provides a practical, low-cost, and scalable solution for integrated IoT-based residential energy control and monitoring.
References
[1] M. Asvial, A. Cracias, M. Laagu, and A. S. Arifin, “Design and Analysis of Low Power and Lossy Network Routing System for Internet of Things Network,” Int. J. Intell. Eng. Syst., vol. 14, no. 4, 2021, doi: 10.22266/IJIES2021.0831.48.
[2] K. A. Yasa, I. M. Purbhawa, I. M. S. Yasa, I. W. Teresna, A. Nugroho, and S. Winardi, “IoT-based Electrical Power Recording using ESP32 and PZEM-004T Microcontrollers,” J. Comput. Sci. Technol. Stud., vol. 5, no. 4, pp. 62–68, 2023, doi: 10.32996/jcsts.2023.5.4.7.
[3] S. Khan, H. Ali, and Z. Shah, “Systematic Analysis of Smart Homes: Current Trends and Future Recommendations,” Cogent Eng., 2024, doi: 10.1080/23311916.2024.2344452.
[4] S. Watmah, “Pemantauan Catu Daya untuk Proteksi Listrik Menggunakan ESP32 Berbasis Internet of Things (IoT),” IMTechno J. Ind. Manag. Technol., vol. 6, no. 2, pp. 94–99, 2025, doi: 10.31294/imtechno.v6i2.9518.
[5] M. F. Zia and others, “Securing the Future: A Survey on Smart Home Security in IoT,” Adv. Networks, 2025, doi: 10.11648/j.net.20251201.11.
[6] M. L. U. A. Usi’il Arzaq, A. Budi Laksono, and U. Ilmi, “Perancangan Sistem Monitoring Peralatan Listrik Pada Peternakan Ayam Berbasis Internet of Things (IoT),” J. FORTECH, vol. 6, no. 2, pp. 93–98, 2025.
[7] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of Things (IoT): A Vision, Architectural Elements, and Future Directions,” Futur. Gener. Comput. Syst., vol. 29, no. 7, pp. 1645–1660, 2013, doi: 10.1016/j.future.2013.01.010.
[8] O. Y. Hutajulu and others, “Feasibility Study of Smart House Design with ESP32 and Telegram,” in EAI Conference Proceedings, 2022. doi: 10.4108/eai.11-10-2022.2325332.
[9] M. T. Muslihi, “Pengembangan dan Evaluasi Sistem Monitoring Konsumsi Daya Listrik Berbasis IoT dengan Sensor PZEM-004T dan ESP8266,” J. FASILKOM, vol. 15, no. 1, pp. 77–83, 2025, doi: 10.37859/jf.v15i1.8508.
[10] C. Austin, M. Mulyadi, and S. Octaviani, “Implementasi IoT dengan ESP32 Untuk Pemantauan Kondisi Suhu Secara Jarak Jauh Menggunakan MQTT Pada AWS,” J. Elektro, vol. 15, no. 2, pp. 46–55, 2022, doi: 10.25170/jurnalelektro.v15i2.5141.
[11] A. Banks and R. Gupta, “MQTT Version 3.1.1,” 2014.
[12] A. S. Ibrahim, A. M. Abbas, A. M. A. Hassan, W. M. Abdel-Rehim, A. Emam, and S. Mohsen, “Design and Implementation of a Pilot Model for IoT Smart Home Networks,” IEEE Access, vol. 11, pp. 59701–59728, 2023, doi: 10.1109/ACCESS.2023.3282095.
[13] F. P. Putra, S. Sabirin, and H. Soetanto, “Prototype of Internet of Things-Based Control System Using Telegram with Bot API Method,” J. Syntax Transform., vol. 6, no. 2, pp. 87–109, 2025, doi: 10.46799/jst.v6i2.1055.
[14] M. N. Osman, M. H. F. Ismail, K. A. Sedek, N. A. Othman, and M. Maghribi, “A Low-Cost Home Security Notification System Using IoT and Telegram Bot: A Design and Implementation,” J. Comput. Res. Innov., vol. 7, no. 2, pp. 327–337, 2022, doi: 10.24191/jcrinn.v7i2.325.
[15] H. J. El-Khozondar, S. Y. Mtair, K. O. Qoffa, O. I. Qasem, and A. H. Munyarawi, “A Smart Energy Monitoring System Using ESP32 Microcontroller,” e-Prime - Adv. Electr. Eng. Electron. Energy, vol. 9, p. 100666, 2024, doi: 10.1016/j.prime.2024.100666.
[16] N. P. Putra, “IoT-based kWh Monitoring Prototype using PZEM-004T Sensor,” J. Emerg. Innov. Eng., 2025, doi: 10.65664/jeie.v1i02.11.
[17] M. Esposito, A. Belli, L. Palma, and P. Pierleoni, “Design and Implementation of a Framework for Smart Home Automation Based on Cellular IoT, MQTT, and Serverless Functions,” Sensors, vol. 23, no. 9, 2023, doi: 10.3390/s23094459.
[18] D. N. Bestari and A. Wibowo, “IoT-Based Real-Time Monitoring System Using Telegram Bot,” Int. J. Interact. Mob. Technol., vol. 17, no. 6, 2023, doi: 10.3991/ijim.v17i06.34129.
[19] B. Mustafa, M. W. Iqbal, M. Saeed, A. R. Shafqat, H. Sajjad, and M. R. Naqvi, “IOT Based Low-Cost Smart Home Automation System,” in 2021 3rd International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), 2021, pp. 1–6, doi: 10.1109/HORA52670.2021.9461276.
[20] J. A. Medina Molina, B. Arzate-Rueda, E. Reyes-Archundia, and J. C. Olivares-Rojas, “Comparison of Electrical Measurements between Different Devices for Smart Meter Applications,” Glob. J. Eng. Technol. Adv., vol. 19, no. 3, pp. 71–78, 2024, doi: 10.30574/gjeta.2024.19.3.0089.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 SMATIKA JURNAL

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
The writer agreed that the article copyright by Smatika journal and the writer has the right to disseminate the paper published without permission in advance.
