Emulated Hue suddenly stopped working with Echo Dot V2

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.

You must be running an old version. That line no longer exists in hue_api. In fact parse_hue_api_put_light_body is now down 100 lines of code or so and starts in the 420s. I recommend you update.

Petro:

I am on the latest Hassio and Tasmota. Any idea’s why alexa is giving me the results I described above. Driving me nuts and wife is very upset she can’t turn the lights on and off with Alexa.

thanks

I was responding to @Mick_Kerrigan.

I don’t have tasmota devices. Do your lights span 0-255 for brightness?

The device connected to the sonoff basic is a light and does not have a smart bulb. Not sure where you would configure light span?

Cheers will do @petro, I was thinking that might be case. I wonder if something similar is happening in newer versions though, i.e. alexa is able to transmit the request to turn on/off the light, but the acknowledgement of the new status of the light back from homeassistant is why Alexa is getting confused and complaining of unresponsive devices.

I don’t think so. Emulated hue had some issues in 95 or 96 and was changed quite a bit.

i changed back to 8300 and discovered. everything shows, but i still have no control. just device isnt responding, check its network connection and power supply

I to changed back to 8300 and got the same result. On port 80 alexa responds by turning on the light but then immediately turns them off and complains "device doesn’t support requested value” as I described in previous posts.

Yeah, same problem here but it seems that they’re working on it. Deleting the light does not fix the issue for me.

also see here:

Since emulated hue does not work on me either, then I setup amazon alexa smart home skill on amazon cloud. I follow this web below and manage to generate the skill and link to my echo dot v2.

Echo can discover all my switch but still cannot turn on/off the switch.
It seems this failure not only happen on emulated hue but all philips hue bridge rev.1

Yes, there are a lot of tangents in this thread recently. The root cause of the issue is on Amazon’s end (namely the most recent firmware update on echo dots), not home assistant. This other stuff about “this light not responding, that light not responding” is a previous unfixed issue.

See here for reference:

1 Like

yes but this 5$

I re-enable the skill, and now it gets me 2 virtual devices for each device,
1 philips hue device and 1 switch device. philips hue device still cannot be switched on/off, but switch device function OK.
Alexa Smart Home skill seems not affected by this firmware failure.

Yes, that’s because it doesn’t emulate the hue bridge. The firmware broke the local link between emulated_hue and alexa. Alexa Smart Home Skill goes through AWS and the calls are not local to your network.

that also worked for me with my v2 echo dot. I changed listen_port: 8300 to 80, restarted HA and rediscovered my devices from the alexa.amazom.com website. I tried to discover all my devices with the alexa app that does not work for me. thank you for the trick with alexa.amazon.com :smile:

1 Like

Can someone confirm this. Currently I’m considering going the way though AWS. But it looks like a longer project.

Does the Alexa Smart Home skill only have benefits compared to the emulated hue (if it works)?

I am also seeing this problem. My echo dot just did an update, and there is no longer any communication between the dot and my hassbian machine running .98.5. From what I have gleaned above, the fix is to set listen_port to 80, and I have tried that however, port 80 can only be used by root since it is below 1024.

Is it feasible to run home assistant as root on a hassbian system after it has been run as the homeassistant user until now?

any other ideas how to work around the above on hassbian if running it as root is NOT good?

Thanks!