By Ashwanth A, Muthiah Karthik S
HestiaGuard Smart Power & Safety System
HestiaGuard is a distributed home management and power‑control system built around ESP32 microcontrollers. The project combines environmental monitoring, electrical usage tracking, and centralized control to improve household safety and energy efficiency.
The system is composed of two main layers:
Sensor Node Layer (Secondary ESP32 Units)
Each room in the house contains a dedicated ESP32 sensor node connected to multiple environmental and electrical sensors. These nodes:
- Monitor gas/smoke levels using an MQ‑2 sensor
- Detect flame/heat presence using a flame sensor
- Measure temperature and humidity via a DHT22
- Track electrical current consumption with ACS712 sensors
- Control local power relays for room power switching
- The nodes preprocess and transmit collected data to a central controller over UART (or optionally Wi‑Fi/Home Assistant integration).
This distributed architecture allows localized sensing while keeping wiring and processing scalable.
Central Control Layer (ESP32‑S3‑BOX)
The ESP32‑S3‑BOX acts as the user interface and decision hub. It:
- Receives sensor data from all room nodes
- Displays readings through an LVGL graphical UI
- Allows the user to enable or disable power delivery to each room
- Supports automated responses based on sensor conditions
Example automated behaviors:
- Cutting power when dangerous gas or flame levels are detected
- Adjusting power availability based on load consumption
- Providing real‑time monitoring of environmental and electrical status
Project Objectives
- Improve home safety monitoring
- Enable intelligent power distribution
- Provide a centralized visual dashboard
- Demonstrate scalable IoT node architecture
- Integrate hardware control with modern embedded UI frameworks
Key Design Concepts
- Distributed sensing with centralized decision making
- Real‑time environmental + electrical awareness
- Hardware‑level power control via relays
- Expandable room‑based architecture
- Hybrid communication (UART / Wi‑Fi / HA capable)
Technologies Used
- ESP32 microcontrollers
- ESP32‑S3‑BOX platform
- LVGL UI framework
- ESPHome / Arduino frameworks
- Analog and digital environmental sensors
- Relay-based AC power switching
Components Required
| Component Name | Quantity | Datasheet/Link |
| ESP32-S3-BOX-3 | 1 | - |
| ESP32-WROOM3 | 1 | - |
| Arduino pro micro | 1 | - |
| Heat/Flame sensor | 1 | - |
| 30A current sensor | 2 | - |
| Relays | 4 | - |
Code Explanation
HestiaGuard is a distributed smart home safety and energy management system built using ESP32 microcontrollers configured through ESPHome. Sensor nodes deployed in individual rooms monitor environmental conditions such as gas leakage, fire presence, temperature, humidity, and electrical consumption, while also controlling local power delivery through relays. These nodes transmit data to a central ESP32-S3-BOX controller that aggregates readings, visualizes them through a touchscreen dashboard, and executes automated safety decisions such as power shutdown during hazardous conditions. Optional Arduino Micro modules extend localized control functionality. The architecture provides scalable sensing, centralized supervision, and automated protection, demonstrating a modular IoT approach to residential safety and energy optimization.
GitHub Repository
Complete Project Code
#include <Arduino.h>
void setup() {
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
if (digitalRead(A0) == HIGH)
digitalWrite(2, HIGH);
else
digitalWrite(2, LOW);
if (digitalRead(A1) == HIGH)
digitalWrite(3, HIGH);
else
digitalWrite(3, LOW);
}