Hue emulator Alexa app only displays one light

Hello,
I am new to openHab,
I am using a rasabry Pi 3 b+
OpenHabian, 24-08-2024

I am trying to get Alexa to operate my lights.
I have the Hue emulator installed.
I have had to reinstall openHab many times and I have tried every thing I can find in the web.

What I have done so far:

  1. Even though the the time is correct on the openHab the time zone on the pi was incorrect, So I have corrected this.
    The date can be checked by using the command “date”.
  2. I have installed nginx as a reverse proxy.
    the config file is:
    http {
    # Basic Settings
    sendfile on;
    tcp_nopush on;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    # SSL Settings
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;
    # Logging Settings
    access_log /var/log/nginx/access.log;
    server {
    listen 80;
    listen [::]:80;
    server_name 192.168.xx.xx;
    access_log /var/log/nginx/access.log;
    location / {
    proxy_pass http://127.0.0.1:8080/;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    }
    location /api {
    proxy_pass http://127.0.0.1:8080/api/;
    }
    }
    }
  3. I have added “Lighting” in to the “Non-Semantic Tags” in the Items UI.
  4. I have changed the “Label” so each one is different.
  5. http://your-openhab-ip/description.xml - shows the XML file
  6. http://your-openhab-ip/api/status showed I have 3 published Lights, All Response & Ours are yes, and I have checked Pairing indicated ON when I set the UI to pairing.
  7. I deleted the “Unique Bridge ID” number then saved and reset the Pi.
  8. Set the “Permanently Emulate V1 Hue Bridge” on.
    When running discovery on Alexa it found 3 items. But when I go to the Alexa app only one is displayed.
    If I ask Alexa to change one of the lights that is not displayed in the app but was found, only the light displayed in the app changes.
    So If the app displays “Kitchen” then when I ask “Living room” to switch the “Kitchen” changes not the “Living room”.
    If I delete the displayed light from the app one of the others that was found is now displayed and this takes over as the one that will work.
    Its like all the light are being seen as the same thing by Alexa.
    In the 192.168.xx.xx/api/testuser/lights. All three lights have different “Uniquid” after the ‘:’ (00-04, 00-0B, 00-0C) The “name” is also different on each light.

At present I can operate just one light with Alexa can anyone help me so I can get Alexa to operate all my lights.
Thank you
Ian

Hello.
Has anyone else seen this stacking of light on Alexa?
Its like there all using the same ID or something like that.

I have moved all my items to .items but with no change.
I have used Wireshark and it seams that the ID’s are different:
Light 1 = uniqueid":“9F:2E:71:62:7A:11:00:00-06
Light 2 = uniqueid”:"9F:2E:71:62:7A:11:00:00-03

If any one could point me to anything else I could try It would be helpful, as I am getting no where at present.
Thank you
Ian

Have you tried deleting all the lights from the Alexa app and then running discovery again?

Hello MikeJMajor.
Thank you for the message but every time I have deleted all the lights from the Alexa app and every time I get the same result. The app shows I have no light connected before the find, but may be it is still remembering them?
I have tried having just two light in the .items and I have tried with six lights and always the same.
I have tried reinstalling OpenHab from scratch as well but I get the same.
I tried asking GPT for assistance but so far I get the same result.
It looks like I am missing something when I am doing the setup but I cant find what that is.
Regards
Ian

@Ian - I’ve had Hue Emulation working perfectly fine controlling 37 lights/switches for many years, and suddenly one of my lights stopped working via voice about a week ago. Everything else continued to function via voice commands. Removing and attempting rediscovery of just the one item didn’t work at all, so I went nuclear and removed every OpenHAB device in the Alexa App, changed the Hue Emulation bridge ID, and retried starting fresh. Currently experiencing the same issues as you described with ‘stacking’ of discovered items ever since. Alexa claims to have discovered only 4 out of the 37 in my case, but as you click into each item (i.e. a Light name in the App) the label changes to something different. Whenever I attempt deleting within the App and a new one immediately appears repeatedly, again with a different name, such as’ Kitchen Lights’, but when clicking on the item in the App it shows up as ‘Bedroom Lights’. I’ve never seen such behavior before, and I don’t believe you are doing anything wrong… Saw you chimed in here too:

In my case, the Amazon Echo after discovery reports 4 devices, but when I remove items from the App, I have to keep doing this loop of deleting stacked items 37 times to get everything removed.

@MikeJMajor - thanks again for helping me a long while back with other Hue Emulation related issues. It seems as though something has changed with how Alexa’s are conducting discovery recently, which clearly has broken integration/discovery with the v4.2.x Hue Emulation binding (can confirm the same behavior with v4.2.0 and the latest v4.2.2), and have had the exact same problems with both gen4 and gen5 Amazon Echos. If the OpenHAB devices were previously discovered, they continued to work with Alexa, but after starting fresh I can confirm rediscovery today is screwy to say the least. Will chime in on this thread too if I come across anything of significance.

Best regards,
d0t

Different issue with this Home Assistant user, but basically describing the same problem with discovery not finding everything as it did before and the ‘stacking’ of discovered devices within the App:

Hello d0t,
i have exactly the same behavior.
Anyone having Hue Emulation still working?
Br
Fritz

Hello,
After 3 weeks working on using the HUE emulator, I have given up using it, and now use HA-Bridge it took just 2 evening.
I did find that “Unique ID to use 9 Octets” had to be set to “true”.
I now have over 15 lights working with Alexa.
Ian

Are you able to look at what unique IDs HA-Bridge is generating?

Last time there were problems we switched over to using nine octets based on what had been done by HA-Bridge.

Looking at their code it seems the device id (integer like ours) is hashed and used to generate the unique ID. So the last eight octets will be based on the device id, whereas with the openHAB ID only the last 2 octets will be based on the device id and the first 7 will always be the same.

Sounds like Alexa has made a change and is now looking at less than 9 octets to consider devices unique.

1 Like

I have this problem too.
Is there any fix out there?
Does it only affect alexa devices? Does google nest work?

Hi Mike,

I have looked at the log and here are 3 ID’s if that helps.
00:5f:93:f9:83:52:4d:ef-3d
00:69:8d:51:a1:9d:8a:12-1c
00:7f:6f:fa:a6:bb:0b:40-80
Ian

Thanks @Ian for sharing!

And @MikeJMajor - your suspicion here was spot on, only 8 octets in the above. For reference, here is a deep link to your comments on the issue back in December 2022:

Glad to help with however possible!

FYI - I ran through the rediscovery processes again twice this evening. Latest v4.2.2 of OpenHAB on top of Openhabian. Changed the Hue Emulation Unique Bridge ID, restarted OpenHAB and cleared the OpenHAB cache, then reran discovery on an Echo, after removing all devices using the Android Alexa App. Similar issues, although this time around, different from a month ago, it did initially discover ~30 of my devices from the binding (vs only 4 as previously mentioned). Nothing has changed related to the OH item tags the Hue Emulation binding is looking for in my setup since.

Unfortunately the ‘stacking’ of the devices discovered within the Alexa App is still an issue, removing one of them through the Alexa App the device many items randomly reappear with the same device name, but when clicking into it (i.e. to delete it again) a different device name shows up as you click into it. This requires MANY taps in the Alexa App to load the device to delete it, repeatedly.

Just a heads up - Alexa App behavior is changing during the discovery process, and has changed further in just the past month. I was briefly able to control some of the discovered devices initially via voice using the Echos and the Alexa App directly, but further attempts to control then eventually failed. At the time, for the light items I could switch off/on, they refused to change diming levels (i.e. “Alexa, Dim Kitchen Lamps to 50%” would fail, but “Alexa, Kitchen Lamps off/on” would work). This is all very different from how it used to work in the past!

I don’t know the Hue Emulator in detail. But FWIW I believe that it is still emulating the Hue API V1. By contrast the real Hue system uses API V2 primarily, and the V1 is still present but deprecated. In other words Philips / Signify are certainly only focussed on V2 for anything new, and Amazon is certainly only really focussed on supporting V2. And furthermore almost every month the V2 is getting added features and V1 is not, so the divergence is increasing every month. Therefore the Hue emulator probably needs a complete rewrite to make it emulate API V2 and TBH there seems to be no evidence that anyone is working on that. So only expect the situation to get worse over time.

1 Like

A fix for this issue has been merged.

3 Likes

@MikeJMajor - you rock!

Where might I find a downloadable version of the bindings JAR file? Assuming I should be able to drop that into /addons directory and use it with openHAB v4.2.2, while awaiting v4.3 to be officially released…

Thanks!

The 4.3 version is working ok for me in the addons folder using OH 4.2.2

https://openhab.jfrog.io/artifactory/libs-snapshot/org/openhab/addons/bundles/org.openhab.io.hueemulation/4.3.0-SNAPSHOT/org.openhab.io.hueemulation-4.3.0-20241122.032509-90.jar

1 Like

Thanks a bunch, Mike!

Pulled that JAR down and my smart home is also back in business over here. :sunglasses:

All exposed openHAB HueEmulation items were picked up via Discovery again, and the Alexa App is displaying/managing them as expected. Also confirmed other aspects such as item level switch/color/dimming/etc. are working too via voice controls.

Possibly related to clearing EVERYTHING related to HueEmulation out and starting fresh, but with my 30+ devices, response times seem better than ever too now. Sub 1 second response times when issuing voice commands throughout the home.

Truly appreciate your time and energy tackling this one!!!

Great, thank you very much!!! It’s working again.
BR