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
72.67k stars 30.43k forks source link

ISY994 Integration fails in 2021.6.0 and 2021.6.2 #51533

Closed cs9p closed 3 years ago

cs9p commented 3 years ago

The problem

ISY994 integration reports "Retrying setup: ISY Could not parse response, poorly formatted XML." All ISY devices report unavailable.

What is version of Home Assistant Core has the issue?

2021.6.0 and 2021.6.2

What was the last working version of Home Assistant Core?

2021.5.? (maybe 2021.5.2)

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ISY994

Link to integration documentation on our website

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

Example YAML snippet

Upgraded from 2021.5.? to 2021.6.0 when the problem started. Was working fine forever until upgrade.  No changes at ISY end.  Tried restarting home assistant, deleting and re-adding isy integration, upgrading to 2021.6.2. ISY is on same network as HA using http.  No problem accessing ISY directly from web browser. All ISY devices are Insteon.

Anything in the logs that might be useful for us?

==== 2021.6.2 startup log
2021-06-05 14:16:31 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-05 14:16:31 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration keymaster which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-05 14:16:38 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.
2021-06-05 14:16:42 WARNING (MainThread) [slixmpp.basexmpp] Legacy XMPP 0.9 protocol detected.
2021-06-05 14:16:43 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2021-06-05 14:16:43 ERROR (MainThread) [pyisy] ISY Could not parse response, poorly formatted XML.: NetworkResources
2021-06-05 14:16:43 WARNING (MainThread) [homeassistant.components.isy994] Error processing responses from the ISY; device may be busy, trying again later
2021-06-05 14:16:43 WARNING (MainThread) [homeassistant.config_entries] Config entry 'ISY Home (192.168.70.21)' for isy994 integration not ready yet: ISY Could not parse response, poorly formatted XML.; Retrying in background
2021-06-05 14:16:57 ERROR (MainThread) [homeassistant.components.zeroconf] Home Assistant instance with identical name present in the local network
2021-06-05 14:16:58 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 403
2021-06-05 14:16:59 ERROR (MainThread) [pyisy] ISY Could not parse response, poorly formatted XML.: NetworkResources
2021-06-05 14:16:59 WARNING (MainThread) [homeassistant.components.isy994] Error processing responses from the ISY; device may be busy, trying again later
2021-06-05 14:17:11 ERROR (MainThread) [pyisy] ISY Could not parse response, poorly formatted XML.: NetworkResources
2021-06-05 14:17:11 WARNING (MainThread) [homeassistant.components.isy994] Error processing responses from the ISY; device may be busy, trying again later
2021-06-05 14:17:33 ERROR (MainThread) [pyisy] ISY Could not parse response, poorly formatted XML.: NetworkResources
2021-06-05 14:17:33 WARNING (MainThread) [homeassistant.components.isy994] Error processing responses from the ISY; device may be busy, trying again later
2021-06-05 14:17:38 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 403
2021-06-05 14:18:14 ERROR (MainThread) [pyisy] ISY Could not parse response, poorly formatted XML.: NetworkResources
2021-06-05 14:18:14 WARNING (MainThread) [homeassistant.components.isy994] Error processing responses from the ISY; device may be busy, trying again later

Additional information

=== More info on the above log errors Error processing responses from the ISY; device may be busy, trying again later 2:18:14 PM – (WARNING) Universal Devices ISY994 - message first occurred at 2:16:43 PM and shows up 5 times

ISY Could not parse response, poorly formatted XML.: NetworkResources 2:18:14 PM – (ERROR) /usr/local/lib/python3.8/site-packages/pyisy/networking.py - message first occurred at 2:16:43 PM and shows up 5 times

Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 403 2:17:38 PM – (ERROR) Google Assistant - message first occurred at 2:16:58 PM and shows up 2 times

Home Assistant instance with identical name present in the local network 2:16:57 PM – (ERROR) Zero-configuration networking (zeroconf)

Config entry 'ISY Home (192.168.70.21)' for isy994 integration not ready yet: ISY Could not parse response, poorly formatted XML.; Retrying in background 2:16:43 PM – (WARNING) config_entries.py

Error doing job: Task was destroyed but it is pending! 2:16:43 PM – (ERROR) runner.py

probot-home-assistant[bot] commented 3 years ago

isy994 documentation isy994 source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

Hey there @bdraco, @shbatm, mind taking a look at this issue as its been labeled with an integration (isy994) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

cs9p commented 3 years ago

I did a wireshark capture and the problem is with ISY. I don't know why the problem didn't show up prior to 2021.6.0. It occurred when ISY994 integration does a GET /rest/networking/resources. If the name of the resource has an ampersand in it, ISY does not properly escape it, causing an XML error. Removing the ampersand from the resource name fixes the problem.

bdraco commented 3 years ago

Please report the missing escaping to UDI so they can adjust the ISY firmware where needed.