home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.02k stars 31.06k forks source link

Emulated Hue devices not found by new 2nd Gen Amazon Echo #10287

Closed alexbussa closed 5 years ago

alexbussa commented 7 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.56.2

Python release (python3 --version): 3.6.3

Component/platform: Emulated Hue

Description of problem: The new 2nd generation Amazon Echo is not detecting devices exposed through the Emulated Hue component.

Expected: I expect the 2nd generation Amazon Echo to detect the same devices exposed through the Emulated Hue component as are detected by the 1st generation Amazon Echo.

Problem-relevant configuration.yaml entries and steps to reproduce:

emulated_hue:
  host_ip: 10.0.1.10
  listen_port: 8300

Adding New Devices

  1. Add Emulated Hue component to configuration.yaml
  2. Start Home Assistant
  3. Forget/remove any devices that Alexa may already have in the Smart Home list
  4. In the Alexa app (iOS, or Android): Menu -> Smart Home -> Add Device
  5. The Alexa app will say "No new devices found."

Controlling a Device Added by a Gen 1 Echo

  1. Add Emulated Hue component to configuration.yaml
  2. Start Home Assistant
  3. In the Alexa app (iOS, or Android): Menu -> Smart Home -> Select a device from the list
  4. The Alexa app will display a banner at the top of the screen that says "There was a problem.
  5. In the Alexa app, tap on the icon to toggle the device's state
  6. The Alexa app will update the banner to say "Server is unresponsive.

Traceback (if applicable):

No errors displayed in logs

Additional info: I have tried a number of Emulated Hue configurations, including just "emulated_hue:"

I've found the following to be true both with my full HA configuration and on a fresh install of HA with only Emulated Hue and Lights in the configuration.

In the logs, I noticed:

Switching between devices, I found:

hareeshmu commented 7 years ago

Same here. I just got my new Gen 2 Echo. Its not discovering any devices in HA.

Here is logs related to emulated_hue:

Nov 04 10:16:26 raspberrypi3 hass[16463]: 2017-11-04 10:16:26 INFO (MainThread) [homeassistant.loader] Loaded emulated_hue from homeassistant.components.emulated_hue Nov 04 10:16:26 raspberrypi3 hass[16463]: 2017-11-04 10:16:26 INFO (MainThread) [homeassistant.loader] Loaded emulated_hue from homeassistant.components.emulated_hue Nov 04 10:16:38 raspberrypi3 hass[16463]: 2017-11-04 10:16:38 INFO (MainThread) [homeassistant.setup] Setting up emulated_hue Nov 04 10:16:38 raspberrypi3 hass[16463]: 2017-11-04 10:16:38 WARNING (Thread-20) [homeassistant.components.emulated_hue] Listen IP address not specified, auto-detected address is 192.168.1.106 Nov 04 10:16:38 raspberrypi3 hass[16463]: 2017-11-04 10:16:38 WARNING (Thread-20) [homeassistant.components.emulated_hue] When targeting Google Home, listening port has to be port 80 Nov 04 10:16:38 raspberrypi3 hass[16463]: 2017-11-04 10:16:38 INFO (MainThread) [homeassistant.setup] Setup of domain emulated_hue took 0.0 seconds. Nov 04 10:16:38 raspberrypi3 hass[16463]: 2017-11-04 10:16:38 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=emulated_hue> Nov 04 10:17:19 raspberrypi3 hass[16463]: 2017-11-04 10:17:19 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.relay_2_1, old_state=None, new_state=<state switch.relay_2_1=off; assumed_state=False, emulated_hue_name=gate light, description=, device=/dev/ttyUSB0, child_id=1, V_LIGHT=off, battery_level=0, node_id=2, friendly_name=Gate Light, emulated_hue_hidden=False @ 2017-11-04T10:17:19.622809+05:30>> Nov 04 10:17:19 raspberrypi3 hass[16463]: 2017-11-04 10:17:19 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.relay_2_1, old_state=None, new_state=<state switch.relay_2_1=off; assumed_state=False, emulated_hue_name=gate light, description=, device=/dev/ttyUSB0, child_id=1, V_LIGHT=off, battery_level=0, node_id=2, friendly_name=Gate Light, emulated_hue_hidden=False @ 2017-11-04T10:17:19.622809+05:30>>

Nov 04 10:18:12 raspberrypi3 hass[16463]: 2017-11-04 10:18:12 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:12 raspberrypi3 hass[16463]: 2017-11-04 10:18:12 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:12 raspberrypi3 hass[16463]: 2017-11-04 10:18:12 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:12 raspberrypi3 hass[16463]: 2017-11-04 10:18:12 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:13 raspberrypi3 hass[16463]: 2017-11-04 10:18:13 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:13 raspberrypi3 hass[16463]: 2017-11-04 10:18:13 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:14 raspberrypi3 hass[16463]: 2017-11-04 10:18:14 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False) Nov 04 10:18:14 raspberrypi3 hass[16463]: 2017-11-04 10:18:14 INFO (MainThread) [homeassistant.components.http] Serving /description.xml to 192.168.1.119 (auth: False)

