Proactive Room Cooling Automation System Based on Internet of Things with DHT22 Sensor and LSTM Temperature Prediction

Authors

  • Amanda Putri STMIK Kaputama
  • Akim Manaor Hara Pardede STMIK Kaputama
  • Kristina Annatasia Br Sitepu STMIK Kaputama

DOI:

https://doi.org/10.59934/jaiea.v6i1.2932

Keywords:

ESP32, internet of things, long short-term memory, proactive control, temperature prediction

Abstract

Conventional room cooling systems generally operate reactively, in which the fan is activated only after the measured temperature has exceeded a threshold, so the room has already become uncomfortable before cooling begins. This study designs and evaluates an Internet of Things based room cooling automation system that controls fans proactively using Long Short-Term Memory temperature prediction. The system was built from an ESP32 microcontroller, a DHT22 sensor as the temperature reader and an SHT31 sensor as the humidity reader, a 16x2 I2C LCD, and a two-channel relay module driving intake and exhaust fans mounted on a room prototype measuring 30 x 22 x 22 cm. Sensor readings were sent every one minute to a Python Flask server for storage, dashboard visualisation, and prediction by an LSTM model trained with a sliding window of 60 timesteps and a one-hour horizon. The test results show a mean deviation of 0.14 degrees Celsius between the DHT22 and a reference thermometer, a data transmission success rate of 98.3 percent, and model performance of 0.826 degrees Celsius mean absolute error and 0.996 degrees Celsius root mean squared error. Proactive control activated the fans about 25 minutes earlier than reactive control, lowered the peak temperature from 31.4 to 30.3 degrees Celsius, and shortened the duration above 30 degrees Celsius from 22 to 6 minutes.

Downloads

Download data is not yet available.

References

T. Domínguez-Bolaño, O. Campos, V. Barral, C. J. Escudero, and J. A. García-Naya, “An overview of IoT architectures, technologies, and existing open-source projects,” Internet of Things (Netherlands), vol. 20, 2022, doi: 10.1016/j.iot.2022.100626.

D. Hercog, T. Lerher, M. Truntič, and O. Težak, “Design and implementation of ESP32-based IoT devices,” Sensors, vol. 23, no. 15, 2023, doi: 10.3390/s23156739.

J. O. Christopher, M. Resquites, M. A. Parrocho, N. Vinegas, D. R. Vinyl, and H. Oquiño, “IoT-based temperature monitoring and automatic fan control using ESP32,” IRE Journals, vol. 7, no. 5, pp. 35–44, 2023.

F. N. Azmi, M. R. R. Putra, M. I. Darmanto, G. Warino, and P. Wulandari, “Temperature-responsive DC fan control system using ESP32 and DHT22 for improved energy efficiency,” Seminar Nasional Teknik Elektro, vol. 4, no. 1, pp. 9–18, 2025, doi: 10.46962/snte.25.063.

B. Seo, Y. Yoon, K. H. Lee, and S. Cho, “Comparative analysis of ANN and LSTM prediction accuracy and cooling energy savings through AHU-DAT control in an office building,” Buildings, vol. 13, no. 6, 2023, doi: 10.3390/buildings13061434.

N. Shakhovska, L. Mochurad, R. Caro, and S. Argyroudis, “Innovative machine learning approaches for indoor air temperature forecasting in smart infrastructure,” Scientific Reports, vol. 15, no. 1, p. 47, 2025, doi: 10.1038/s41598-024-85026-3.

J. W. Satzinger, R. B. Jackson, and S. D. Burd, Systems Analysis and Design in a Changing World, 5th ed. Boston, MA: Cengage Learning, 2010.

Y. Sugiarti, Analisis dan Perancangan UML (Unified Modeling Language) Generated VB.6 Disertai Contoh Studi Kasus dan Interface Web. Yogyakarta: Graha Ilmu, 2013.

S. Suhaeb, Y. A. Djawad, H. Jaya, Ridwansyah, Sabran, and A. Risal, Buku Ajar Mikrokontroler dan Interface. Makassar: Universitas Negeri Makassar, 2017.

C. Bell, Beginning Sensor Networks with XBee, Raspberry Pi, and Arduino: Sensing the World with Python and MicroPython. Berkeley, CA: Apress, 2020, doi: 10.1007/978-1-4842-5796-8.

A. M. Akpil and R. H. Rudi, “Analisis eksperimental komparasi keandalan sensor DHT22 dan SHT31 pada greenhouse berbasis internet of things,” Competitive, vol. 20, no. 2, 2025.

M. F. Aulia and A. Wagyana, “Evaluasi akurasi sensor suhu-kelembapan untuk monitoring vertical garden,” Seminar Nasional Inovasi Vokasi, vol. 4, pp. 1186–1194, 2025.

U. N. Adilah, A. Hendrawan, M. Arman, N. Khakim, and R. Aziz, “Design of a temperature and humidity monitoring system based on the internet of things for cold chain vaccine storage,” Jurnal Otomasi Kontrol dan Instrumentasi, vol. 17, no. 2, pp. 103–112, 2025, doi: 10.5614/joki.2025.17.2.5.

M. Artiyasa, I. H. Kusumah, A. Suryana, Edwinanto, A. D. W. Muhammad Sidik, and A. P. Junfithrana, “Comparative study of internet of things (IoT) platform for smart home lighting control using NodeMCU with Thingspeak and Blynk web applications,” Fidelity: Jurnal Teknik Elektro, vol. 2, no. 1, pp. 1–6, 2020, doi: 10.52005/fidelity.v2i1.103.

M. E. Putra and M. Muslim, “Perancangan sistem monitoring data pada turbin vortex skala laboratorium berbasis internet of things (IoT),” Jurnal Penelitian dan Pengkajian Ilmiah Eksakta, vol. 3, no. 1, pp. 177–186, 2023, doi: 10.47233/jppie.v2i2.1132.

W. Bolton, “Control systems,” in Instrumentation and Control Systems, 2nd ed. Oxford: Newnes, 2015, pp. 81–98, doi: 10.1016/B978-0-08-100613-9.00004-3.

E. Alpaydin, Introduction to Machine Learning, 4th ed. Cambridge, MA: The MIT Press, 2020.

K. Yao and Y. Zheng, “Fundamentals of machine learning,” in Springer Series in Optical Sciences, vol. 241, 2023, doi: 10.1007/978-3-031-20473-9_3.

A. Géron, Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd ed. Sebastopol, CA: O’Reilly Media, 2022.

Downloads

Published

2026-10-15

How to Cite

Putri, A., Manaor Hara Pardede, A., & Annatasia Br Sitepu, K. (2026). Proactive Room Cooling Automation System Based on Internet of Things with DHT22 Sensor and LSTM Temperature Prediction. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 1205–1215. https://doi.org/10.59934/jaiea.v6i1.2932