Trybotics Logo

Home Automation Using Google Assistant With Esp8266-01 and Thingspeak

DESCRIPTION

Hai friends.. This is Anto.. In this tutorial, we are going to learn how create Thingspeak account and linked with IFTTT to control the home appliance with Google assistance Voice command.

The idea behind this is to control home devices with your own voice. On the market there are lot of devices available to do that. But making your own hardware is awesome. So, let's do it. Build your own personal assistant that will do the work for you. Just your assistant requires only voice command from your mobile.

Note:- Same email id have been used to login your google account in your mobile, thingspeak account, IFTTT account.

Supplies:

I strongly suggest you to buy the components from UTSource.com. you can get quality products and ON TIME DELIVERY. so that i recommend to you all...

Arduino uno :- 1 x 1

ESP8266 :- 1 x 1

LCD 16x2 :- 1 x 1

LCD Break out board - 1 x 1

2 channel Relay :- 1 x 1

Description:

Description:

Login with your email id to thingspeak.com. if you have no account, then create a new account.

Go to channel settings--> give a preferred name as your wish. click only one CHECK BOX and give a name. my case i named a light.


click save the channel at the bottom.

Description:

Select sharing to keep the account as public. then select API key. note down the READ API key. this is more important to paste in the webhook.

The format to paste on webhook on IFTTT is

"https://api.thingspeak.com/update?api_key=X6FK7Z9W2216xxxx&field1=2"

Replace your read api key in the format

Description:

After login into your ifttt account, click create.

then click on this. so that the IFTTT will redirect to the page for selecting the application

Description:

select the google assistant in the service. now you have to choose which phrase you need in the four. In my case, i choose the first option.

now type the phrase which you needed to control.

type the response you needed from the google assistant.

click trigger

Description:

Picture of Step 5: Select
3 More Images

select the webhook to send the data to the thingspeak channel.


i already mentioned the format you have to paste in the url option on step 2. copy that and change your API key. give the field as 0 or 1 or 2 or 3 what you need. but you have to compare the values in the arduino program.

change method to GET and content type to json.

create Action and then finish

Description:

so you have to continue the step 3 to 5 for three more trigger and action.

the difference is change the phrase and response from the google, then change the field value you needed at the end on the format.

Description:

i strongly suggest you to buy a breakout board for esp8266-01. i made my own. connected TX of esp to the D2 pin of the arduino. connect RX pin of th esp module to the D3 pin of the arduino. give 3.3v from the arduino board to the esp8266 module.

connect two channel relay to the pin 6 and 7 of the arduino.

i also strongly recommend you to buy a LCD breakout board to connect the LCD with the arduino.

Connect LCD

RS- D13, EN- D12, D4- 11, D5-10, D6-D9, D7-D8

Description:

modify the program code as per the picture i given..

Description:

Picture of Step 9: Switch ON the Hardware. Check Weather You Receive OK As Response
3 More Images

check the OK response in the serial monitor window. if you find any error, you may be wrong in any step.if every thing is fine, open your mobile. say

"OK GOOGLE"

if your google response then say

" Turn on the light" which you mentioned in the IFTTT .

if the google return response as "OK,sir" as mentioned in IFTTT you are working correct. if your google not respond, check the email id login in your google account of your mobile through google setting.

Your light will turn ON now... enjoy

Description:

if you have any queries, comment me....

Description:


YOU MIGHT ALSO LIKE