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
73.53k stars 30.71k forks source link

Wemo Unable to get description for other devices when one or more of the devices is disconnected #74553

Closed lishan89uc closed 1 year ago

lishan89uc commented 2 years ago

The problem

Wemo device are not being added or is unavailable with or without discovery on. Static Ip. Multiple devices will fail if one device is unplugged or unable to connect. in this case it is 192.168.0.195

removal of 192.168.0.195 does correct the issue.

What version of Home Assistant Core has the issue?

core- 2022.7.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

WEMO

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wemo/

Diagnostics information

Logger: homeassistant.components.wemo
Source: components/wemo/__init__.py:255
Integration: Belkin WeMo (documentation, issues)
First occurred: 4:44:16 PM (4 occurrences)
Last logged: 4:44:16 PM

Unable to get description url for WeMo at: 192.168.0.123
Unable to get description url for WeMo at: 192.168.0.195
Unable to get description url for WeMo at: 192.168.0.204
Unable to get description url for WeMo at: 192.168.0.206

Example YAML snippet

wemo:
  discovery: false
  static:
    - 192.168.0.121
    - 192.168.0.131
    - 192.168.0.234
    - 192.168.0.100
    - 192.168.0.129
    - 192.168.0.253
    - 192.168.0.206
    - 192.168.0.195
    - 192.168.0.204
    - 192.168.0.123

Anything in the logs that might be useful for us?

This has been happening since April or May. 
http://192.168.0.123:49153/setup.xml
http://192.168.0.204:49153/setup.xml
http://192.168.0.206:49153/setup.xml
all returned results I posted http://192.168.0.123:49153/setup.xml below

Additional information

