Google Assistant is amazing. Isn't it?
I tried to control my esp with google assistant. Here's how I did it.
Setting up Adafruit IO
- Go to https://io.adafruit.com/ and sign up.
- Go to Feeds and create a new feed. Feeds hold data that devices push to Adafruit IO.
Select some name and write some description.
- Setup a new dashboard.
Select a name and some description.
- Click on the created dashboard and add a new block (I have taken a toggle block).
- Select feed you would like to add and add block settings. For now I am adding a button to control the builtin led of nodemcu.
Setting up ESP
- Install Adafruit MQTT library. Sketch>Include library>Manage libraries and search for adafruit mqtt
- Goto File>Examples>Adafruit MQTT Library>mqtt_esp8266
- Update SSID/password and Adafruit IO user name and user key.(You will find your Adafruit IO username and key from your dashboard)
- Replace feed name from onoff to espControl
- You need to write the code for the actions you want to perform. Here is a piece of code for controlling builtin led of nodemcu.
Get the complete code : https://github.com/DhiraNegi/esp-with-google-assistant
Google Assistant Integration
Just enable this IFTTT applet and you are ready to go.
Try some more stuff as there is always more to learn.
HAPPY LEARNING 😄