Controlling Appliances with Google Assistant

Till now you have used your google assistant to answer the question regarding weather condition,currency rates,direction,date&time etc. Your google assistant can do more then just these question answers. Now use google assistant to control your home appliances, just say

Ok Google, turn on light. 

and your work is done.So read out this article to learn how to make this possible.

Process 

This process consists of three parts,

  1. Hardware (WiFi controlled Relay)
  2. Coding (Adafruit MQTT Client Code)
  3. IFTTT ( Merging Google Assistant and Adafruit MQTT)
Hardware

For the hardware we need to have a relay to switch AC appliances which is operated through wifi. So for that I have used my already made previous project Sonoff. In case you have watched this project and made your own Sonoff, then your hardware & coding portion is completed.




For the rest of the people, I’ll show you simple relay which is controlled using ESP8266 12e dev board. So the connections of relay, esp8266 and the AC appliance (bulb) is something like this,

 

Coding

For coding the ESP8266 we are going to use Adafruit MQTT Library which you can download it from my GitHub account. In that library, we are just going to modify the example code called “mqtt_esp8266”.




There are lot of changes you need to do in that code, so better watch my tutorial video. And yes you also need to make an account in io.adafruit.com before uploading the code as there are few details of your account which you need to enter in the code. So watch out my video attached in the end of the article to know the process.

 

IFTTT

IFTTT stands for If This Then That which basically provides a platform on which we can merge two different services. Like for our project, we are going to use Google assistant and Adafruit MQTT. So any instruction coming from Google assistant will be processed by IFTTT and accordingly the actions will be performed on Adafruit MQTT server side.




Making acoount in IFTTT and making applets in that application is a bit lengthy process and it will be difficult to explain it in words. So for this kindly watch my tutorial video.

Tutorial video

 

Leave a Reply

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