<root>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:Belkin:device:controllee:1</deviceType>
<friendlyName>Realfan</friendlyName>
<manufacturer>Belkin International Inc.</manufacturer>
<manufacturerURL>http://www.belkin.com</manufacturerURL>
<modelDescription>Belkin Plugin Socket 1.0</modelDescription>
<modelName>Socket</modelName>
<modelNumber>1.0</modelNumber>
<hwVersion>v3</hwVersion>
<modelURL>http://www.belkin.com/plugin/</modelURL>
<serialNumber>XXXXXXXXXXXXXXXXX</serialNumber>
<UDN>uuid:Socket-1_0-XXXXXXXXXXXXXXXXXX</UDN>
<UPC>123456789</UPC>
<macAddress>XXXXXXXXXXXX</macAddress>
<hkSetupCode>XXX-XX-XXX</hkSetupCode>
<firmwareVersion>WeMo_WW_2.00.11565.PVT-OWRT-SNSV2</firmwareVersion>
<iconVersion>0|49153</iconVersion>
<binaryState>0</binaryState>
<binaryOption>1</binaryOption>
<new_algo>1</new_algo>
<iconList>
<icon>
<mimetype>jpg</mimetype>
<width>100</width>
<height>100</height>
<depth>100</depth>
<url>icon.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:Belkin:service:WiFiSetup:1</serviceType>
<serviceId>urn:Belkin:serviceId:WiFiSetup1</serviceId>
<controlURL>/upnp/control/WiFiSetup1</controlURL>
<eventSubURL>/upnp/event/WiFiSetup1</eventSubURL>
<SCPDURL>/setupservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:timesync:1</serviceType>
<serviceId>urn:Belkin:serviceId:timesync1</serviceId>
<controlURL>/upnp/control/timesync1</controlURL>
<eventSubURL>/upnp/event/timesync1</eventSubURL>
<SCPDURL>/timesyncservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:basicevent:1</serviceType>
<serviceId>urn:Belkin:serviceId:basicevent1</serviceId>
<controlURL>/upnp/control/basicevent1</controlURL>
<eventSubURL>/upnp/event/basicevent1</eventSubURL>
<SCPDURL>/eventservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:firmwareupdate:1</serviceType>
<serviceId>urn:Belkin:serviceId:firmwareupdate1</serviceId>
<controlURL>/upnp/control/firmwareupdate1</controlURL>
<eventSubURL>/upnp/event/firmwareupdate1</eventSubURL>
<SCPDURL>/firmwareupdate.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:rules:1</serviceType>
<serviceId>urn:Belkin:serviceId:rules1</serviceId>
<controlURL>/upnp/control/rules1</controlURL>
<eventSubURL>/upnp/event/rules1</eventSubURL>
<SCPDURL>/rulesservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:metainfo:1</serviceType>
<serviceId>urn:Belkin:serviceId:metainfo1</serviceId>
<controlURL>/upnp/control/metainfo1</controlURL>
<eventSubURL>/upnp/event/metainfo1</eventSubURL>
<SCPDURL>/metainfoservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:remoteaccess:1</serviceType>
<serviceId>urn:Belkin:serviceId:remoteaccess1</serviceId>
<controlURL>/upnp/control/remoteaccess1</controlURL>
<eventSubURL>/upnp/event/remoteaccess1</eventSubURL>
<SCPDURL>/remoteaccess.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:deviceinfo:1</serviceType>
<serviceId>urn:Belkin:serviceId:deviceinfo1</serviceId>
<controlURL>/upnp/control/deviceinfo1</controlURL>
<eventSubURL>/upnp/event/deviceinfo1</eventSubURL>
<SCPDURL>/deviceinfoservice.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:smartsetup:1</serviceType>
<serviceId>urn:Belkin:serviceId:smartsetup1</serviceId>
<controlURL>/upnp/control/smartsetup1</controlURL>
<eventSubURL>/upnp/event/smartsetup1</eventSubURL>
<SCPDURL>/smartsetup.xml</SCPDURL>
</service>
<service>
<serviceType>urn:Belkin:service:manufacture:1</serviceType>
<serviceId>urn:Belkin:serviceId:manufacture1</serviceId>
<controlURL>/upnp/control/manufacture1</controlURL>
<eventSubURL>/upnp/event/manufacture1</eventSubURL>
<SCPDURL>/manufacture.xml</SCPDURL>
</service>
</serviceList>
<presentationURL>/pluginpres.html</presentationURL>
</device>
</root>
probot-home-assistant[bot] commented 2 years ago

Hey there @esev, mind taking a look at this issue as it has been labeled with an integration (wemo) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


wemo documentation wemo source (message by IssueLinks)

esev commented 2 years ago

Hi @lishan89uc,

Are there any other errors or exceptions in the logs? The Unable to get description url for WeMo at: error message occurs only for static devices, and should indicate that the device is being skipped. Other devices should still be handled when that happens. HA should retry the connection once every 5 minutes.

lishan89uc commented 2 years ago

The issue is quite hard to reproduce when I am trying to reproduce it. However this will normally happen after an update so I'll wait for 2022.7.1 and update this issue then. the previous logs for some reason was wiped by HA.

lishan89uc commented 2 years ago

It seems a bunch of things fail at roughly the same time. This might have something to do with network. However wemo is the only one that did not reload correctly afterwards.

