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.
Step 1: Process
This process consists of three parts,
- Hardware (WiFi controlled Relay)
- Coding (Adafruit MQTT Client Code)
- 'IFTTT ( Merging Google Assistant and Adafruit MQTT)
Step 2: 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,
Step 3: 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.
Step 4: 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.
Step 5: Tutorial Video
Watch out this full tutorial Video to exactly understand each and every process. Still you have any doubt regarding this project or my any other project, you can directly whatsApp me on my number
+91 82000 79034