Design and Implementation of a Distributed Smart Home Automation System using Dual ESP32, MQTT and Web-based Remote Monitoring
Abstract
The increasing adoption of connected devices in residential environments has created a need for smart home automation systems that are scalable, reliable, and capable of integrating heterogeneous sensing and control functions. Conventional centralized architectures often impose limitations on scalability, fault isolation, communication flexibility, and system extensibility. This paper presents a distributed embedded-based smart home automation framework using two ESP32 microcontrollers interconnected through the Message Queuing Telemetry Transport (MQTT) publish–subscribe protocol. The proposed architecture distributes sensing, decision-making, and actuation functions across multiple embedded nodes, enabling modular operation and reducing dependence on a single processing unit. The proposed architecture employs a functional partitioning strategy between two dedicated ESP32 nodes. The first node integrates environmental and security functions, performing temperature and humidity monitoring, ambient-light and occupancy detection, RFID/PIN-based access authentication, intelligent lighting and fan control, and intrusion detection. The second node independently manages irrigation and indoor safety functions through soil-moisture, water-flow, and gas-concentration sensing, enabling automated pump control, water-flow monitoring, and gas-leakage detection. MQTT enables bidirectional communication between the distributed nodes and the cloud-connected interface, while a web-based dashboard provides real-time monitoring and manual control without disrupting autonomous operation. Experimental evaluation demonstrates reliable real-time data exchange, consistent sensor-to-actuator response, and effective execution of automated control functions.