AutoHome

Published Sep 19, 2022
 120 hours to build
 Advanced

Home Automation using IoT devices.

display image

Components Used

ESP8266 WiFi Module
ESP8266 is a system on chip (SoC) which provides WIFI capability for embedded applications. This enables internet connectivity to embedded applications. ESP8266 modules are mostly used in Internet of Things(IoT) applications.
1
Relay Module Two channel
Relay Module Two-channel
1
Breadboard
Breadboard
1
Micro USB Cable
USB Cables / IEEE 1394 Cables 3FT STRONG MCROUSB-B/USBACBL
1
Resistor 1 kOhms
Metal Film Resistors - Through Hole 1K ohm 1/4W 1%
2
Male to Female Jumper Wire
Jumper Wires Mach pin jumper wires
1
Male to Male Jumper Wire
Jumper Wires Mach pin jumper wires
1
Female to Female Jumper Wire
Jumper Wires Mach pin jumper wires
1
Description

This Home Automation project is divided into two parts first one is to create a node server and the second is the microcontroller code.

In this Home Automation project, instead of using Firebase types services, NodeJs is used to create a custom server.

ESP Used MQTT for communication with the server. Here MQTT is used for low power consumption data transferring.

For ESP there are TWO sketches there 

  1. Initial sketch

           At first, all the ESPs are loaded with initial sketches. Connecting to the WiFi ESPs should be authenticated by Scan The QR code. The QR code Has the ESP board Information after scanning with iot-app. The App sent an HTTP post request including the scanned data and After getting the request the server first searches its database that the ESP is already present if not then the server creates a database for new ESP. and allow the ESP to Upload the main sketch(./Uploads/main.ino.bin). Also, the server sent a JWT token to iot-app so that it can access the APIs. 

      2. Main sketch

           The main sketch has all the actual functional code which is On/Off the Light, AC, Fan & Lights.

 Overview Of this Project:

Hardware used :

  1. ESP8266
  2. Relay Module(4 channel)
  3. 5V power Supply(Hi-Link)

Software Specification:

  1. VS-Code
  2. PlatformIO
  3. Arduino IED
  4. NodeJS

Protocols:

  • Server-side protocols :
  1. HTTPS
  2. WebSockets
  3. MQTT
  • Microcontroller-side protocols:
  1. HTTP
  2. MQTT
  3. UART

Server Site Library:

  1. Express
  2.  Socket.io
  3. MQTT
  4. Multer

Microcontroller-Side Library:

  1. WiFimanager.h(Click)
  2. qrcode.h (custom lib for generating QR code)Click
  3. PubSubClient.h(Click)

DataBase:

  1. MongoDB (MongoDB Atlus)

Power Supply:

  1. Hi-Link 5V Power Supply(Click).

MQTT Broker:

  1. broker.mqtt-dashboard.com

User UI:

Admin UI:

 

Features:

  1. OTA update.
  2. Low power consumption.
  3. WiFi Support.
  4. Auto Update Code.
  5. Access From Anywhere In The World With an Internet connection.
  6. Messaging system.
  7. QR code Authentication.
  8. User record (using MongoDB database).

Circuit Diagram:

 

 

Projects Video:

 

Codes

Downloads

IoT Download

Institute / Organization

KALYANI GOVERNMENT ENGINEERING COLLEGE 102
Comments
Ad