Design and Implementation of an IoT Based Smart Home System for Motion Triggered Object Detection and Automated Ventilation Control
Abstract
Internet of Things (IoT)-based smart homes enable the automation of home devices to improve comfort and security. This study designs and develops a smart home system in which passive infrared (PIR) sensors are used only to detect motion, while an ESP32-CAM and YOLOv3 are used for camera-based object detection and class labeling. A human-presence indication is therefore generated only when a PIR-triggered camera frame contains a person detected by YOLOv3; PIR motion alone is not interpreted as occupancy. The system also features MQ-2 sensor-based gas leak detection and automatic ventilation control using a servo motor as a safety response. Data and alerts are transmitted through Telegram, while Blynk is used for integrated monitoring. System development followed requirements analysis, design, implementation, functional testing, and corrective refinement. The dedicated YOLOv3 object test documented 11 confidence values ranging from 53% to 99% (descriptive mean 86.2%; median 94%); these values are detector confidence scores and not classification accuracy because no annotated ground-truth benchmark was used. In an additional 11-trial illuminance-oriented functional test, object detection succeeded in all six trials conducted at 624–950 lux and failed in all five trials conducted at 0–147 lux. The contribution of this work is an event-driven IoT architecture that coordinates motion sensing, visual verification, remote notification, and closed-loop gas mitigation, together with field-oriented evaluation of lighting effects on low-cost camera-based detection.