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
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
Hardware required: NodeMCU, Relay Module.
Connections: NodeMCU –⇾ Relay Module
Vin –⇾ Vcc [Red wire]
GND –⇾ GND [Black wire]
D1 –⇾ IN1 [Light Blue wire]
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.