How to develop a Smart Home Automation Project?

by Nov 7, 2020Projects

In this technically advancing smart world, A Smart Home isn’t a big surprise. But what exactly is Smart Home Automation? In simple terms, they are homes that can interact with humans and other smart devices. This interaction is possible using sensors, microprocessors, and circuit boards. Smart homes are homes embedded with IoT technologies, which make the house intelligent, efficient, safe, and comfortable for living. It also makes the house energy efficient.

Smart Home Automation has now become a common trend. Smart Home Automation has evolved over the years and is still evolving. Let’s dive in and read more about the History, Current technologies, Z-Wave technology, how to make our own Smart Home, and the Future of Smart Home Automation.

History of Home Automation

Home automation has evolved over the years, originally starting from around 1901. The different phases of evolution are:

Phase 1: 1901 to 1920 – Invention of Home Automation

Home automation begins off with the invention of an engine-powered vacuum cleaner in 1901. Following this, an electricity-powered vacuum was invented in 1907. Alongside this, other inventions like fridges, washing machines, irons, toasters, etc. also took place.

Phase 2: 1966 to 1967 – Kitchen Computer and ECHO IV

The first smart device invented but never sold was the ECHO IV. This device could control the home’s temperature, control appliances, and also compute lists. Another device invented but never sold was the Kitchen Computer. This device could even store recipes.

Phase 3: 1991 – Gerontechnology

Gerontechnology is a combination of Gerontology and Technology. This technology improves the quality of life of senior citizens making it easier. An example of this Technology would be Life Alert.

Phase 4: 1998 to 2000s – Smart Homes

New and different technologies began to emerge in the early 2000s, making smart homes popular. Technologies like home networking were now out in the markets. This became a feasible technology for customers and very affordable too!

Phase 5: 2000s to present – Today’s Smart Homes

Security and sustainability are the main features of today’s smart homes. Moreover, Living greener without wasting unnecessary energy is the key to a smart home. Another feature incorporated in these homes is alerting against intruders. Examples include automated lights, mobile controlling, thermostat adjustment, appliance scheduling, mobile notifications, video surveillance, etc. Another important aspect of implementing a present-day smart house is Z-Wave.

Smart Home Technology

Smart Home automation technologies
Technologies used in today’s smart homes

The smart home technology does not only include a connection with laptops or phones but with anything present at home right from clocks to bells to doors and everything. Few of the most commonly used technologies are:

Smart Speakers

Alexa is not only the biggest but also the most common example of a smart speaker. An AI device, powered by Alexa, Amazon Echo is your virtual best friend. Other smart speakers used commonly are Apple HomePod and Google Nest. Smart Speakers use Voice Recognition Technology, to understand and work upon the directions specified by the user. Every device uses a different voice recognition system. For example, Apple uses Siri, Alexa uses its own system, Microsoft uses Cortana, etc. Moreover, these devices require a Wake Word, upon hearing which, they wake up from their sleep mode and act upon requests.

Smart Lighting

This can be done using not only smart speakers but also using different types of sensors etc. Smart lighting systems generally use motion sensors which turn the lights on when the sensor receives signals of someone’s presence. Many smart lighting systems are also capable of adjusting the brightness of the lights on the basis of the natural light in the room. Other than sensors, a very simple and easy way of doing this is by using Adafruit and IFTTT (If This Then That). Alongside these services, in hardware, you would only require a NodeMCU and Relay module to connect with your house lights. The code for Arduino IDE to do home automation is here.

Smart Security

Security in any house against any sort of intruders or thefts or anything else is very important. Smart security uses technologies like Smart Doors, CCTV surveillance, Personalized security codes, or even fingerprint or retina scan for entry to the house. As a primary controller for the security of the whole house, a control panel is generally installed. They also have alarms/sirens installed for multiple situations. Other than these, motion sensors and door/window sensors are also present. Some of the best Smart Security systems are SimpliSafe and Vivint.

Smart Thermostats

This helps monitor and check the energy levels used as well as the temperature in the house. It also allows you to control the temperature of your house. At one point, they even learn the user’s behavior and automatically optimize themselves to provide maximum comfort. They can also provide users with reminders to change filters etc.

Smart Kitchen

Smart Kitchen includes technologies like smart coffee brewer or even smart fridge. The Smart Brewer is capable of providing you a fresh cup of hot steaming coffee at a specific time automatically. Similarly, the Smart Fridge keeps a check on the expiry dates, groceries available at a specific time and even recipes of your favorite food! Not only that, they can evaluate the currently available ingredients and even give new recipes for you to try. There even come smart toasters, cookers, washing machines and dryers to simplify life.

Pet and Plants Care

Believe it or not, there are actually smart systems to take care of your plants and your pets. Using automatic feeders, your pets will now have all their meals served in time no matter how busy you are. Houseplants and lawns can be integrated with smart irrigation systems and other sensors so that your plants are always healthy and hydrated.

Z-Wave

Z-waves is a very important requirement for the implementation of your smart home. It is a wireless communication protocol which helps smart devices to communicate with each other. The primary usage of this is in home automation. Although it is works just like Wi-Fi or Bluetooth, its features make it better than the other two for the purpose of home automation.

Z-Wave VS Wi-Fi VS Bluetooth

Signal Strength of Z-Wave is much better than Bluetooth which enables it to send signals across obstacles such as walls and even floors. While Bluetooth competes with itself for bandwidth, Z-Waves work together to strengthen the bandwidth, which makes it much better.

