MiLight Google Assistant - Voice Control for all lighting

What URL are you using on IFTTT?

I was using https all this time because I copied your link, but it worked when I switched to http :slight_smile:

Shouldn’t this work with https too?

It does indeed work over https, however this will require your hass instance to be exposed to the internet over https too

I only expose services to the internet over https :smiley:

Thanks for sharing this.

I was trying to tinker with other stuffs like Alexa and emulated_hue/Ha Bridge etc. I don’t have any Google Home or Echo but I used the Alexa installed on a Pi which sort of worked with a lot of hassle. And by setting up the skills , customizing the emulated_hue all made the whole process a complicated one for me. Previously I tried with AutoVoice which is another beast to setup first time.

In contrast, after the last android update, my Nexus phone got the Google Assistant built in. I tried with IFTTT with assistant and voila!! it works like charm. And the setup is lot more easier than the other options. As I also have the Hadashboard setup, for me controlling all the entities is not much required rather change of the scenes with some quick command is very helpful. In this regard, this setup is perfect. May be Google will release assistant software publicly available for Pi soon. Until then, I am so happy with this current setup.

To the other people who are using Google Home… Do you find any flexibility/advantage using the emulated_hue component rather IFTTT ?

the delay caused by IFTTT made me switch to emulated_hue also the flexibility of the combination between emulated_hue and Google Home as all lights and switches are just available without building separate scripts in IFTTT…

In my case the delay was tolerable… I didn’t measure it with stopwatch but it would be something like 2-5s which was okay with me. However, the main issue I had encountered myself just yesterday. It requires the exposing of Hass to outside world. I was always doing this and used https by let’s encrypt. But 3 months expired and I can’t generate the certificates anymore, let’s encrypt giving me error. And yeah, ifttt stopped working :frowning: I can remove the https part and make it http but it’s too risky.
So I understand now why people are using emulated_hue. By the way @ronvl , would you please suggest how to integrate emulated_hue with Google home. I mean the Google home part, should it discover itself or I have to create an account with Philips?

Thanks

well when I set this up GH discovered the emulated_hue and it just worked and is still working…
However I have seen other topics on this forum were people raised the issue that with the latest version of GH you need to supply a philips account…

The philips apps and website do not discover the emulated_hue…

I use a mixture of both emulated_hue and IFTTT for lighting as I find that they both have their uses and although using scenes works with emulated_hue I find IFTTT to deal with it better and in my experience the delay from IFTTT is no more or less than emulated_hue. I have all my scenes locked down a single word with IFTTT removing the need to say “turn on” before each scene entity. For example I can say “Hey Google, relax” which sets the scene tied to that entity. Saying “Hey Google, turn on relax” just doesn’t flow properly and it doesn’t feel very natural.

I’ve just been catching up on the forum with regards to the new Philips Hue change, so I cannot really comment on that, however it does feel like I shouldn’t make any changes to my lights now, in fear of dropping Google Home connectivity.

With regards to exposing your HASS instance, I also had trouble with lets encrypt and rather than resolving it, I just created a sub-domain on one of the domain names I own and then used my wildcard certificate to secure HASS when publicly exposed on 443.

Having said that I’ve previously used NameCheap certificates for securing sites and services (this included an earlier version of HASS prior to the certificate expiring). You can pick them up as cheap as £8 for a year here in the UK, but I’d be sure they are just as cheap elsewhere in the world as the UK has extortionate tax! A word of caution though you may have to convert the certificate to the correct format that HASS excepts if you buy a public certificate, however its very simple once you have got the certificate in PFX format with a 1 liner in CMD (Windows) using OpenSSL. I can provide support upon request as and when I get time too.

Thanks @noodlemctwoodle a lot for your detailed reply. Seems the update of Google Assistant broke the setup with emulated_hue. So, I had setup my stuffs with IFTTT. That’s working fine with minimal hassle. My let’s encrypt is also sorted, in fact emulated hue component used port 80 which was the cause for let’s encrypt failure. Disabling hue component also sorted the certificate error…

