core: Denon AVR integration fails with 403 error for all service calls

The problem

Denon AVR integration (denonavr) fails with 403 errors.

Environment

  • Home Assistant Core release with the issue: 0.117.2
  • Last working Home Assistant Core release (if known): 0.117.2
  • Operating environment (OS/Container/Supervised/Core): Raspbian 10 (buster)/Container (:stable/09997d088d3e)
  • Integration causing this issue: denonavr
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/denonavr/

Problem-relevant configuration.yaml

media_player:
  - platform: denonavr
    host: 192.168.1.34
    zone1: true
    zone2: true

Traceback/Error logs

2020-11-10 17:31:23 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to POST command at end point /goform/AppCommand.xml
2020-11-10 17:31:23 ERROR (SyncWorker_4) [DenonAVR] Getting renamed and deleted sources failed.
2020-11-10 17:31:23 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXml.xml
2020-11-10 17:31:23 ERROR (ThreadPoolExecutor-0_1) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXml.xml
2020-11-10 17:31:23 ERROR (ThreadPoolExecutor-1_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXmlStatus.xml
2020-11-10 17:31:23 ERROR (ThreadPoolExecutor-1_1) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXml.xml
2020-11-10 17:31:25 ERROR (ThreadPoolExecutor-0_0) [DenonSSDP] During DenonAVR device identification, when trying to request http://192.168.1.34:8080/description.xml the following error occurred: HTTPConnectionPool(host='192.168.1.34', port=8080): Read timed out. (read timeout=2)
2020-11-10 17:31:25 ERROR (ThreadPoolExecutor-0_0) [DenonAVR] Unable to get device information of host 192.168.1.34, can not use the serial number as identification
2020-11-10 17:31:25 ERROR (ThreadPoolExecutor-2_1) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXml.xml
2020-11-10 17:31:25 ERROR (ThreadPoolExecutor-2_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formMainZone_MainZoneXmlStatus.xml
2020-11-10 17:31:25 ERROR (SyncWorker_4) [DenonAVR] Missing status information from XML of Main for: Power, InputFuncSelect, Mute, MasterVolume
2020-11-10 17:31:30 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to POST command at end point /goform/AppCommand.xml
2020-11-10 17:31:30 ERROR (SyncWorker_4) [DenonAVR] Getting renamed and deleted sources failed.
2020-11-10 17:31:30 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone2_Zone2XmlStatus.xml
2020-11-10 17:31:30 ERROR (ThreadPoolExecutor-4_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone2_Zone2XmlStatus.xml
2020-11-10 17:31:32 ERROR (ThreadPoolExecutor-3_0) [DenonSSDP] During DenonAVR device identification, when trying to request http://192.168.1.34:8080/description.xml the following error occurred: HTTPConnectionPool(host='192.168.1.34', port=8080): Read timed out. (read timeout=2)
2020-11-10 17:31:32 ERROR (ThreadPoolExecutor-3_0) [DenonAVR] Unable to get device information of host 192.168.1.34, can not use the serial number as identification
2020-11-10 17:31:32 ERROR (ThreadPoolExecutor-5_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone2_Zone2XmlStatus.xml
2020-11-10 17:31:32 ERROR (SyncWorker_4) [DenonAVR] Missing status information from XML of Zone2 for: Power, InputFuncSelect, Mute, MasterVolume
2020-11-10 17:31:37 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to POST command at end point /goform/AppCommand.xml
2020-11-10 17:31:37 ERROR (SyncWorker_4) [DenonAVR] Getting renamed and deleted sources failed.
2020-11-10 17:31:37 ERROR (SyncWorker_4) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone3_Zone3XmlStatus.xml
2020-11-10 17:31:37 ERROR (ThreadPoolExecutor-7_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone3_Zone3XmlStatus.xml
2020-11-10 17:31:39 ERROR (ThreadPoolExecutor-6_0) [DenonSSDP] During DenonAVR device identification, when trying to request http://192.168.1.34:8080/description.xml the following error occurred: HTTPConnectionPool(host='192.168.1.34', port=8080): Read timed out. (read timeout=2)
2020-11-10 17:31:39 ERROR (ThreadPoolExecutor-6_0) [DenonAVR] Unable to get device information of host 192.168.1.34, can not use the serial number as identification
2020-11-10 17:31:39 ERROR (ThreadPoolExecutor-8_0) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to GET request at end point /goform/formZone3_Zone3XmlStatus.xml
2020-11-10 17:31:39 ERROR (SyncWorker_4) [DenonAVR] Missing status information from XML of Zone3 for: Power, InputFuncSelect, Mute, MasterVolume
2020-11-10 17:31:54 ERROR (SyncWorker_8) [DenonAVR] Host 192.168.1.34 returned HTTP status code 403 to POST command at end point /goform/AppCommand.xml
2020-11-10 17:31:54 ERROR (SyncWorker_8) [DenonAVR] Getting renamed and deleted sources failed.

Additional information

Tried with both denon and denonavr platforms.

This seems to have started today. Restarted container to refresh some unrelated integrations and started seeing errors. State is not being updated in UI and cannot control input select, volume, etc.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

I might try disabling the integration for now to see if I stop having this issue with the app. I’m wondering if the AVR is considering the HA integration as a DDoS attack and shutting down the API. If it looks like the HA integration is somehow involved, I’ll open a new issue. Otherwise, I am going to go with RS232 control instead of this integration. There is also another web API used by the built-in web server. Anything is better than cycling power.

@JPHutchins @ACrazyConcept I finished my integration. This is my first custom component and first real project in python so I don’t have any unit tests and the structure might not be great, but I wanted to get it working. I have switches you can setup for source selection (I was doing this with input_boolean before). You can also setup lights to keep things simple with Emulated Hue. Media Player is minimal and just supports power, volume, mute, and source select. There is also a sensor to help find codes/commands.

We should work together on creating a baseline TCP (telnet) client. Mine is a bit specific for the AVR but could easily use a base class for the read/write and just extend that for the AVR-specific logic I have. Likewise we can make my sensor, lights and switches generic for telnet too. If we used a factory to create the connection, we could handle telnet and serial with one client and then use that in the serial component and extend that to support the other entities.

@douglampe I agree and I’ve been working on a library that uses the telnet interface (the commands are the same as RS 232 AFAIK.) I should be able to put it on github within a week.

I also use telnet for most commands. Extremely reliable. E.g. I made a volume control in node-red for an IKEA Symfonisk which would send MVUP or MVDOWN to the reciever with a frequency of 250ms. Just works. I don’t know if the reciever or telnet has any hard limits, but the 250ms was not due to reaching any, but more so I wouldn’t accidentally turn it up too much.

I had some issues getting the current audio mode, forgot which command it was though. But most likely it was me and not the reciever’s fault.

Ends up this was a local problem. I think there was a firmware update and unplugging and plugging in resolved the issue. As for the config, I was using denon and tried denonavr as I was troubleshooting.