How To Make Home Assistant Automation that Controls Your Home

Hello friends, if you are searching on the internet that how to make a home automation system ideas or want to get some information about it, then you have come to the right post, here we will also teach you step by step that how you can make home assistant automation and we will also give home automation system or home automation system examples. I will also give you a lot of information about this home automation system. 

Although the home automation system seems to be a very famous word, but with the help of this system, you can control all home appliances in your house, whatever you have in the house which is controlled by electricity, you can control those items through your mobile, and you can do this from anywhere in the world, you can also tell Google Assistant with the help of your voice that I want to turn off or turn on my household items. If so, then you stay on this post and read this post completely so that you will be well aware of how this system is made and what tools are needed to make this system and what information about this system so that you can make this system very easily...

What is Home Automation System | Home Assistant Automation

Listen This Paragraph

Home Assistant Automation or Home Automation System is a system by which you can control all the items in your home that are controlled by electricity, by downloading an app from your mobile and connecting your phone with Google Assistant.

With the help of Assistant, you can turn those items on and off and this is called Home Assistant Automation. And you feel like turning off the fans, you feel like turning off the lights, you feel like turning off any items in the house but now can't get up, maybe you are sick or something You may be unable to get out of your bed, but you feel like turning off, then you can turn off or On those devices through this system, which is controlled by electricity, so this is called Home Assistant Automation.

What Are The Steps To Make This System

Listen This Paragraph

What are the steps with the help of which you can make this home assistant automation and how can you control all the devices in your house that are controlled by electricity, so if you want to learn this in practical way then, You can also learn this by clicking on  video, we have given a video below, you can click on that video to learn how this device is made in practical and if you want to learn by reading, then by reading You can also learn, read our full blog post, in which we have told step by step, what software is used in it and which tools are needed, what parts are needed, so that you can make this device very easily at home. You will not even need to make it from anywhere, you can easily make it at home.

Step-1: Download And Setup Blink App

blynk home assistant automation system

Listen This Paragraph

So first of all take your mobile and open play store in mobile, after opening play store, type blynk in search box of play store after typing blynk the app will start showing. You download and install that app on your phone.

So once the app is installed, you open that app, after opening that app, you have to sign up in that app, so if you do not have an account in that app, then you sign up with your Google account.

You can also do it through this medium and you can also do it through Facebook account, if there are some other options given there, then you can also sign up through that medium, after signing up you have to click on the new project.

 After clicking on New Project, you have to give a good name to this project like Home Automation or you can give anything you want, after that you will be asked to enter the device, then select NodeMCU in the device section and after that you will be asked the connection type then you will select wifi in the connection type.

 After doing all this, the blink app will send you an authorization token to that medium through which you have signed up like Gmail or Facebook, this token is very important because with this same token through the Blink app you can access that device, which we are going to make.

So after doing all this, you will see the project blank that you have created, then in that project you will have to add four or more buttons and do the settings of those buttons so that button can control the four or more Relays in the device. So to add a button, you will see an plus (+) icon in upper, you will click on that plus icon, by clicking on the plus icon, you will be redirected in menu, after going to the menu, you will see the buttons drag those buttons one by one and bring to the blank area and when you click on that button, you will go to the settings of that button.

Give a good name to that buttons and select the pin number like D3 and in the same way, you have to give d4 in the second button and you have to give D5 in the third and D6 in the fourth and save the buttons by pressing OK, then our First Step is complete....

Step-2: Setting Up Arduino IDE and Blynk Libraries

Insert Image

Listen This Paragraph

So, In this step you have to download the Arduino IDE software and install it on your PC. In order to download this software you have to click on the Download Arduino IDE Software. Once you click on the link you'll be automatically redirected on the download page Arduino IDE, there you can download the software according to your operating system, if your operating system is 32-bit or 64-bit.

 According to that, you can download Arduino IDE software according to the operating system. After downloading the Arduino software, you need to download the Blink libraries, to download the blynk library, Click On the Download Blynk Library, you can download the latest library of blink by clicking on it. After downloading the blink library, you will find the blynk library in ZIP folder, Extract that zip folder.

After that open the arduino software, after opening you've to go the file after that go to the perferences. After that, you will see a path under the sketchbook location, copy that path, after copying, open the computer in which local disk present, on the top of the bar  paste the copied path and press Enter. After that, when you press enter, the files of Arduino will be opened there, you will see two files, one tools and the other library, then you have to open the library, after opening the library, you will see all the libraries there but we have to add the blynk library to that library.

So, In order to do that we will open the downloaded blink library, after opening the library of blynk, you will see the library folder, you have to open the library folder and copy all the folder in it. After that, come to the library of Arduino and paste it there, by doing this all the blynk libraries will be visible in arduino options.

After doing all this you have to open the Arduino IDE, after opening click on the tools, and then go to the boards and NodeMCU as a board, after doing this, you have to go to port and select COM4. After that, you have to go to Files >> Exmaples >> (Scroll Down) and select blynk >> Boards_WiFi >> ESP8266_Standalone. Now, In this file we need to change the three lines of code..

char auth[] = "Enter Your Auth Token Received by Email"
char ssid[] = "Enter Your WiFi Name"
char pass[] = "Enter Your WiFi Password"

After doing this things, Connect NodeMCU to the computer then compile and upload the whole code in the NodeMCU. In order to do that click on the Right Arrow in the upper in the Arduino IDE. All the codes will be uploaded in the board in few minutes. After that our step two is completed...

Step-3: Hardware Assembly

Home Assistant Automation NodeMCU Board Assembly

Listen This Paragraph

 So, In this step we've to assemble all the Hardwares. In order to do that, First of all power the nodemcu we can either use a phone charger and directly plug it in or we can use a power bank to power it up. To power the relay board you can either use some batteries or get a breadboard to power supply module now the final step is to connect the electronic appliances with the relay board.

You can directly connect the wires from your main socket and attach them to the Relay but to do so I would recommend that you take help of a professional electrician and not to do it on your own because working with a high voltage can be very dangerous and can cause some serious damage if you don't know what you are doing. So, for the sake of this tutorial I will connect a simple external light bulb to one of the relays used in the wires and connect the other end of the earth wire to the wall socket to supply power to the bulb as shown in the image simple enough.

So, let's get into it. Let's start by attaching the cable to the breadboard. I'll connect nodemcu with relay board using some jumper cables. I will connect the digital pin D3 to the nodemcu to relay one, D4 to Relay 2, D5 to Relay 3, D6 to Relay 4, and the ground pin of the nodemcu with the ground pin of the relays. I will attach the light bulb to the the relay board using the high voltage electrical wire.

I will just screw the ends to the wire to the relay board. To power the NodeMCU we will use a smartphone charger and now to power the Relay Board you should use some batteries or a breadboard power supply module either use some batteries or output power supply module. Now finally, Plug both the smartphone charger connected to the nodemcu and the wire connected to the bulb to the power socket and turn them.

It will not take this little setup of hours before doing we've to do one final setting in the blynk App. Open blynk app on your smartphone >> Go to Home Automation project that we created earlier and for each of the button interchange the output from 0 to 1 to 1 to 0 and change the mode from push to switch repeat the steps for all the buttons. Alright, let's now with the play button to test the project. Now Press all the buttons and look at the bulbs working or not if working then your project is working correctly. Now, our this step is completed.....

Step-4: Configure IFTTT

Configuration of IFTTT to the blynk app home assistant automation

Listen This Paragraph

So, we have assembled all our hardware components and we saw that our device working perfectly, now it comes to how we can control it through Google Assistant. So, here what we have done so far to control the home appliances over the internet using nodemcu and to connect the home appliances with nodemcu.

We are using a relay board so blynk app on our smartphones sends on or off commands to the nodemcu, which turns on or off our home appliances. But this is not our goal our goal is to control the electrical appliances using Google Assistant voice commands. Now, we can neither send Google Assistant voice directly to the nodemcu nor can we send them directly to the blynk app.

Therefore, we will use an intermediate tool called IFTTT, which will sends the appropriate request through Google Assistant to the Blynk App and in the end this is how things will work when we say Google commands like "turn on the light" to Google Assistant, it will sends the commands to IFTTT, which interpret that command and send appropriate request to the blynk app and the blynk app sends the command to the nodemcu and then to the electrical appliances. So, in that way things will work...

So, let's get into it and configure IFTTT, So first of all you have to go to the IFTTT website, after visiting the website, you can sign up here with the help of any of your Google accounts, after signing up, you have to go to My Applets >> And then Click on new applets >> Click on This >> Search For Google Assistant in the Search Bar and Select it >> Click on Connect

At this point IFTTT will ask you permission to use your Google account to add voice commands for Google Assistant which will simply allow and now we will be presented with the screen with four options, I will select the first one which says simple phrase was basically means that when, I say a simple phrase to Google Assistant then some work will happen now you'll see a form.

 In the box of "what do you want to say?" I will be right a command like "turn on light" then under "what's another way to say it?" and "And other way?" both are optional commands you can also type another command like "turn on the room light" and "Turn the room light On" and under "what do you want to assistant say in response", This section is because the answer is to ask Google Assistant to turn on the lights of your room, then what will Google Assistant tell you in return, here you can write, you'll write "Ok, Turning the room light On" and then click on create trigger.

So, you will see there, we have successfully created a trigger, it means something will happen when we give the command to Google Assistant. But in our case we will tell google assistant to send a request to Blynk to turn on the relay1. So that, our room light turns on. So to program this thing, we will click on "That"  >> then search for webhooks in the search bar >> then click on Connect. Now, Webhooks is a tool that allow us to send web request to the blink app so we can create a new web request. >> Then Click on make a new web Request.

So here also you will see a form like that below which there will be a url, there will be a box below that url, in that box you will type this url: Your Auth Key Here send in Email/update/D0. So, if you want to control Relay 1, which is connected to pin number D3 of nodemcu then you have to write "D0" at the last of the url as you can see in the diagram that where d3 is written next to it is GPIO0 written, which means d0.

So, why you can't write D3 directly, we can't write D3 directly because when blynk app send any command to nodemcu it understands that it is not sending command to nodemcu it is sending the command to Arduino Board. So, That's why, this problem occurs, then you have to do everything after checking the diagram given below..

Node MCU Pin Diagram

After that, you have to select "PUT" in method type  >> In content type you have to select application/json >> And in body Type write ["0"] zero in between the double quotes and square brackets. Here, Zero Means turn Off. Similarly, create an another applet by following the same rules and the last of the given url you will write ["1"] one which means turn On. >> Click on Create action and Finish.

So, you have created turn on and turn off applets for relay 1 which controls the room lights. Similarly, create another applets for other home appliances by following the same rules...

So, If you will tell the Google Assistant to turn the appliances on or off, then it will turn on or off your home appliances..

So, thank you for reading our post, if you liked our post, then you can share this post on social media by the buttons given below and also share with your friends...


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *