Emulated Hue Not Working

Never mind!!! it all works now … don’t ask me how but emulated hue just started working for some reason.

Same thing, wonder if it has something to do with the software update they pushed to the Echo. Also that error you’re seeing I believe is caused by HA thinking you are running an actual Hue hub and trying to connect.

1 Like

Mine started working as well. Not sure when but all devices are seen in Alexa! - DAMN! Spoke too soon. I had it forget all devices and groups and now won’t discover any again… argh… frustrating.

I had a similar issue that went away after I pinged my Amazon Echo from the RPi that HA is running on. Echo doesn’t respond to pings, but I confirmed that ARP was working (“arp -a” at the command line), so devices were able to reach other.

After the ping, I did a discovery on the Echo and everything showed up. It might be a coincidence, but it’s worth a try.

1 Like

Hey, guys!
Is this supposed to work on Windows? I get WinError 10049 “The requested address is not valid in its context”.
Don’t know what to do with it.

Hey CCostan. Do this.

1 Clear devices
2 Reinitialize HA-Bridge
3 change your emulated_hue: section in configuration.yaml to only show emulated_hue:

So if at first it was something like

emulated_hue:
  host_ip: 192.168.0.10
  listen_port: 8300
  expose_by_default: true
  exposed_domains:
    - light

change it to

emulated_hue:

4 Do a restart of HA via Developers Tools - Services
5 Discover Devices in your Alexa App
6 Forget Devices you don’t need.
7 change your emulated_hue: section in configuration.yaml back into:

emulated_hue:
  host_ip: 192.168.0.10
  listen_port: 8300
  expose_by_default: true
  exposed_domains:
    - light

5 Do another restart of HA via Developers Tools - Services
6 Start talking sweet to your “other woman” Alexa.

You will want to do the following

When you say:

2 Reinitialize HA-Bridge

…you mean?

I’m having similar problems with the Emulated Hue component, am I missing a HA Bridge component? I don’t have anything like that configured…

It means that you have to have HA-Bridge installed.

One you have done that go to HA-Bridge control panel in your browser and reinitialize bridge under Bridge Control

I have my HA on a windows 10 machine, echo is not getting any device discovered. The reason is because HA is on windows?

tried this, they see each other, but nothing, no discovery

Very strange – My Emulated Hue configuration is simple:

# Emulated Hue
emulated_hue:
  host_ip: x.x.x.x

x.x.x.x is the IP address of my RPi.

Trying this without the HA Bridge, I am on windows. Still no luck in discovering

Sorry to resurrect this thread, but I have the same issue - but slightly different symptoms:

  • emulated_hue used to work fine
  • now Alexa does not discover anything anymore
  • But I can still control the devices that once got discovered
  • http://:8300/description.xml looks ok
  • http://:8300/api/pi/lights shows 500 internal server error

My config:

emulated_hue: host_ip: [raspberry IP removed] expose_by_default: true exposed_domains: - group - input_boolean - media_player - switch - scene

Any ideas what this could be?

I just updated to 0.33.4, before that the /api/pi/lights call just produced an empty response, no error - the rest of the behaviour was the same.

Edit:

  • I realized not all previously discovered devices work. Actually, only one Lightify Switch works (connected to the Hue bridge, but the bridge does not offer it to Alexa - it only works through HASS). The LG hombot and Yamaha receiver don’t work anymore via Alexa, she claims the hub these devices are connected to is offline :frowning:
  • When I remove (comment) the whole emulated_hue section, both description.xml and api/pi/lights get a 404 error (makes sense), when I even only add the line “emulated_hue:”, the description.xml works, api/pi/light shows the 500 error - so it’s not related to my settings.

I’m still stuck and would appreciate any idea…

I found errors in home-assistant.log:

16-12-10 22:51:57 homeassistant.components.light.hue: Error connecting to the Hue bridge at x.x.x.x 16-12-10 22:54:18 aiohttp.web: Error handling request Traceback (most recent call last): File "/home/homeassistant/.homeassistant/deps/aiohttp/server.py", line 265, in start yield from self.handle_request(message, payload) File "/home/homeassistant/.homeassistant/deps/aiohttp/web.py", line 96, in handle_request resp = yield from handler(request) File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro res = yield from res File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/http/__init__.py", line 400, in handle result = handler(request, **request.match_info) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/emulated_hue/hue_api.py", line 69, in get json_response[number] = entity_to_json(entity) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/emulated_hue/hue_api.py", line 255, in entity_to_json ATTR_EMULATED_HUE_NAME, entity.attributes[ATTR_FRIENDLY_NAME]) KeyError: 'friendly_name'

The first line appears at startup of HASS, the rest every time I call the /api/pi/lights URL and see the 500 internal server error. I did not change the set-up of my Raspberry Pi, but now updated HA to 0.34.4, but no change.

Any help is highly appreciated!

The problem has disappeared, after I rolled back the configuration.yaml to the default one and piece by piece added my stuff back in again. Now I’m back to my recent set-up and everything seems to work. This is really weird…

The KeyError issue happens if you’re exposing input booleans to emulated hue but they do not contain a friendly name. This has been fixed and should* be part of the next release.

I’m a bit confused. The emulated_hue component doesn’t need Home Automation Bridge. Correct ?

1 Like

Correct. Home Automation Bridge is unrelated to HASS, but it can achieve some of the same things.

Hm, still not working here… After what I described above, I though I was fine and it was Alexa’s fault not to discover any devices, but she’ll find anything else, only not the emulated_hue of home assistant.
Hue itself and some fauxmo emulated devices work fine.

Now I gave up on emulated hue and set up HA Bridge, but I don’t get that to work either… I configured a sample device, but using the “Test ON/OFF” buttons does not show any reaction. How do I debug HA Bridge in such case?
And is there a better way of configuring devices in HA Bridge that exist in HASS? It is so annoying to configure everything in two places… I really wish I could get emulated_hue to work again…