Emulated Hue suddenly stopped working with Echo Dot V2

That is really interesting! Thank you for sharing this. Will have to take a look at my setup also :slight_smile: In the beginning I had expose_by_Default=true too :smiley:

You say adding port 80. Remove port 8300 or just add a second listen port on 80?

@clach04 so I was able to get it to work after running the line:
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python3.5 ,

Thank goodness. :sweat_smile:

That’s the good news, bad news I’m still getting the “device is not working, please check it’s power supply”. Even though the switch did turn on, it’s just not showing in the Alexa app that it turned on.

I did try the following:

  1. Remove all the lights in my Alexa app, every single one related to emulated hue.
  2. Delete the emulated_hue_ids.json file.
  3. Reboot my pi
  4. Rediscover my emulated hue lights
  5. Configure each one

Everything looked good up until I click on them to “turn ON”.

Light turns on but I get the “Server is unresponsive” text, and I can’t turn off the light from the Alexa app… (not a huge deal since I use HA for everything. However, if I speak to the Alexa app, it will turn off the light with no issues.

I mean I can live with this… for now I guess. Just a bit annoying. :triumph:

@revelstone77

I removed port 8300 and added 80. The default is port 8300 even if you did not add: listen_port: 8300. So just add listen_port: 80

As @swiftvic noted, adding port 80 actually replaces the default of 8300. Emulated hue does not support listening on multiple ports but you can make emulate that with an iptables mapping like @swiftvic’s previous post.

I thought I could live with it too and then got fed up with the annoying voice :slight_smile: which is why I ended up purging my old devices from Alexa. Its a day later and the annoying voices have not come back after the cleanup :slight_smile:

I posted Getting Amazon Echo/Alexa to forget emulated Philips Hue components to see if anyone has tips for removing old Hue devices but web interface and manually removing was my best option.

I have the same issue but I have Echo v2 firmware 645583020. Is there any reliable solution how to solve it? I have read this post and suggestions, but no is working for me. I replaced port 8300 to 80 and something like Xiaomi plugs sometimes works but hue bulb not, so quite unstable.

My v2 dots updated yesterday morning and hue stopped working. I changed
listen_port: 8300 to listen_port: 80, restarted HA then went to the alexa.amazon.com website, not the app, and forgot all devices. Rediscovered devices and everything seems good. Glad this post was here :slight_smile:
thanks

I tried this, but there’s still the voice complaining how the device is not supporting this (but obviously it does).

I am already using port 80 for a Webserver, so the fix didn’t work for me. Am I lost now with this’s issue? Or is there still a possibility?

I use the virtualenv installation on a Rpi but run also a Webserver (Port 80) on it with a regular webpage.

(MainThread) [homeassistant.components.emulated_hue] Failed to create HTTP server at port 80: [Errno 13] error while attempting to bind on address ('192.168.31.39', 80): permission denied

any idea?

That’s exactly the same issue i have. You have already a web server running that uses Port 80

yes also 8300 did not working any more idea?

For me last night everything stopped working again… and suddenly there was old copies of all my lights (Royal Philips Electronics) deleting these using the Alexa website (“forget” them) and running discovery again added back working copies of each light.

so, i changed the listen port to 80 and restarted. no luck. Went to the alexa website and forgot all the devices. did a rediscover and now i have nothing. This really sucks…

Yes, no solution without a cloud… :unamused:

Maybe I should add… I did not change the listen port and also on 0.98.5

So, I to have been having the same problems. I went to the web site after changing my port to 80, did the discovery and everything show up again. However now when I ask alexa to turn on a light, the light goes on the turns off and alexa says the “device doesn’t support requested value”. I am about ready to pull my hair out. Anyone run into the same thing and have a suggested fix?

2 Likes

This might help. So as with everyone else my emulated hue just stopped working through alexa the other night. Finally got around to looking at it today. Removed all my faked hue devices from alexa and tried to rediscover. No joy. I followed the advice here and switched from port 8300 to 80 and alexa was able to rediscover them. Lights turn on and off but intermittently alexa will claim that the lights are unresponsive. Checked my home assistant log and I’m seeing the error below. The key piece being the last line, which suggests that alexa is asking for brightness information which home assistant doesnt seem to want to return. So presumably alexa is asking for lights to be turned on but the report back to alexa of the status of the lights is failing?

2019-09-09 00:47:32 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
    return await handler(request)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 112, in handle
    result = await result
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/emulated_hue/hue_api.py", line 231, in put
    parsed = parse_hue_api_put_light_body(request_json, entity)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/emulated_hue/hue_api.py", line 397, in parse_hue_api_put_light_body
    return (result, brightness) if report_brightness else (result, None)
UnboundLocalError: local variable 'report_brightness' referenced before assignment

I didn’t see the same thing in my log but see the following

2019-09-08 17:04:07 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/budslamp/POWER: ON
2019-09-08 17:04:07 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/budslamp/POWER: b’ON’
2019-09-08 17:04:08 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/budslamp/POWER: OFF
2019-09-08 17:04:08 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/budslamp/POWER: b’OFF

I did find a discussion on what you are seeing but I’m not getting the same results. All my devices are flashed with Tasmota and are sonoff basic’s.