Skip to content

Latest commit

 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home Automation System

An IoT-based Smart Home Automation System developed using ESP32-S3, Firebase Realtime Database, and an Android Mobile Application. The system enables users to remotely monitor environmental conditions and control household devices in real time through a mobile application.


Project Overview

This project implements a smart home automation solution that allows users to control electrical devices and monitor environmental conditions remotely via a mobile application.

The system uses an ESP32-S3 microcontroller as the central controller, which communicates with Firebase Realtime Database over Wi-Fi. Sensor data is continuously uploaded to Firebase, while device control commands from the mobile application are retrieved and executed by the ESP32.

The system currently supports:

  • Remote control of 3 fans
  • Remote control of 1 light
  • Temperature monitoring
  • Humidity monitoring
  • Motion detection
  • Real-time synchronization through Firebase

Features

Device Control

  • Control Fan 1 (Living Room Fan)
  • Control Fan 2 (Bedroom Fan)
  • Control Fan 3 (Kitchen Fan)
  • Control Main Light
  • Quick Actions (All ON / All OFF)

Sensor Monitoring

  • Real-time Temperature Monitoring
  • Real-time Humidity Monitoring
  • Motion Detection Monitoring

Cloud Connectivity

  • Firebase Realtime Database Integration
  • Real-time Data Synchronization
  • Wi-Fi Connectivity

User Interface

  • Android Mobile Application
  • Modern Dashboard UI
  • Device Status Visualization
  • Sensor Status Cards

Hardware Components

Component Quantity
ESP32-S3 Development Board 1
DHT22 Temperature & Humidity Sensor 1
PIR Motion Sensor 1
4-Channel Relay Module 1
5V DC Fan 3
LED Light 1
Li-ion 18650 Battery 1
Mini Breadboard 1
Jumper Wires Multiple

Software Technologies

Firmware Development

  • Arduino IDE
  • ESP32 Arduino Framework

Mobile Application

  • Android Studio
  • Kotlin

Cloud Platform

  • Firebase Realtime Database

Libraries Used

  • FirebaseESP32
  • WiFi
  • DHT Sensor Library
  • Adafruit SSD1306
  • Adafruit GFX

System Architecture

The system follows a cloud-based IoT architecture.

Mobile App
      │
      ▼
Firebase Realtime Database
      │
      ▼
ESP32-S3
├── DHT22 Sensor
├── PIR Motion Sensor
└── Relay Module
     ├── Fan 1
     ├── Fan 2
     ├── Fan 3
     └── Light

Architecture Diagram:

Architecture Diagram

Circuit Design

The ESP32-S3 serves as the central controller, interfacing with sensors, actuators, and the Firebase cloud.

Circuit Diagram:

Circuit Diagram


Firebase Structure

The project uses Firebase Realtime Database for storing device states and sensor data.

{
  "devices": {
    "fan1": {
      "name": "Living Room Fan",
      "status": "off",
      "timestamp": 1764582623467,
      "type": "fan"
    },
    "fan2": {
      "name": "Bedroom Fan",
      "status": "off",
      "timestamp": 1764582623478,
      "type": "fan"
    },
    "fan3": {
      "name": "Kitchen Fan",
      "status": "on",
      "timestamp": 1781107479876,
      "type": "fan"
    },
    "light1": {
      "name": "Main Light",
      "status": "off",
      "timestamp": 1764582623471,
      "type": "light"
    }
  },

  "sensors": {
    "humidity": 84.1,
    "motion": true,
    "temperature": 27.2,
    "timestamp": 1761287759650
  }
}

Firebase Screenshot:

Firebase Database


Mobile Application

The Android application provides a user-friendly interface for monitoring sensors and controlling devices.

Dashboard Features

  • Temperature Display
  • Humidity Display
  • Motion Detection Status
  • Fan Control Panel
  • Light Control Panel
  • Quick Actions

Application Screenshots:

Docs/Screenshots/
├── Dashboard.png
└── Device_Controls.png

Installation Guide

1. Clone Repository

git clone https://github.com/AbuBaker-AB/IoT-Home-Automation

2. Firebase Setup

Create a Firebase project and enable:

  • Realtime Database

Update the following values inside the ESP32 firmware:

#define WIFI_SSID ""
#define WIFI_PASSWORD ""

#define API_KEY ""
#define DATABASE_URL ""

#define USER_EMAIL ""
#define USER_PASSWORD ""

3. Upload ESP32 Firmware

Open:

Firmware/SmartHomeAutomation_ESP32S3.ino

Compile and upload the code using Arduino IDE.

4. Build an Android Application

Open:

Mobile App/

in Android Studio and run the application on an Android device.


Repository Structure

Home-Automation-System/
│
├── Firmware/
│   └── SmartHomeAutomation_ESP32S3.ino
│
├── Mobile App/
│
├── Firebase/
│   └── database_structure.json
│
├── Docs/
│   ├── Architecture-Diagram/
│   ├── Circuit-Design/
│   ├── Components/
│   └── Screenshots/
│
├── README.md
└── LICENSE

Authors

Abu Baker

Department of Computer Science and Engineering East Delta University Chattogram, Bangladesh

Project Type

IoT-Based Smart Home Automation System

Technologies

ESP32-S3 • Firebase • Android Studio • Kotlin • Arduino IDE • IoT

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

IoT-based Smart Home Automation System using ESP32-S3, Firebase Realtime Database, and Android. Features real-time monitoring of temperature, humidity, and motion, with remote control of fans and lighting through a mobile application.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages