OH2, milights and hue emulation

Ok, I made several pretty simple oversights here and I no longer need the amazon-echo-ha-bridge.

I installed the “hue emulation” in OpenHab and below are the 3 pre-requisites:

  • Paper UI > Extensions > Bindings > Milights 2.0.0
  • Paper UI > Extensions > Misc > Hue Emulation
  • Paper UI > Configuration > Hue Emulation > Configuration and set the pairing to enabled
  • Scan for devices in OH
  • Add ‘things’ from your inbox

I had no idea that the items was a new file that I had to create on my install. Below is my items file:

kodi@kodi:~/docker/openhab/conf/items$ cat kava.items
# Main-181
Switch  Main     "Main" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350718C:0:ledbrightness"}
Switch  Lounge     "Lounge" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350718C:1:ledbrightness"}
Switch  Dining     "Dining" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350718C:2:ledbrightness"}
Switch  Kitchen     "Kitchen" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350718C:3:ledbrightness"}

# Bedrooms-181
Switch  Bedrooms     "Bedrooms" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350714E:0:ledbrightness"}
Switch  Room_1     "Room 1" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350714E:1:ledbrightness"}
Switch  Room_2     "Room 2" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350714E:2:ledbrightness"}
Switch  Room_3     "Room 3" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350714E:3:ledbrightness"}

# Main-151
Switch  Living     "Living" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350710E:0:ledbrightness"}
Switch  TV     "TV" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350710E:1:ledbrightness"}
Switch  Middle     "Middle" [ "Lighting" ] {channel="milight:whiteLed:ACCF2350710E:2:ledbrightness"}

Below I break down the items file format for Hue Emulation as it was something that I was unable to find any documentation on.

Switch      TV                  "TV" 		    [ "Lighting" ]   	{channel="milight:whiteLed:ACCF2350710E:1:ledbrightness"}

OH2 will load all new ‘items’ when the file is saved. You can check your OH2 log to see what has loaded and make changes accordingly. Finally I scanned for devices in Alexa and it found them all.

Now I can simply say “Alexa, turn on Room 2” or “Alexa, turn off Room 2” and it responds almost instantly.

Note: Sometimes comments in the items file stop loading of the items beneath it. For this reason I now remove them on my setup!


Thank you very much for this … was just what I needed.

1 Like

Awesome mate. It really is my pleasure to help you!

The forum helped me so much and I’m glad to give something back!!!

I’ll be updating the above to include dimming and warmth change also. I’ll need a month or so though because I have lot’s of things on my plate.

That’s great! I am trying to achieve the same thing although with the Amazon-echo-HA-bridge. Can I ask where did you get the hue emulation .jar from? I have found the GitHub, but I cant seem to find the compiled version anywhere?


I tried that bridge also but had alot of issues with it so yes the Hue Emulation is better and easier.

I didn’t use the jar. I mentioned how to install it in first post.

  • Paper UI > Extensions > Misc > Hue Emulation
  • Paper UI > Configuration > Hue Emulation > Configuration and set the pairing to enabled

Wow, I didn’t even see the Misc section of paper UI, thank you so much, this is exactly what I’ve been looking for!

No problem!

Took less than a minute to get it all set up and working, as opposed to the 4 hours I’ve spent trying to work out how to POST rest commands to Amazon-Echo-HA-bridge. I will link your post in my previous question, absolutely great guide and thanks again!

My pleasure mate.

Yes, I actuallly had the echo-bridge working in a docker container and spent about a day on it. It is crazy. All those posts should be commented on as they are a hindrance.

I’m using Insteon as it is … Dimming works just fine. I don’t have a color change option with the insteon (I’m not using directly controllable bulbs, just wall switches & dimmers and the like).

It’s astonishingly simple when you know what to do! :slight_smile: and thank you for that.

When the HA skill is approved by Amazon that will provide additional functionality but for now this is awesome!

I agreed however the HA skill will require an internet connection which is no problem (we all have them) but it results in a round robin to the internet and back for each openHAB request to turn the lights on or off.

I think that’s a bit of overkill for me but could help the control when not home…

I agree! But the addition of custom responses and the ability to return information to the user will be a giant bonus. Perhaps it will be possible to use both types of connectivity depending on what we request of the Echo device! What’s really nice about this is we can then programmatically decide how we want to handle the request.

You can do this anyway without the skill. search the forum…I read about it also!

I plan to do lights dim up as the sun sets with IFTTT

Why not use the astro binding to achieve this ? I Use it for controlling my Rollershutters.

I will use that . Thanks for that Astro binding tip!!

Hi sir, as I do not use Amazon Echo and I’m totally new to OH so I was confused in several parts you mentioned:

OH2 will load all new 'items' when the file is saved

Where exactly can I find items loaded by OH2? Because when I access the log file of OH2, I see nothing related to loaded items.

And when you said:

Finally I scanned for devices in Alexa and it found them all.

What exactly how can I scanned for devices in Alexa, I’m now using Alexa +IFTTT as my voice controlling system so forgive me if I don’t understand your method.

Hi, No need to be so formal. I’m no Sir hehe.

You can see any loaded Items in the OH2 web interface Things/Items page. https://mysmarthomeweb.files.wordpress.com/2016/07/milight_result_discovery.png?w=840

Discover devices: https://www.amazon.com/gp/help/customer/display.html?nodeId=201751350

1 Like

OK friend <3 @sir_luddite
When I finished reading the both links you gave, I realize that this method only used with devices which are able connected to WIFI and compatible with Alexa.
As I using IFTTT with alexa, so I can control any items from my .item file (for example I can control a relay + lightbulb connected to arduino…). The only thing I feel annoying about my method is that I have to say the long keyword “Alexa trigger turn on/off abc” and the response from Alexa is “Sending that to IF” sometime sounds a little bit silly. I just want something simple like “Alexa turn on/off abc” and a brief answer like “OK”.

As far as I know, it seems that even amazon ha bridge also need compatible devices and control directly that devices through commands which are said to Alexa device. My purpose is saying command to OH host (raspberry pi 3 running Alexa) => it will control my items and I will send commands from my rasp to arduino nodes => my device changes correspondingly (Just like IFTTT + Alexa but I need more simple command and reply syntax from raspberry). This way I can reduce the cost of setting up my whole system

Anyway to implement a system as my description? Please let me know! Thanks soooo much
If pleased, can you give us the link where to get the milight bulb just like yours?
At last, two silly question:

  1. In your example you order: 'Alexa, turn on Room 1". Is “Room 1” is your item’s tag or is it the display name? I mean, my item is:
Switch Light_GF_Living_Ceiling 		"Living room Ceiling"

So what is my order syntax? “Alexa turn on Living room Ceiling” or “Alexa turn on Light GF Living Ceiling”?

  1. How to tell Alexa report item’s value? For instance I want Alexa to read loudly the temperature of my living room.

What is your alexa device?

“Alexa turn on Living room Ceiling”

1 Like

I installed Alexa on Raspberry pi 3 and it;s working pretty well now with IFTTT service
Thanks for your reply, now I know the syntax but my Alexa system keep saying discovery incompleted