First post… Yay!
Hello I’m new, however I have been reading many posts and I wanted to share some knowledge and learning to assist others undergoing this task of setting up voice control. I have seen other discussions regarding voice activated lights and I have read several posts about people getting this working and I wanted to share my experiences with HomeAssistant, MiLight, Google Assistant and IFTTT.
The following part of this post assumes you have a brief knowledge of Limitless bulbs
I have MilLight (Limitless) bulbs through out my flat, 20 in total, these include ceiling lights, lamps and LED strips. Each room is separated into multiple groups and assigned a group number on one of 3 MiLight wireless bridges. The light bulbs consist of RGBWW GU10 6W Spotlights and RGBWW E27 4W bulbs and RGBWW 5050 300 LED Strips and I have Home Assistant (0.34.0) configured on a Raspberry Pi 3 with IFTTT configured in configuration.yaml
Before you begin you will have to configure the following variables in your configuration.yaml
Light:
Scene:
(The scenes section is for color, brightness, groups of lights to turn on/off in a single command, etc.)
I have both Light: and Scene: split out of my configuration as these configurations can become incredibly long. Please see below for code snippets:
Configuration.yaml
#### Includes #### light: !include light.yaml scene: !include scene.yaml
# If There Then That ifttt: key: {(API-KEY-GOES-HERE)}
Light.yaml
platform: limitlessled bridges: - host: 10.1.6.250 groups: - number: 1 type: rgbw name: Room1 - number: 2 type: rgbw name: Room2 - number: 3 type: rgbw name: Room3 - number: 4 type: rgbw name: Room4
Scene.yaml
#Kitchen Light Scenes - name: Kitchen Lights 100 entities: light.kitchen: state: on transition: 2 brightness: 255 rgb_color: [255,255,255] - name: Kitchen Lights 50 entities: light.kitchen: state: on transition: 2 brightness: 100 rgb_color: [255,255,255] - name: kitchen Lights 1 entities: light.kitchen: state: on transition: 2 brightness: 1 rgb_color: [255,255,255] # Bedroom Light Scenes - name: Bedroom Sexy Time entities: light.bedroom: state: on transition: 2 brightness: 1 rgb_color: [255,100,100]
Once you have the above configured enough to test sign up and register you Google Assistant device with IFTTT. I’m using the Google Pixel in my case as i live in the UK and the Google Home isn’t out yet and my US purchased Google Home has not yet arrived… One week to go
Once you have signed up and linked your device with IFTTT, install the IFTTT app on your android device and add your API key to your configuration.yaml as above.
The next step is to configure a command in IFTTT
On the IFTTT website login and Click My Applets and then “New Applet” when the page loads click the + sign and proceed to search for Google Assistant select it and connect it to your account. Once Connected to IFTTT choose the option “Say a simple phrase” and proceed to setup the voice command
What do you want to say?
"Kitchen lights ten percent"
What’s another way to say it? (optional)
"Dim the Kitchen lights"
And another way? (optional)
"Set kitchen lights to minimum"
What do you want the Assistant to say in response?
"OK, Kitchen Lights at ten percent"
Once you have configured your voice command, click “Create Trigger” then click the next + and search for maker. Proceed to connect maker to your IFTTT account and proceed with the configuration of your voice command by choosing “Make a web request”.
Populate the the Make a webrequest with the following info
URL
https://{DNSNAME}:{PORT}/api/services/scene/turn_on?api_password={API-PASSWORD}
Method
Post
Content Type
{“entity_id”:“scene.kitchen_lights_0”}
Once you click save, wait 2 or 3 minutes and test out your voice command on Google Assistant
You can also use the Light API service in the Maker URL in the following format
https://{DNSNAME}:{PORT}/api/services/light/turn_off?api_password={API-PASSWORD}
Once you have the working commands/syntax rinse and repeat and you can setup hundreds of scenes, colors, levels of brightness, party time, sexy time etc, etc. I have more commands now than i can remember in my old mind…
If you get any issues please post and I shall do my best to assist. Once the Google Home arrives I can update the post. My next project is to create this in API.AI and work has begun on machine learning
Enjoy…