Sistem Monitoring Kualitas Udara dan Peringatan Dini Berbasis IoT dengan Prediksi Polusi Menggunakan Random Forest Regression - Syukron, Ananda Irya Shakila; Kiswanto, Dedy; Hafiz, Alvin; Harahap, Salsa Nabila (Program Studi Teknik Komputer, Fakultas Teknik. Universitas Serambi Mekkah, 2026)
Abstrak - Pencemaran udara merupakan ancaman serius terhadap kesehatan masyarakat dan kualitas lingkungan, sehingga diperlukan sistem pemantauan yang responsif, andal, dan proaktif. Penelitian ini bertujuan untuk merancang dan mengimplementasikan sistem monitoring kualitas udara dan peringatan dini berbasis Internet of Things (IoT) dengan integrasi machine learning untuk prediksi tingkat polusi secara real-time. Metode penelitian mencakup pengembangan perangkat keras berbasis ESP32 yang terhubung dengan sensor DHT11 (suhu dan kelembaban) serta MQ-135 (konsentrasi gas), pengiriman data ke server VPS melalui protokol HTTP, pembuatan dashboard web untuk visualisasi dan notifikasi, serta pembangunan model prediksi menggunakan Random Forest Regression. Dataset dikumpulkan secara real-time dengan total 38.733 entri, kemudian diproses melalui preprocessing (pembersihan, imputasi missing value, normalisasi Min-Max) dan dibagi dengan rasio 80:20 untuk pelatihan dan pengujian. Hasil evaluasi menunjukkan bahwa model memiliki performa sangat baik dengan R² Score 0,8829 (latih) dan 0,8852 (uji), MAE 2,98, serta RMSE 5,13 pada data uji mengonfirmasi akurasi tinggi dan minimnya risiko overfitting. Analisis feature importance mengungkapkan bahwa konsentrasi gas (PPM) merupakan variabel paling dominan dalam prediksi AQI (skor 0,8497). Sistem peringatan dini juga terbukti efektif saat AQI melebihi ambang batas (misalnya ≥151), indikator LED berubah merah, alarm suara aktif berulang, dan insiden secara otomatis tercatat dalam log digital untuk manajemen respons yang terukur. Secara keseluruhan, integrasi IoT dan Random Forest Regression menghasilkan sistem monitoring yang tidak hanya informatif dan andal, tetapi juga proaktif dalam mitigasi risiko kesehatan akibat polusi udara.Kata kunci : IoT; Random Forest Regression; Kualitas Udara; Sistem Peringatan Dini; Abstract - Air pollution poses a serious threat to public health and environmental quality, requiring a responsive, reliable, and proactive monitoring system. This study aims to design and implement an Internet of Things (IoT)-based air quality monitoring and early warning system with machine learning integration for real-time pollution level prediction. The research methods included developing ESP32-based hardware connected to DHT11 (temperature and humidity) and MQ-135 (gas concentration) sensors, sending data to a VPS server via the HTTP protocol, creating a web dashboard for visualization and notification, and building a prediction model using Random Forest Regression. The dataset was collected in real-time with a total of 38,733 entries, then processed through preprocessing (cleaning, missing value imputation, Min-Max normalization) and divided with a ratio of 80:20 for training and testing. The evaluation results show that the model performs very well with an R² Score of 0.8829 (training) and 0.8852 (testing), MAE of 2.98, and RMSE of 5.13 on the test data, confirming high accuracy and minimal risk of overfitting. Feature importance analysis revealed that gas concentration (PPM) was the most dominant variable in AQI prediction (score 0.8497). The early warning system also proved effective when the AQI exceeded the threshold (e.g., ≥151), with the LED indicator turning red, the audible alarm sounding repeatedly, and the incident being automatically recorded in a digital log for measurable response management. Overall, the integration of IoT and Random Forest Regression resulted in a monitoring system that is not only informative and reliable but also proactive in mitigating health risks due to air pollution.Keywords: IoT; Random Forest Regression; Air Quality Monitoring; Early Warning System;