Just like Bluetooth, Wi-Fi also competes for speed and bandwidth resulting in interference and low network speed and bandwidth. Although Wi-Fi can send carry more information, devices that send lots of data require a larger capacity than that of Wi-Fi and this capacity is fulfilled by Z-Wave. Also, Z-Waves don’t use Central hubs.

Project on Smart Lighting System

IFTTT conditions for Smart Home automation
IFTTT conditions given for using Smart Home Automation using Google Assistant and the output as shown on Google Assistant when keyword told
Adafruit feed page for smart home automation
Final output of home automation as seen on Adafruit using tables and graphs

Hardware required: NodeMCU, Relay Module.

Connections: NodeMCU –⇾ Relay Module

Vin –⇾ Vcc [Red wire]

GND –⇾ GND [Black wire]

D1 –⇾ IN1 [Light Blue wire]

Connections of NodeMCU with Relay Module

Software programs/Technologies required: IFTTT, Adafruit, Arduino IDE.

Code for Arduino IDE:

#include <ESP8266WiFi.h>          //inbult lib for esp8266
#include "Adafruit_MQTT.h"       //adafruit acts as server 
#include "Adafruit_MQTT_Client.h"//adafruit feeds, dashboard or webpage and nodeMcu is client

/************************* WiFi Access Point *********************************/

#define WLAN_SSID       "Enter WLAN name"
#define WLAN_PASS       "Enter WLAN Password"

/************************* Adafruit.io Setup *********************************/

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883             //1883 is mqtt port number            
#define AIO_USERNAME  "Adafruit_username"
#define AIO_KEY       "Adafruit_secretkey"

/************ Global State (you don't need to change this!) ******************/

// Create an ESP8266 WiFiClient class to connect NodeMcu to the MQTT server.
WiFiClient client;//wifi client is NodeMcu

// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
// library           class           instances of the class-above line
/****************************** Feeds ***************************************/

// Setup a feed called 'onoff' for subscribing to changes.
Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/Bangalore");
//class                 object           function                     parameters
/*************************** Sketch Code ************************************/

// Bug workaround for Arduino 1.6.6, it seems to need a function declaration
// for some reason (only affects ESP8266, likely an arduino-builder bug).
void MQTT_connect();//function call

void setup() {
  Serial.begin(115200);
  delay(10);
  pinMode(D0,OUTPUT);
  Serial.println(F("Adafruit MQTT demo"));

  // Connect to WiFi access point.
  Serial.println(); Serial.println();
  Serial.print("Connecting to ");
  Serial.println(WLAN_SSID);

  WiFi.begin(WLAN_SSID, WLAN_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();

  Serial.println("WiFi connected");
  Serial.println("IP address: "); Serial.println(WiFi.localIP());

  // Setup MQTT subscription for onoff feed.
  mqtt.subscribe(&onoffbutton);//mqtt is a class which is subscribing to on off button which is an object
}

uint32_t x=0;//unsigned int of 32 bits 

void loop() {
  // Ensure the connection to the MQTT server is alive (this will make the first
  // connection and automatically reconnect when disconnected).  See the MQTT_connect
  // function definition further below.
  MQTT_connect();

  // this is our 'wait for incoming subscription packets' busy subloop
  // try to spend your time here

  Adafruit_MQTT_Subscribe *subscription;
  while ((subscription = mqtt.readSubscription(5000))) {
    if (subscription == &onoffbutton) {
      Serial.print(F("Got: "));
      Serial.println((char *)onoffbutton.lastread);
      uint16_t state=atoi((char*)onoffbutton.lastread);//normally we get string from server and we need int bcoz (1/0)is used
      digitalWrite(D0,state);
    }
  }

 
  
}

// Function to connect and reconnect as necessary to the MQTT server.
// Should be called in the loop function and it will take care if connecting.
void MQTT_connect() {
  int8_t ret;

  // Stop if already connected.
  if (mqtt.connected()) {
    return;
  }

  Serial.print("Connecting to MQTT... ");

  uint8_t retries = 3;
  while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
       Serial.println(mqtt.connectErrorString(ret));
       Serial.println("Retrying MQTT connection in 5 seconds...");
       mqtt.disconnect();
       delay(5000);  // wait 5 seconds
       retries--;
       if (retries == 0) {
         // basically die and wait for WDT to reset me
         while (1);
       }
  }
  Serial.println("MQTT Connected!");
}

Future of Home Automation

Smart, Smarter, and now leading to the Smartest technologies making our homes so much more comfortable for living. While our homes are only half automated as yet, the future holds fully automated homes. The little human intervention required currently is going to be eradicated in the coming future. Not only homes in itself, but our homes might also even be linked to our vehicles or many other external things, improving the quality of life to a greater level. Fully Automated homes are the future not only because it is much more comfortable and convenient, but also because it is much safer and better. It will also be an eco-friendly option which is the need of the moment. Greener homes, Safer homes, and Sustainable homes are the key features of our next home leading it to give us the best quality of life.

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

How to Simulate IoT projects using Cisco Packet Tracer

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

How to design a Wireless Blind Stick using  nRF24L01 Module?

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

How to implement Machine Learning on IoT based Data?

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....

How to build a Safety Monitoring System for COVID-19

How to build a Safety Monitoring System for COVID-19

It is expected that the world will need to battle the COVID-19 pandemic with precautious measures until an effective vaccine is developed. This project proposes a real-time safety monitoring system for COVID-19. The proposed system would employ an Internet of Things...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....