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-2113 unsupported #89173

Closed namezys closed 1 year ago

namezys commented 1 year ago

The problem

Hello.

For a long time, my family used integration denonavr. It works but it can get stuck. Right now I decided to investigate issues and found a lot of errors in log. Also, I realized that my model is unsupported. And there is no telnet suppport.

Model: Denon AVR-2113

I increased the log level to debug.

If somebody can help me I can fix the code by myself. However, I'm not strong enough to understand whole source code by myself.

What version of Home Assistant Core has the issue?

2023.2.2

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

denonavr

Link to integration documentation on our website

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

Diagnostics information

home-assistant_denonavr_2023-03-04T23-27-51.459Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-03-05 00:21:45.359 DEBUG (MainThread) [denonavr.foundation] Changing variable _volume to value -42.5
2023-03-05 00:21:45.359 DEBUG (MainThread) [denonavr.foundation] Changing variable _muted to value off
2023-03-05 00:21:55.320 DEBUG (MainThread) [denonavr.api] Content for /goform/AppCommand.xml endpoint: b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<tx><cmd id="1">GetAllZonePowerStatus</cmd><cmd id="1">GetAllZoneSource</cmd><cmd id="1">GetRenameSource</cmd><cmd id="1">GetDeletedSource</cmd><cmd id="1">GetSurroundModeStatus</cmd></tx><tx><cmd id="1">GetToneControl</cmd><cmd id="1">GetAllZoneVolume</cmd><cmd id="1">GetAllZoneMuteStatus</cmd></tx>'
2023-03-05 00:21:55.357 DEBUG (MainThread) [denonavr.foundation] Changing variable _input_func to value DVD
2023-03-05 00:21:55.358 DEBUG (MainThread) [denonavr.foundation] Changing variable _sound_mode_raw to value MULTI CH IN
2023-03-05 00:21:55.359 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _tone_control_status for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.360 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _tone_control_adjust for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.360 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _bass_level for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.360 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _bass for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.361 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _treble_level for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.361 DEBUG (MainThread) [denonavr.foundation] Failed updating attribute _treble for zone Main
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 524, in async_update_attrs_appcommand
    set_value = xml.find(search_strings[i]).text
AttributeError: 'NoneType' object has no attribute 'text'
2023-03-05 00:21:55.361 DEBUG (MainThread) [denonavr.foundation] Some attributes of zone Main not found on update: {AppCommandCmd(cmd_id='1', cmd_text='GetToneControl', name=None, param_list=None, set_command=None, response_pattern=(AppCommandResponsePattern(update_attribute='_tone_control_status', add_zone=False, suffix='/status', get_xml_attribute=None), AppCommandResponsePattern(update_attribute='_tone_control_adjust', add_zone=False, suffix='/adjust', get_xml_attribute=None), AppCommandResponsePattern(update_attribute='_bass_level', add_zone=False, suffix='/basslevel', get_xml_attribute=None), AppCommandResponsePattern(update_attribute='_bass', add_zone=False, suffix='/bassvalue', get_xml_attribute=None), AppCommandResponsePattern(update_attribute='_treble_level', add_zone=False, suffix='/treblelevel', get_xml_attribute=None), AppCommandResponsePattern(update_attribute='_treble', add_zone=False, suffix='/treblevalue', get_xml_attribute=None))): None}
2023-03-05 00:21:55.362 DEBUG (MainThread) [denonavr.foundation] Changing variable _volume to value -42.5
2023-03-05 00:21:55.362 DEBUG (MainThread) [denonavr.foundation] Changing variable _muted to value off

------------

2023-03-05 00:12:04.351 ERROR (MainThread) [homeassistant.components.denonavr.media_player] Error Returned document contains HTML occurred in method async_update for Denon AVR receiver
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/asyncstdlib/_lrucache.py", line 408, in __call__
    result = self.__cache[key]
KeyError: <asyncstdlib._lrucache.CallKey object at 0x7f625281ae30>

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 156, in wrapper
    return await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/denonavr/media_player.py", line 256, in async_update
    await self._receiver.async_update_audyssey()
  File "/usr/local/lib/python3.10/site-packages/denonavr/denonavr.py", line 203, in async_update_audyssey
    await self.audyssey.async_update()
  File "/usr/local/lib/python3.10/site-packages/denonavr/audyssey.py", line 79, in async_update
    await self.async_update_audyssey(
  File "/usr/local/lib/python3.10/site-packages/denonavr/audyssey.py", line 88, in async_update_audyssey
    await self.async_update_attrs_appcommand(
  File "/usr/local/lib/python3.10/site-packages/denonavr/foundation.py", line 498, in async_update_attrs_appcommand
    xml = await self._device.api.async_post_appcommand(
  File "/usr/local/lib/python3.10/site-packages/denonavr/decorators.py", line 99, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/asyncstdlib/_lrucache.py", line 411, in __call__
    result = await self.__wrapped__(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/denonavr/decorators.py", line 47, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/denonavr/api.py", line 166, in async_post_appcommand
    self.check_xml_validity(request, xml_root)
  File "/usr/local/lib/python3.10/site-packages/denonavr/api.py", line 246, in check_xml_validity
    raise AvrInvalidResponseError(

Additional information

No response

home-assistant[bot] commented 1 year 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!

Code owner commands Code owners of `denonavr` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign denonavr` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


denonavr documentation denonavr source (message by IssueLinks)

namezys commented 1 year ago

In tickets, I found script: denon_receiver_xml.py there are results AVR-2113.zip

ol-iver commented 1 year ago

This does not look too bad. Apparently, your receiver does not support tone control, but this should not be a big issue.

Please run the denon_receiver_xml.py script again when your receiver is stuck in HA.

namezys commented 1 year ago

@ol-iver Thank you. I will run as soon as I get it.

BTW, is it possible to disable sending tune control command?

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.