Hello friends, welcome to Tech StudyCell. In this video we will make a very useful home
automation system using NodeMCU to control all the appliances with Google Assistant and
from the Alexa app. and we can also control appliances manually with switches and monitor
the real-time status in the Google home and Alexa app. let me show you how it works. Hey Google, turn on all lamps. Hey Google, turn off room light. Alexa, turn on room light. Alexa turn off night lamp. Hey Google, turn on night lamp. Thus, you can easily control appliances from
anywhere in the world, using the Google Assistant and Alexa. You don't need any Alexa device like echo
dot or Google home for this project.
You can just use their Android app. let me
control the appliances manually from the switches and you can see I can easily control all appliances. now let me turn off the internet, and show
you how it works without internet. I have turned off the Wi-Fi, so I can control
these lamps only from the manual switches. there is some delay as you can see after I
turn off the switch it is taking some time. now let me turn on the Wi-Fi again.
After turning on the Wi-Fi the NodeMCU will
automatically connect with Wi-Fi and then we can control the appliances both from Google
Assistant and Alexa. let me show you. Hey Google, turn off night lamp. hey Google, turn off room light. you can easily control appliances with Alexa,
Google and from manual switches. and you can make this project without using
any custom design PCB. you just have to use a NodeMCU and a relay module to make this
project and during the video, I will share the complete circuit diagram, code for this
So you can easily make this project for your
home. let's get started. [Music] To make this project, we just need a NodeMCU a
4-channel relay module and you can use the existing switch board or push button. now you have to connect all this components
as per the circuit diagram. as you can see the circuit is very simple. I have connected these switches across the
GPIO pin and ground pin. and this is the AC circuit and this is LIVE and this is is neutral
wire. please take proper safety precautions while
connecting these appliances with the relay module. now if you use push button instead of switches
then you have to refer this circuit. and again I have connected this push buttons
across the GPIO pins and ground pin. as you can see there are a lot of connection, so
to give the project a professional look I have designed a PCB for this project and order
it from the jlcpcb. you can order any custom design PCB from JLCPCB with three simple steps. first upload a Gerber file then select the
parameter like quantity, PCB masking color.
Then place the order. If you select a faster delivery service, then
you will get the PCB within a week. and as you can see the quality of the PCB
is very premium in this affordable price range. so you can always try jlcpcb for your any
custom design PCB project. now these are the components required for
the PCB. now I will quickly solder all the components on the PCB.
Now let me connect
NodeMCU with the PCB. Before uploading the code I have to configure
the Sinric account. for that I will use Sinric pro and you have
to visit this page. I will mention the link in the description. then click on signup, and you have to mention
all these details to create an account. I already have an account in Sinric Pro. so I will click
on login and enter the credential and then click on login. this is the dashboad. first we will go to rooms. and here I will add one room. you can give any name but I am giving "Living
Room" and then click on save. Our room created. then we'll go to Devices. here I am using the free version so I can
add maximum 3 devices. first, we have to click on "Add devices" then
give the name of the device. I am giving "Room Light". Device type will be "Switch" and I will select
the room as "Living room". then I will click on Next. now if you want any notification related to
that device then you can turn it on.
I don't need that notification. and again
I will tap on next. and then I'll click on save. our device is created. in similar way I will create the next two
devices. so I have created these devices and is device
has a unique ID, you can see. which will be required in the code. now we can program the NodeMCU for this project. this is the code for this project you can
download this code from our website iotcircuithub.com. just visit the article, link given in the description. then you can download the code from this button.
and in this code, I have mentioned all the required links to download the board and libraries.
Or you can also visit this page. and here
you can see they have mentioned all the required libraries. you need "SinricPro", "ArduinoJson" and "WebSockets"
libraries. after doing that you have to mention the Wi-Fi
credentials. here your have to mention the Wi-Fi name and
Wi-Fi password. then you have to mention the "APP KEY" and
So if you go to your Sinric account, in the
"Credentials", you will find the "APP KEY" and "APP SECRET". you just have to copy this and then here you
have to paste the "APP KEY" and "APP SECRET". after that, you have to mention the device
ID for each device. so let me enter the device ID. again I have
to go to the Sinric account and go to "Devices" now we have to copy the device ID. let me
copy it. then I have to paste it here. Thus, you have to enter the device ID for
all three devices. and here you can see, these are the GPIO pins,
I have used for this project. now if you use Switch, then you have to comment
this line. but if you use push button then just uncomment
You can use same code for the pushbutton. so again I have to comment it, as I am using
switch for this project. now I can upload this code to NodeMCU. for
that I will go to Tools, select the board as "NodeMCU 1.0" and a proper PORT. then I
can hit the upload button. now I will configure the Amazon Alexa app.
so let me open the Alexa app and in the device you can see there is no device connected. now I will tap on more and select the "skills
and games" and here I have to search for Sinric Pro. then I will tap on the Sinric Pro. now
tap on the "Enable to Use". then you have to enter the Sinric credential. so here I will enter the email id and password
which I have used for the Sinric.
After that tap on sign in. you can see, Sinric Pro has been successfully
linked. now again have to go to the Amazon Alexa app.
now I have to tap on "Discover devices". it will take some time and during this time
the NodeMCU should be connected with the Wi-Fi. Here you can see, 3 devices found. so I have to go to "Device" and in the "Plug"
you can see these are the devices connected. now let me configure the Google Home app for
this project. Let me open the Google Home app. in this app
first I have to create a home. So I will tap on "create new home". and here I am giving the name "Smart Home"
you can give any name. now tap on "Continue". the home is created. now again I will tap on this "+" icon. and
select the first option "Set Up device". and here I will select "Works with Google". here you have to search for Sinric Pro and
then select the Sinric Pro. again it will ask the Sinric credential.
So we have to login the Sinric account. then tap on sign in. after that, you have to go to the homepage
of the app. and here you can see 3 devices connected in the living room. you can see these are the three devices. Kitchen light, night lamp and room light. I can control these devices from the Google
Home app. I have connected all these four lamps with
this relay module as per the circuit. now let me turn on the 5 volt supply. now if you use switch, then there is one restriction,
that during the booting process of NodeMCU this switch-2 must be turned off. but if you use push button then there is no
such restriction. now let me control appliances with Google
Assistant. hey Google, turn on all lights. So this is a very useful Smart home system,
and as I am using the free version of Sinric Pro account so I can control maximum 3 devices with Google
home and Alexa app.
you can also join our Telegram channel "Tech StudyCell" to get different
Home Automation ideas. if you like this project, then please hit
the like button and share it with your friends. don't forget to subscribe for more such projects. thank you for watching have a great day..