DEV Community

DhiraNegi
DhiraNegi

Posted on

ESP with Google Assistant

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

Alt Text

Select some name and write some description.

Alt Text

Alt Text

Select a name and some description.

Alt Text

  • Click on the created dashboard and add a new block (I have taken a toggle block).

Alt Text

  • 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.

Alt Text

Setting up ESP

  • Install Adafruit MQTT library. Sketch>Include library>Manage libraries and search for adafruit mqtt

Alt Text

  • 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)

Alt Text

  • 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.

Alt Text

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 😄

Top comments (0)