Alexa not discovering new emulated hue devices

I have been using emulated hue with my 2 amazon echo devices for some time. It has abut 10 entities which are working fine even now but the problem is that if i add a new entity to this list, it is not discovered by alexa. I have checked all the troubleshooting methods in the guide like checking for returns from port 80 and all, its all working as intended, I hope some one would help. This is my config.

emulated_hue:
  host_ip: 192.168.1.2
  listen_port: 80
  expose_by_default: false
  entities:
    fan.living_room_fan:
      name: "fan123"
      hidden: false    
    input_boolean.notify_bell:
      name: "Sn Bell"
      hidden: false    
    input_boolean.notify_su_bell:
      name: "Sn Bell"
      hidden: false

Did you find a solution for this? I’m having the same problem, no new devices are being discovered.

No, tried resetting alexa and all but nothing is working.

When I set up Alexa initially and when it discovered my current devices, my network was only on one “dumb” router. Then I moved to Ubiquiti and VLAN separation, firewall etc. I suspect this might have played a role. Do you use Vlans by any chance?

I also upgraded my router but no Vlans. I have tried emulated hue addon also, it is also not getting detected. This is most certainly a network thing.

@sheminasalam I just had luck and got this working. Either related to the fact that I updated HA to version 2021.11.4, OR that I enabled on my Unifi AP the option “Enable multicast enhancement (IGMPv3)”, OR that I disabled on my Edgerouter all firewall rules for the iot devices subnet.
I am 99% sure it is network related, so one of the last two options has to be.
Good luck.

Emulated hue hasn’t been updated in years because the hue api for old hubs hasn’t changed. It’s a 95% chance that it’s your networking changes that fixed the issues.

1 Like

Thanks for update but mu multicast settings are already tuned to IGMPv3.

I even tried a new router but the same issue.

Maybe firewall on your HA server?

If it was firewall, then I should not be able to get response from the urls.

http://<HA IP Address>:80/description.xml

and

http://<HA IP Address>:80/api/pi/lights

I dont know how that can happen.

Now its detecting. I had to add the Upnp Integration in Home Assistant
:smiley: :smiley:

Yes and no. You can directly access ha_ip:80, but Alexa first sends a broadcast message across the network to discover the emulated_hue, and only after that it connects to it directly to ip:80.
So what I’m saying maybe you have some firewall blocking those broadcasts.

posted at the same time as you did. hehe congrats! :partying_face:

1 Like

Hello,

I am seeing this exact same issue. I have enabled uPnP on my pfSense router. I have installed the uPnP integration in Home Assistant as well (although, not sure if that is supposed to make a difference).

But whatever I try, the Echo devices just do not discover a new device I have added to emulated_hue. (Previously discovered devices work fine, though)

http://<HA IP Address>:80/api/pi/lights shows the new device.

Any ideas?

Had the same/similar problem a few days ago and got it sorted out as described in my post

In summary the solution was to disable and reenable UPnP and leave all echo dots unplugged for a while.

Thanks! I ended up moving to the Alexa Smart Home Skill.

Had the same issue , ended up disabling the AsusWRT integration, after that everything went smooth.
Also Upnp integration installed.

Hi Folks, as so many others have, I am battling the emulated_hue for Alexa feature. I have read countless threads and spent quite a bit of time troubleshooting before posting here.

I initially added the emulated Hue a few days ago so that we could use Alexa voice commands to turn on/off our lights. Everything went smooth and worked fairly quickly.

THEN… I changed a device on my HA side, and or, deleted a device from Alexa. Everything went down hill quickly from here.

First of all, many threads talk about the …/config/.storage/emulated_hue.ids file, and many threads repeat the theme of “I cannot find it” yet very few actually say this is because the .storage directory is hidden by default and must be un-hidden. Man, that alone could have saved me and many others some time!

I am at a point now where I have deleted all of my emulated hue devices from my Alexa and I cannot for the life of me get back on track to rediscover them. Here is what I have, or have done:
I have deleted the /.storage/emulated_hue.ids file. When I do an Alexa discover, a new and what appears to be correct file is generated. Here is a look at the content:

{
  "version": "1",
  "minor_version": 1,
  "key": "emulated_hue.ids",
  "data": {
    "1": "light.island_lights",
    "2": "light.counter_lights",
    "3": "light.desk_lamp",
    "4": "light.marks_bedside_light",
    "5": "light.mollys_bedside_light",
    "6": "light.top_of_stairs_lamp",
    "7": "switch.closet_light",
    "8": "switch.garage_lights",
    "9": "switch.patio_rope_lights",
    "10": "climate.fireplace_livingroom"
  }
}

My configuration.yaml content is the same as when I originally set it up, and it was working:

emulated_hue:
  host_ip: 192.168.0.34
  listen_port: 80
  expose_by_default: false
  exposed_domains:
    - light
    - switch
    - climate
  entities:
    light.island_lights:
      name: "island lights"
      hidden: false  
    light.counter_lights:
      name: "counter lights"
      hidden: false
    light.desk_lamp:
      name: "desk lamp"
      hidden: false
    light.marks_bedside_light:
      name: "marks bedside light"
      hidden: false
    light.mollys_bedside_light:
      name: "mollys bedside light"
      hidden: false
    light.top_of_stairs_lamp:
      name: "top of stairs lamp"
      hidden: false
    switch.closet_light:
     name: "closet light"
     hidden: false
    switch.garage_lights:
      name: "garage light"
      hidden: false
    switch.patio_rope_lights:
      name: "patio rope light"
      hidden: false
    climate.fireplace_livingroom:
      name: "livingroom fireplace"
      hidden: false
    climate.fireplace_basement:
      name: "basement fireplace"
      hidden: false

When I try to load the URL- http://<My_IP>:80/api/pi/lights, this returns a server error 500

When I load http://<My_IP>:80/description.xml it appears to return a valid response of:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

1

0

http://192.168.0.34:80/

urn:schemas-upnp-org:device:Basic:1

Home Assistant Bridge (192.168.0.34)

Royal Philips Electronics

http://www.philips.com

Philips hue Personal Wireless Lighting

Philips hue bridge 2015

BSB002

http://www.meethue.com

001788FFFE23BFC2

uuid:2f402f80-da50-11e1-9b23-001788255acc

I have repeatedly deleted the emulated_hue.ids file, rebooted my Pi, cleared all devices in Alexa and even opened my Amazon account and deleted my smart home device history.

I saw a comment about adding the Integration for UpNP so I added that and it appears to see my google mesh router and report traffic ok.

Next, I unplugged all my Echo Dots (I think they are gen 2 or 3) except for one which I factory reset, and unplugged all my Sonos ONE’s which have alexa enabled, then repeated all the steps above, clearing everything. Then plugged in the one Alexa dot I factory reset. When I set it back up, it did remember it’s name (garage echo) but I definitely factory reset the device.

From here, I did a discover and it still does not find any of these emulated Hue lights. I am using the discover Hue V1 round device option, the same as I did when it initially worked.

I see some log file errors related to this but do not know how to interpret them:

Log Details (ERROR)
Logger: aiohttp.server
Source: components/emulated_hue/hue_api.py:673
First occurred: 1:51:25 PM (12 occurrences)
Last logged: 2:02:43 PM

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py”, line 435, in _handle_request
resp = await request_handler(request)
File “/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py”, line 504, in _handle
resp = await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 133, in handle
result = handler(request, **request.match_info)
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py”, line 221, in get
return self.json(create_list_of_entities(self.config, request))
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py”, line 845, in create_list_of_entities
json_response: dict[str, Any] = {
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py”, line 846, in
config.entity_id_to_number(state.entity_id): state_to_json(config, state)
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py”, line 736, in state_to_json
state_dict = get_entity_state_dict(config, state)

Any suggestions on what the issue(s) or resolution would be are appreciated. Thanks.

My Emulated Hue is working again. And I no longer get the Server error 500 when loading the URL http://<My_IP>:80/api/pi/lights

While I am not positive this was the solution, the last actions I did before Alexa and my emulated Hue started working again were:

I commented out the domain “- climate” in my configuration.yaml file along with the two associated fireplace thermostats. Then repeated all my steps of deleting the .storage/emulated_hue.ids, rebooting my pi, clearing my alexa devices, then running an alexa discovery and the next time I ran a discovery (still with only one of my freshly factory reset echo Dots), all of my lights that are exposed in my emulated hue were discovered