Introduction: Connecting My ESP8266 With Google Home
In this instructable I will explain how to connect your Google Home to your ESP8266 board. The end goal is to switch my ledstrip on and off with voice commands.
I will only explain the connecting part, for the code you can find great examples if you download the Adafruit IO Arduino library on how to connect your board to Adafruit.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Create an Adafruit Dashboard and Feed
To connect the Google Home voice assistent to the ESP8266 we will use a combination of Adafruit and If This Then That. If This Then That is great for connecting services like Google Home and Adafruit, which is what we are going to do.
So the first step is to create a dashboard in Adafruit and connect your feed. Here is a link on how to do this: https://learn.adafruit.com/create-an-internet-of-t...
I added a Toggle to my dashboard turn my ledstrip on and off and linked this to my feed.
Step 2: Set Up Your Code
Find code that will connect Adafruit with your board. I will not explain this step but a good example is adafruit_14_neopixel from the Adafruit IO Arduino library.
Also test this code before the next step to see if your Adafruit is connected with your board.
Step 3: Set Up IFTTT
If you have created your account on IFTTT go to Applets and then choose Private on the left.
Step 4: Create a New Applet
Click on the Create Applet button.
The first step is to create a trigger. As the service, type in Google Assistent. Then choose 'Say a simple phrase' from the drop down.
Step 5: Activation Phrases
In this part you will make multiple variations of your activation phrase. My project is about a food delivery service, and asking the assistent how long it will take till the food arrives.
But for a simple light switch the activation phrase could be: "Turn on the lights." Then create variations of this phrase, for example: "Please turn the lights on" etc.
Step 6: Language
Then choose the language you used in the phrases. There are not that many options here, I chose English, so I had to change the language of my Google Home to English for this to work.
Step 7: Filter
The next field you will get is the filter option, for this project we will skip this step since it is more of an advanced feature and we will not need it for this project.
Step 8: Creating the Action
Here you will say what the action of the applet is in response to the trigger. Search for Adafruit as a service and choose 'send data to Adafruit' from the dropdown.
Step 9: Connecting Your Adafruit Feed
In the first field type the name of the Adafruit feed you want to use. As a value I choose "ON" since this is the string my code is looking for to turn on the led strip. So make sure this value matches your code.
If you want to turn your lights off as well just repeat these steps but with different activation phrases and "OFF" as a value.
Step 10: Active Your Applets
Go to My Applets and switch the toggle to turn on the Applet. Then click connect. You will be redirected to Google and Adafruit for permission to connect these accounts.
Step 11: Say Your Phrase
For testing just say "Hey Google, your activation phrase here" and your lights should turn on.
Your voice controlled led strip is ready to use!