Smart Safety Room: ESP32 Decision Tree-Based Multi-Hazard Detection System - Jogi Purba; Dedy Kiswanto; John Bush Henrydunan; Revidamurti Dly (Journal of Artificial Intelligence and Engineering Applications (JAIEA), 2026)
Physical space security and safety remain fundamental challenges in various sectors, ranging from residential buildings to critical server rooms. Conventional security systems often rely on single sensors or passive alarms that cannot respond comprehensively to multiple simultaneous threats. This research proposes a Smart Safety Room, an ESP32-based integrated multi-sensor security system that combines gas sensors (MQ-2), fire sensors (flame sensors), PIR sensors, and visual-audio output components including OLED displays, RGB LEDs, and buzzers. The system implements a decision tree algorithm with hierarchical priorities to classify room conditions into three categories: SAFE, ALERT, and DANGER based on a combination of sensor data. Testing was conducted through four main scenarios: normal conditions, fire detection, intrusion detection, and dual threat conditions. The results show that the system achieved an overall accuracy of 96.5% with detailed performance of 96% for the fire sensor, 94% for the gas sensor, and 98% for the PIR sensor. The average response time was under 300 milliseconds for all types of detection, meeting the real-time system requirements. The decision tree showed excellent classification performance with an F1-score ranging from 95-97% for all categories. The web-based real-time monitoring dashboard successfully displayed sensor status with auto-refresh every 1 second and a data loss rate of only 0.8% during continuous operation.