Thanks Ron for the reply. Yeah, I also found that thread… I would wait until it’s fixed again. Until then ifttt is the saviour…

How do I get hass to use https instead of http? I’ve looked everywhere and can’t see how to do this… :confused:

There are various ways to do it, I personally use a publicly trusted SSL certificate but I believe most people are using Let’s Encrypt. Further details can be found here

1 Like

Hi there

I am not a tech guy so don’t really understand the programming side. I have 8 milight blubs and 3 led strips connected and it works fine with milight app, though the app is unstable.

I have recently bought Google home and wanted to control milight with it, on/off, change colours, dim etc. I have read your thread and it just went over my head with your configurations talks and raspberry pi stuff.

I need some instructions that could help me with this set up and would appreciate your help or any others

thanks

Hey Not sure if you already have home assistant setup but lets do it this way.

First, to get Home assistant up and running, you can follow this guide.


Make sure to watch the video as well a lot of good information in there.

Once you have Home Assistant setup you will need to make sure you are able to control your MIlight from Home Assistant you can follow this guide.

After getting milight working you can setup remote access you need this to make use of IFTTT you can take a look at the first setup video explaining let’s encrypt

Once you did and you are able to access home assistant remotely you can follow the second part of the guide posted here to setup IFTTT.

1 Like

hello thanks for your explanation do you know if this lights works with home assistant? https://pt.aliexpress.com/item/Milight-MR16-spot-light-DC12V-2-4G-Wireless-Dimmable-Led-Bulb-RGB-CCT-Led-Spotlight-Smart/32802604794.html?spm=a2g03.search0104.3.1.5c387fa7ktX3qI&ws_ab_test=searchweb0_0,searchweb201602_2_10152_10151_10065_10344_10068_10547_10342_10343_10340_10548_10341_10696_10084_10083_10618_10307_5711215_10313_10059_10534_100031_10103_10624_10623_443_10622_10621_10620,searchweb201603_25,ppcSwitch_5&algo_expid=638a9b32-69b1-432c-bc32-40bcb4c67586-0&algo_pvid=638a9b32-69b1-432c-bc32-40bcb4c67586&priceBeautifyAB=0

Yes, they work with HA both with ibox and with emulator running on NodeMCU (which I recommend; a single NodeMCU can be used to emulate an “infinite” - read 250 k - ibox units; it is more reliable and can be controlled with MQTT):

http://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/

For MiLight with their ibox unit, you need one ibox for each group of 4 lights (if you have 4 lights in each room and you want to define them individually then you need one ibox for each room). Or define each room as representing one group and can control 4 rooms.

Regardless, with emulator you can run virtual ibox units and have different groups made of any light combination which is useful when needing to turn on/off multiple lights. If you have different 8 lights set in HA and want to turn them all on or off then it will take about 10 seconds (as each light is turned individually). By defining a group of all lights in emulator you can turn that group on or off instantly.

Thanks very much I bought this light and the ibox, I thought by the documentation https://home-assistant.io/components/light.limitlessled/ i wouldn´t need anymore things, do I really need the nodemcu? or is one or another?

Is one or the other.

If using the NodeMCU project then you can setup the light in HA either with the normal Limitless Led component or mqtt json light component (which is more versatile).

I prefer the project I mentioned because the lights are fully in sync with HA. It has also a sniffer so the packages sent by physical remotes (either handheld or wall mounted) are captured and HA is updated.

Thanks very much so with the nodemcu project you can have real feedback from the lights?

Real feedback means a 24/7 full-duplex connection between controller and light bulb which I think that neither Philips Hue has. Or have a light sensor located near the light bulb and have it reporting if the state of the bulb has changed (is doable with LDR and a NodeMCU running OpenMQTT, see below)

Otherwise, sending a package from the NodeMCU running MiLight Hub has a 98%+ chance of changing the light which I think is reasonable enough. Also, for a larger house two of these units might be needed to ensure coverage. Anyway, a packet repeat can be done in HA in order to ensure the bulb has received the command.