IFTTT & Google Assistant
This page shows, how you can use the natural language API in combination with Google Assistant to control SmartLight with your voice.
You need an IFTTT Account to continue.
0. Open IFTTT and create a new action
Open: https://ifttt.com/create
1. Create Action Trigger
Choose "Google Assistant" as the Service
Choose "Say a phrase with a text ingredient"
Enter some phrases with a $ placeholders like: "Turn the light $" (figure 1) and choose your language.
Click "Create Trigger"
2. Create Action
Choose "Webhooks" (figure 2) as your action service.
Fill in the webhook form
URL:
http://localhost:5000/aj-smartlight/us-central1/api/units/setNL
Method:
POST
Content Type:
application/JSON
Body
Open the Web-App, go to settings and create your personal access token. (figure 3)
Body Content:
{ "userid": "YOUR USERID", "token": "YOUR ACCESS TOKEN", "lang": "de", "payload": "{{TextField}}" }
Click "Create Action"
3. Test it - "Hey Google, turn on the kitchen light"
That's it. Now enjoy using your voice to control your home. The API understands a lot of colors and all the named gradients you have saved. If you discover that the Assistant doesn't understand some words correctly, you can give your lamps and groups "tags" which will be handled like aliases.
Last updated