Emulated Hue suddenly stopped working with Echo Dot V2

I asked Amazon customer support about why the firmware was not listed on the website and try never gave me a straight answer about it. Just told me to speak to their tech support to fix the issue.

Everything works with port 80 exept Alexa answers with switches etc that “It seems that * is malfunctioning”. Previously it worked fine without any listen_port configured but couple of days ago it broke.

I have echo dot gen1 and gen2 echos…No devices discovered when using port 8300…all existing devices malfunctioning before I deleted them.

Setting emulated hue to port 80 allows devices to be discovered but they malfunction after one use. Function is not supported.

First they appear as lights and work correctly then after a few minutes they become lights with “colour” attribute and wont respond correctly.

Running v 96.0 and also tried 98.2

I have the same story and solution as many of the posts above.

Home Assistant 0.82.1 with emulated Hue, combined with Amazon Echo version 1 (and also Echo Dot v1) speakers have been working fine with voice control for almost a couple of years. Alexa stopped working yesterday with “that device is offline”. Hue emulation was working fine (tried a few different Hue clients), it was the Amazon voice control that was not.

Checked firmware and I have different firmware on each device:

Echo
Device software version 645582720

echo dot
Device software version 644580520

other echo dot

Device software version 645583020

I edited “configuration.yaml” as per https://www.home-assistant.io/components/emulated_hue/ to add a listen_port (of 80), I also added host_ip (not sure if that was needed or not - EDIT removed host_ip and still working). As this is now running on port 80 under Linux on a Raspberry Pi (v1 :scream:) I needed to issue:

    sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python3.5

after following the softlinks for /srv/homeassistant/bin/python3 - this is documented right at the end of https://www.home-assistant.io/components/emulated_hue/

Restarted and Alexa voice control was working again (with caveats), no need to rediscover or add devices.

My Alex routines are working fine (that turn on/off a bunch of devices). I’ve had a few instances where the speaker responds with “That value is out of range for device NAME OF DEVICE” and also “Sorry that device appears to be malfunctioning” after the switch/light changed the way I wanted. I mostly use routines and its only been a few minutes of playing with a couple of my lights/switches that get used but I’m not seeing the same problem @Jonde is seeing where it stops working .

3 Likes

Thank you, clach04. Adding listen_port: 80 and restarting HA made my Dots/Alexa work again with my lights. No more stubbing my toes in the dark! :slight_smile:

With listen_port: 80 my alexa - HA connection is not broken. It works but like you said, Alexa is not seeing devices properly (“Deivce seems to malfunction”). So I got everything working when I added the listen_port: 80 but Alexa is just saying “wrong” answer to my request even though it does what I ask.

Finally got Alexa to recognize homeassistant emulated hue devices. Configured emulated hue to listen on port 80. Used putty to enter command “sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8300”. That command eliminated permission error when trying to bind on port 80. As others report, Alexa sometimes successfully executes command, but erroneously says that the device is not responding. Erroneous response is not for homeassistant devices registered as “light”, but is for those registered as other than “light” (e.g. input_boolean and switch).

edit: running hassbian 72.1 on Raspberry Pi 3

1 Like

I tried setting it to listen to port 80 butt after reboot, nothing’s changed.

If I run sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8300, will this break my Google mini since it’s running on port 80?

I wonder if that’s why I can’t get it to work running on port 80.

@swiftvic best guess is you have something else running on 80 or you ran in to permission problems. Connecting to the port or running netstat on the server may help you debug.

@Jonde I had an interesting evening messing with my “working” system.

The voice notes from Alexa about either:

That value is out of range for device DEVICE_NAME

or:

Sorry, DEVICE_NAME appears to be malfunctioning

Even though they did work as expected was starting to bother me.

I ended up removing a bunch of (emulated hue) devices from the Alexa application by deleting them - I could not find a way to do that easily en-masse.

I also ended up removing the config/emulated_hue_ids.json file and re-discovering my devices. I ended up with duplicates :frowning: I did not find a wonderful solution to that so kept cleaning up manually (https://community.smartthings.com/t/alexa-duplicating-hue-lights-but-philips-skill-disabled/111570/2) .

I also switched one of my highly used devices from a switch to a light - in case that had an impact.

After a few restarts and deletes I ended with the wrong names in Alexa app (and checking logs Alexa was still attempting to access old Hue ids, that no longer existed). So finally deleted almost every emulated hue device from Alex and renaming the ones I needed to the correct name and I’m back up and running withOUT the annoying voice problem.

With the older release of the emulated hue I’m seeing Tracebacks where Alexa is sending in old hue ids and then the lookup fails. These seem benign (I added a None check to homeassistant/components/emulated_hue/hue_api.py to supress the traceback (in HueOneLightStateView().get, the hass.states.get(entity_id) call can accidentally pass in None - this is a non-issue in headrevs as this is reported correctly https://github.com/home-assistant/home-assistant/blob/1bd22a129bc7db7babf2e9c2b85ef1af0885b7f0/homeassistant/components/emulated_hue/hue_api.py#L202 ).

I’m now wishing I’d not originally made use of the expose_by_default=true option, hindsight is 20-20 :wink:

1 Like

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.