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
71.14k stars 29.81k forks source link

Denon AVR Integration Not Working in 2022.3.3 #67978

Closed kmycek closed 2 years ago

kmycek commented 2 years ago

The problem

My Denon AVR Receiver integration has been a bit flakey, recently. I don't use it every day, nor do I test all integrations on every release. I think this has been going on for a month or two. I noticed that an automation I have to play an internet radio station in my office wasn't working properly this month. I checked my logs, and there are A LOT of instances of this error. It might have something to do with the new media player play action?

What version of Home Assistant Core has the issue?

2022.3.3

What was the last working version of Home Assistant Core?

2021.12.x ???

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Denon AVR Network Receivers

Link to integration documentation on our website

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

Diagnostics information

The Denon AVR Network Receivers integration does not have a diagnostic download feature. I pasted the log into the section below.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.denonavr.media_player
Source: components/denonavr/media_player.py:237 
Integration: Denon AVR Network Receivers (documentation, issues) 
First occurred: March 8, 2022, 11:55:23 PM (28676 occurrences) 
Last logged: 3:45:35 PM

Error Returned document contains HTML occurred in method async_update for Denon AVR receiver
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/asyncstdlib/_lrucache.py", line 306, in wrapper
    result = cache[key]
KeyError: <asyncstdlib._lrucache.CallKey object at 0xffff73fb5520>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/denonavr/media_player.py", line 184, in wrapper
    return await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/denonavr/media_player.py", line 237, in async_update
    await self._receiver.async_update_audyssey()
  File "/usr/local/lib/python3.9/site-packages/denonavr/denonavr.py", line 203, in async_update_audyssey
    await self.audyssey.async_update()
  File "/usr/local/lib/python3.9/site-packages/denonavr/audyssey.py", line 79, in async_update
    await self.async_update_audyssey(
  File "/usr/local/lib/python3.9/site-packages/denonavr/audyssey.py", line 88, in async_update_audyssey
    await self.async_update_attrs_appcommand(
  File "/usr/local/lib/python3.9/site-packages/denonavr/foundation.py", line 522, in async_update_attrs_appcommand
    xml = await self._device.api.async_post_appcommand(
  File "/usr/local/lib/python3.9/site-packages/denonavr/decorators.py", line 96, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/asyncstdlib/_lrucache.py", line 309, in wrapper
    result = await function(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/denonavr/decorators.py", line 44, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/denonavr/api.py", line 166, in async_post_appcommand
    self.check_xml_validity(request, xml_root)
  File "/usr/local/lib/python3.9/site-packages/denonavr/api.py", line 246, in check_xml_validity
    raise AvrInvalidResponseError(
denonavr.exceptions.AvrInvalidResponseError: Returned document contains HTML

Additional information

No response

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

denonavr documentation denonavr source (message by IssueLinks)

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

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

starkillerOG commented 2 years ago

@kmycek have you tried power cycling the receiver?

kmycek commented 2 years ago

I have cycled power to both the Denon and my HA Blue. No change.

kobioneil commented 2 years ago

Im having the same issue. Hopes this gets gets fixed soon, I thoroughly enjoyed using this integration to control my sound system

McGiverGim commented 2 years ago

I don't know if I'm affected too. I had an error in the Denon integration, I removed it and now I can't add it again, but I can't see any log. Simply an error about "it can connect". The receiver is totally accesible via web browser without problem.

EF01 commented 2 years ago

Same issue. Either hard restart of reciever or reload of intergration didn't do anything.

JGrantman commented 2 years ago

I am having some of the same problem. Without even using the Receiver for media I see the following repeated over and over in the logs:

File "/usr/local/lib/python3.9/site-packages/denonavr/api.py", line 166, in async_post_appcommand self.check_xml_validity(request, xml_root) File "/usr/local/lib/python3.9/site-packages/denonavr/api.py", line 246, in check_xml_validity raise AvrInvalidResponseError( denonavr.exceptions.AvrInvalidResponseError: Returned document contains HTML

I have a Denon AVE-E300. I have tried hard resetting the device. I have changed IP address and even reset router, turn off wifi and have only Home Assistant OS and Denon Receiver on network and no difference.

I don't regularly use the receiver other than to turn on/off via Home Assistant but I prefer not having log full of unresolved errors.

Any help is appreciated... thanks!

ol-iver commented 2 years ago

@kmycek did you switch on Update Audyssey settings intentionally? Your receiver might not support it. You can switch it off in configure menu of denonavr integration

JGrantman commented 2 years ago

I tried each of the check boxes individually to see if there was any difference. None. Same error messages in log. Only started happening last month or so... not sure exactly which update but it was in 2022. No issues before this year and I have had the same receiver connected to multiple Home Assistant instances for 2+ years without issue.

ol-iver commented 2 years ago

@JGrantman I don't know if it is the same case for you. You did not post the entire log. It does not show the origin of your error.

kmycek commented 2 years ago

I don't remember switching on the Update Audyssey Settings checkbox - but unchecking it seems to resolve my problem. I have a Denon AVR-X2000. It does have Audyssey features, but perhaps my Denon firmware doesn't support this piece of the integration.