hareeshmu commented 7 years ago

http://ip:8300/description.xml

<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.1.106:8300/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
<friendlyName>HASS Bridge (192.168.1.106)</friendlyName>
<manufacturer>Royal Philips Electronics</manufacturer>
<manufacturerURL>http://www.philips.com</manufacturerURL>
<modelDescription>Philips hue Personal Wireless Lighting</modelDescription>
<modelName>Philips hue bridge 2015</modelName>
<modelNumber>BSB002</modelNumber>
<modelURL>http://www.meethue.com</modelURL>
<serialNumber>1234</serialNumber>
<UDN>uuid:2f402f80-da50-11e1-9b23-001788255acc</UDN>
</device>
</root>

http://ip:8300/api/pi/lights

{"15": {"modelid": "HASS123", "name": "gate light", "state": {"bri": 0, "on": false, "reachable": true}, "swversion": "123", "type": "Dimmable light", "uniqueid": "switch.relay_2_1"}}

noxhirsch commented 7 years ago

Same error here! description.xml and api/pi/lights are available, but none of my Echos can find any device.

shreram commented 7 years ago

Same issue here. I deleted emulated_hue_ids.json file and restarted HA. But still same issue.

When I browse to http://192.168.86.61:8300/api/pi/lights it displays all entities. Earlier it used to display 10 to 15 entities for which I added 'emulated_hue_hidden: false'

Configuration file:

emulated_hue a:
  type: alexa
  expose_by_default: false
  listen_port: 8300
  host_ip: 192.168.86.61
  exposed_domains:
    - light
    - switch
    - input_boolean

I browsed to Alexa web interface and did forget all devices (I was getting 'Server is Unresponsive' error for all of them) and tried to discover again but it didn't find emulated hue. https://alexa.amazon.com/spa/index.html#appliances

shreram commented 7 years ago

I resolved this issue by changing the configuration to like below. I got this tip from @arsaboo

emulated_hue:
  type: alexa
  expose_by_default: false

After that, restarted HA and I got only entities that have 'emulated_hue_hidden: false' tag. http://192.168.86.61:8300/api/pi/lights

Ex:

    switch.switch_one:
      friendly_name: 'Master bedroom light'
      emulated_hue_hidden: false
      emulated_hue_name: "light 4"

Log file:

2017-11-05 10:21:19 WARNING (SyncWorker_12) [homeassistant.components.emulated_hue] Alexa type is deprecated and will be removed in a future version
2017-11-05 10:21:19 WARNING (SyncWorker_12) [homeassistant.components.emulated_hue] Listen IP address not specified, auto-detected address is 192.168.86.61
hareeshmu commented 7 years ago

It didn't work for me :(

hareeshmu commented 7 years ago

At last got it working :)

emulated_hue:
expose_by_default: false
host_ip: 192.168.1.106
listen_port: 80

Set the listen port to 80 and gave the permission to python for port access.

https://community.home-assistant.io/t/emulated-hue-instruction/11072/9

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

Restart HA and perform discover devices from Alexa.

reymtv commented 7 years ago

I changed port to 80 but still not happened and I can not enable skill "Philips Hue" on Alexa. So have any way to control my Home-assistant by Alexa

Ordep commented 7 years ago

Same error here! description.xml and api/pi/lights are available, but my Echo cant find any device. Tried all above ways, but no luck.

I Wonder if there is any way of debugging the issue?

PaulAnnekov commented 6 years ago

Amazon Echo 2nd gen + listen_port: 80 works for me like a charm. 8300 port was not working, devices were not discovered.

ricard0g0mes commented 6 years ago

I have the same problem. Can see the description.xml and api/pi/lights just fine but alexa can't find anything :(

homesmarty commented 6 years ago

I can't seem to get port 80 working on hassio - no sudo access :( Any ideas how to solve this? Alternatively, are there any other ports new Echo devices would scan?

JovenPan commented 6 years ago

It doesn't work to change to 80 port. Anyone who has successfully found device can post a full configuration.yaml?

SebVoss commented 6 years ago

hareeshmu, can you please specify how you gave the permission to python for port access?

When I use port 8300 I can see the description.xml and api/pi/lights file. Once I enter listen_port: 80 in the configuration.yaml, I can't see those files anymore.

hareeshmu commented 6 years ago

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

arigit commented 6 years ago

Same issue and same symptoms, Echo 2nd gen. After changing to port 80, I did get one (out of many) attempts to work and discovery of devices worked; however, operating those devices was odd at best (I could switch-on but not switch off). This is with HA 0.73. Also I am using port 80 for other purposes so this WA doesn't really cut it. Still hoping to find some other way to address

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

balloobbot commented 5 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