Error fetching roku data: Invalid response from API: Timeout occurred while connecting to device
12:14:50 AM – (ERROR) Roku - message first occurred at 12:14:23 AM and shows up 2 times
Unable to get description url for WeMo at: 192.168.0.121
12:14:38 AM – (ERROR) Belkin WeMo - message first occurred at 12:14:38 AM and shows up 4 times
Unable to find referenced entities switch.fan or it is/they are currently not available
12:14:35 AM – (WARNING) helpers/service.py
Failed to determine cast type for host <unknown> (<urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)>) (services:{ServiceInfo(type='mdns', data='HT-Z9F-d174121af37c5a9aceae5faa952b7bdc._googlecast._tcp.local.')})
12:14:30 AM – (WARNING) /usr/local/lib/python3.10/site-packages/pychromecast/dial.py
Entity sensor.left_side_of_tv_plug_13_1d (<class 'custom_components.emporia_vue.sensor.CurrentVuePowerSensor'>) with state_class total_increasing has set last_reset. Setting last_reset for entities with state_class other than 'total' is not supported. Please update your configuration if state_class is manually configured, otherwise report it to the custom component author.
12:14:28 AM – (WARNING) Sensor - message first occurred at 12:14:28 AM and shows up 34 times
Configuration of Nest integration in YAML is deprecated and will be removed in a future release; Your existing configuration (including OAuth Application Credentials) has been imported into the UI automatically and can be safely removed from your configuration.yaml file
12:14:28 AM – (WARNING) Nest
Received Type.ACK from <aiocoap.transports.tinydtls.DTLSClientConnection object at 0x7f7891ab90>, but could not match it to a running exchange.
12:14:27 AM – (WARNING) /usr/local/lib/python3.10/site-packages/aiocoap/messagemanager.py - message first occurred at 12:14:13 AM and shows up 2 times
Setup of camera platform foscam is taking over 10 seconds.
12:14:24 AM – (WARNING) Camera
Setup of media_player platform dlna_dmr is taking over 10 seconds.
12:14:23 AM – (WARNING) Media player
homeassistant.components.ecobee.weather::EcobeeWeather is overriding deprecated methods on an instance of WeatherEntity, this is not valid and will be unsupported from Home Assistant 2023.1. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
12:14:13 AM – (WARNING) Weather
[030...ccf] Connect to 192.168.0.107 failed
12:14:08 AM – (ERROR) LocalTuya (custom integration)
lishan89uc commented 2 years ago
Logger: homeassistant.components.wemo
Source: components/wemo/__init__.py:255
Integration: Belkin WeMo (documentation, issues)
First occurred: 1:13:59 AM (3 occurrences)
Last logged: 1:13:59 AM

Unable to get description url for WeMo at: 192.168.0.121
Unable to get description url for WeMo at: 192.168.0.206
Unable to get description url for WeMo at: 192.168.0.123

it seems even after removing the 192.168.0.195 device this error still persist this time. Also I have confirmed that setup.xml was reachable on all 3 addresses.

lishan89uc commented 2 years ago

@esev I am not getting a new error. I am starting to think that it is related to my router also, since restarting the router and home assistant temporary fixes the issue. Below is the new log message

Could not turn off for yshsbdvs (Error communicating with yshsbdvs after 3 attempts. Giving up.)
Logger: pywemo.ouimeaux_device.api.service
Source: components/wemo/switch.py:136 
First occurred: 12:16:37 AM (4 occurrences) 
Last logged: 12:16:37 AM

Error communicating with yshsbdvs at 192.168.0.253:49153, HTTPNotOkException('Received status 500 for http://192.168.0.253:49153/upnp/control/basicevent1') retry 0
Error communicating with yshsbdvs at 192.168.0.253:49153, HTTPNotOkException('Received status 500 for http://192.168.0.253:49153/upnp/control/basicevent1') retry 1
Error communicating with yshsbdvs at 192.168.0.253:49153, HTTPNotOkException('Received status 500 for http://192.168.0.253:49153/upnp/control/basicevent1') retry 2
Error communicating with yshsbdvs after 3 attempts. Giving up.
esev commented 2 years ago

I don't think this new error is related to the network. It looks like the Wemo itself is responding, but it is responding with an error. I've only seen this once on the devices I have at home. Holding the button at the very bottom of the switch for 2 seconds restarts it. That cleared the issue when it happened to me.

lishan89uc commented 2 years ago

Its worked! However this seems to be the issue that is making other wemo devices not work, with the above error only 4/10 devices loaded on restart. With the issue being a wemo device problem i don’t see a potential fix for this. Is that at least a way to skip affected device so that others would load?

issue-triage-workflows[bot] commented 1 year 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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.