Emulated_hue breaking changes in 0.108

Hi,

my emulated_hue config broke with 0.108 and I can’t figure out what’s still wrong with it:
So my basic config looks like this:

emulated_hue:
  advertise_ip: 192.168.10.8
  upnp_bind_multicast: true
  host_ip: 192.168.10.8
  listen_port: 80
  advertise_port: 80
  expose_by_default: false
  exposed_domains:
    - input_boolean
    - script
    - switch

For entities customizations, I replaced all the emulated_hue_hidden: keys with hidden:, e.g. (in customize.yaml):

switch.thinkpad:
  friendly_name: Thinkpad
  hidden: false
  icon: mdi:laptop-windows

I get no errors verifying the config, but still after restarting HA, a curl http://192.168.10.8:80/api/pi/lights returns only an empty pair of braces.

What am I missing?

Sebastian

You’re not following the instructions. Hidden in customization is no longer a thing. Everything is done through the emulated hue component.

if you want to expose items you need to use the filters to do that, see how the example has hidden inside the configuration for emulated hue? Not inside the customize section?

# Example configuration.yaml entry
emulated_hue:
  host_ip: 192.168.1.186
  listen_port: 8300
  advertise_ip: 10.0.0.10
  advertise_port: 8080
  off_maps_to_on_domains:
    - script
    - scene
  expose_by_default: true
  exposed_domains:
    - light
  entities:
    light.bedroom_light:
      name: "Bedside Lamp"
    light.ceiling_lights:
      hidden: true

Thanks a lot, I completely missed that it’s not only a change of the attribute name.
I modified my config accordingly and now it works :slight_smile:

Sebastian

Mine is also broken after upgrading to 0.108. My config seems to be ok:

emulated_hue:
   expose_by_default: false
   advertise_port: 80
   entities:
     light.tv:
       hidden: false
     light.cable_tv:
       hidden: false
     light.apple_tv:
       hidden: false

I used to have more exposed entities but change to just that. As per instructions I did a backup and then deleted the emulated_hue_ids.json file. Rebooted the HA VM. Then I used the alexa app to forget and re-discover my devices but the result was very, very strange. First, all my older devices are discovered again. I “grep” for “hidden” or “emulated_hue_hidden” and the only place I found then was on the above config file (no leftovers of old configurations). The http://<ha_ip>:80/api/pi/lights json shows only the 3 lights above also.

The second problem is that none of them works. Alexa says that the device is not responding. A tcpdump shows that my echo asks for a wrong URL: “GET /api/12345678901234567890/lights/22” which does not exist. it should be something like /api/pi/lights/22, right?

any clues?

Did you ever find a solution to this? Mine was working for awhile and the last few weeks has been failing. I’ve done everything you did but when I discover I get 4 and 5 entries. Some of my entries work and some do not. I have 49 total entries so I think it should work ok.

I would try going to: https://alexa.amazon.com/spa/index.html
On a computer… not from a mobile device…
And try deleting the devices there and rediscovering… also someone in another thread suggested the “forget all” button did not retain the removal and they had to delete each device individually… I’ll try to find the post…

Thanks for the quick reply! I’ll try that out. I was using the web interface but was not deleting individually.

Also, you may want to make sure you have no old skills linked that you may have forgot about… in the Alexa app if you go in the settings of the device it will tell you where it is coming from… the web based version for me didn’t always have an explicit source, some were just blank in that line …

That description was my own entry… but the top one I circled should tell you the source…

Also… yours will not say “Home Assistant” like mine… I don’t remember what the Emulated Hue shows up as… it may be “Hue Hub” or something like that… I am using the Alexa Smart Home Skill, that’s why mine says “Home Assistant”

I went ahead and disabled nearly all my Alexa skills. I had a home assistant one that I guess I tried to setup a long time ago but it is gone now. I removed the Hue skill as well and the wemo skill. I deleted the emulated_hue.json file so that it recreated again. I even deleted the logging database and had it recreated. No luck. I downgraded my Docker container to 0.115.2 and tried 0.114.4 with no luck. It definitely worked with those versions. The only thing I can think that might be an issue is I setup Home Assistant on a different computer which has a different IP. However, my router port forwards 443 to 8123 and 80 to 80 of the HA Docker container. That all seems to be working correctly.

If I go to http:///api/pi/lights everything shows up just one time like I would expect. Besides You've received an Alexa Link is there any other place I can go to clear out my amazon account? Is there a master reset? Some of the devices that are zwave that show up do work. I wonder if 49 is just too many devices to use and it gets confused.

Any chance you had a wink hub or any other kind of device that could possibly be coming from? I found multiple old skills in mine that were still associated… are any of the duplicates lights that are coming from both the Hue… also once you link a Hue to Alexa it is a pain to actually remove… you have to go to the Hue Developer page and unlink them… let me find the link… I just had to do the same recently… it’s somewhere in here… you can find all authorized applications…
https://account.meethue.com/
I just don’t remember where the page is… you previously had to do it manually with api commands but it is now web-based…

I forgot to mention that mine show up as “Royal Phillips Electronics smart device”

That’s what mine showed up as from the original emulated hue, but I’m pretty sure one of the updates in the last year or so to correct the brightness level issues ended up changing how they showed up to something else… so you deleted everything? Even those and you still get duplicates ?

I finally found a solution in this thread How to efficiently flush the Hue (solved)

I had to reset everything. I deregistered all my alexa’s and factory reset them. Even then the one I was using, my original one, I just could not get completely reset. It still brought back all those duplicate entries. The Echo’s apparently store their own data on them. The good news is now it is working and no duplicates. I am throwing away that second gen echo. It is worthless.

However, not quite everything is working. Some of the “lights” in my lights.yaml that I was exposing as an emulated_hue isn’t working with Alexa. I am using a platform template with switches. I give them a name like “COOKING TIME” so I can say “Alexa turn on Cooking time” so it will run a scene that turns all my kitchen lights to bright. That is not working now but did work a few weeks ago. They are exposed in the /api/pi/lights but Alexa just won’t add them for some reason. I’m not sure the best way to have Alexa run a scene.

It looks like this

- platform: template
    switches:
      cooking_time:
        friendly_name: "COOKING TIME"
        value_template: "{{ is_state('cooking_time', 'on') }}"
        turn_on:
          service: scene.turn_on
          entity_id: scene.scene_cooking_time
        turn_off:
          service: scene.turn_on
          data:
            entity_id: scene.scene_kitchen_off

When I was still using Emulated hue for me it seemed I could only expose lights… I used to have input_booleans and switches exposed but at some point it stopped working… I ended up making all my stuff into template lights just like you have for the template switches…

The whole reason I started messing with my setup was because some of my template switches quit working not that long ago. I found the solution in this thread and it consisted of me adding this to my emulated hue section in my configuration.yaml. It basically adds a brightness component to switches and Alexa sees them properly. Everything is back to working normally again.

lights_all_dimmable: true