Close
0%
0%

Google Assistant DIY Home Control

Control electronic devices with Google Assistant using IFTTT and a Pocket C.H.I.P./Raspberry Pi

Similar projects worth following
Turns out you can add custom commands to Google Assistant. I used IFTTT with a webhooks HTTP POST output. I've written a python script with Tornado to receive the post requests, this way it's easy to produce GPIO outputs. I had some of those cheap wireless wall plug switches, so for the time being I just hooked it up to the remote control.

The easiest way to add custom commands to your Google Assistant is through IFTTT.  You can set up the trigger command, and the assistant's reply. You can even extract text or numbers from the command. For example, I used "turn the light $", where the word in the place of the "$" symbol will be forwarded. Then I set up the other end as a webhooks post request with the word from the input (on or off) and a password to be sent to my IP address. I port-forwarded the request to my Pocket C.H.I.P. and written a python script to receive the request and switch some GPIO outputs.

  • 1
    Make an IFTTT account at https://ifttt.com/
  • 2
    Create a new applet with Google Assistant as "this"
    • Click on "Say a phrase with a text ingredient"
    • Add the command (e.g. "turn the light $") and the response
  • 3
    Add Webhooks as "that"
    • Set up the URL to your IP address and Port
    • Chose POST as the method
    • Set application/x-www-form-urlencoded as the content type
    • Set up the POST body with the ingredient from the previous step (e.g. status={{TextField}})

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates