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 stopped working after upgrading from 0.118.x to 2020.12.0 #44199

Closed dannykreynin closed 3 years ago

dannykreynin commented 3 years ago

The problem

Denon-AVR integration stopped working after upgrading from 0.118.x to 2020.12.0

Environment

Problem-relevant configuration.yaml

Traceback/Error logs


Logger: aiohttp.server
Source: components/denonavr/receiver.py:66
First occurred: 3:55:30 AM (4 occurrences)
Last logged: 3:58:23 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 155, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/denonavr/config_flow.py", line 146, in async_step_confirm
    return await self.async_step_connect()
  File "/usr/src/homeassistant/homeassistant/components/denonavr/config_flow.py", line 160, in async_step_connect
    if not await connect_denonavr.async_connect_receiver():
  File "/usr/src/homeassistant/homeassistant/components/denonavr/receiver.py", line 33, in async_connect_receiver
    if not await self._hass.async_add_executor_job(self.init_receiver_class):
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/denonavr/receiver.py", line 66, in init_receiver_class
    self._receiver = denonavr.DenonAVR(
  File "/usr/local/lib/python3.8/site-packages/denonavr/denonavr.py", line 344, in __init__
    self.update()
  File "/usr/local/lib/python3.8/site-packages/denonavr/denonavr.py", line 524, in update
    self.ensure_configuration()
  File "/usr/local/lib/python3.8/site-packages/denonavr/denonavr.py", line 516, in ensure_configuration
    self._support_update_avr_2016 = support_avr_2016.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/denonavr/denonavr.py", line 644, in _update_avr_2016
    executor.submit(self._audyssey.update())
  File "/usr/local/lib/python3.8/site-packages/denonavr/audyssey.py", line 109, in update
    self.dynamiceq = bool(int(param.text))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
## Additional information
probot-home-assistant[bot] commented 3 years ago

denonavr documentation denonavr source (message by IssueLinks)

landloos commented 3 years ago

Can confirm I'm also seeing this issue.

merwone commented 3 years ago

Same here

pops106 commented 3 years ago

Same issue, removed the integration and tried to re-add but got the same error.

Gerben321 commented 3 years ago

Can confirm it as well: https://community.home-assistant.io/t/denon-avr-no-longer-working/255109

davidmonro commented 3 years ago

Looks like there's already been a pull request merged into the dev tree, https://github.com/home-assistant/core/pull/44194

tofuSCHNITZEL commented 3 years ago

I can confirm that #44194 fixes the issue

DanskerUS commented 3 years ago

Same issue here. Will this fix be in 2020.12.1 ?

Jeroen-83 commented 3 years ago

Today I updated from 0.118.x to 2020.12.7 and now my Marantz NR1605 stopped working. I hope this can be fixed very fast. Is there a way to go back to 0.118.something? (running HassOS 4.17)

davidmonro commented 3 years ago

Hmm. It hasn't been merged into the 'rc' branch in github which doesn't bode well for it being in .1. Anyone know what the process is for getting things into point releases?

davidmonro commented 3 years ago

Oh. .1 got released and it wasn't in it :(

tofuSCHNITZEL commented 3 years ago

you can download the zip of the dev branch from github and then copy the denonavr folder into you /config/custom_components/ folder. then you have the fixed version. thats what I did until its in a release version

curt7000 commented 3 years ago

you can download the zip of the dev branch from github and then copy the denonavr folder into you /config/custom_components/ folder. then you have the fixed version. thats what I did until its in a release version

Ugh ... was hoping for it to be in 2020.12.1. Thanks for the tip, I'll give it a go tonight!

jvnrambo commented 3 years ago

hello, I downloaded and upgraded to version 2020.12.1 and the integration of the denon avr network is still not working. My AVR X2500h device can no longer even be recognized, so many times that I power it off and on again, deleted and tried to include it again inside the home assistant

DanskerUS commented 3 years ago

Same here, 2020.12.1 does not fix the issues, sigh.

curt7000 commented 3 years ago

you can download the zip of the dev branch from github and then copy the denonavr folder into you /config/custom_components/ folder. then you have the fixed version. thats what I did until its in a release version

Ugh ... was hoping for it to be in 2020.12.1. Thanks for the tip, I'll give it a go tonight!

Up and running by moving the denonavr folder from the DEV branch to custom_components. Thanks you @tofuSCHNITZEL

Gerben321 commented 3 years ago

Works great indeed. Really sad it's not in the update. Hopefully in .2 so we can remove the workaround.

tofuSCHNITZEL commented 3 years ago

yes it will be in 2020.12.2

Jeroen-83 commented 3 years ago

Maybe a stupid question, but why am I on 2020.12.7? Will this be updated also?

tofuSCHNITZEL commented 3 years ago

it shows it for me too. maybe in the 2020.12.1 patch release the version was wrong

kuhni2k commented 3 years ago

Sorry for being so stupid, but how can I download the files as a zip? Probably a stupid question, but I´m a newbie :(

tofuSCHNITZEL commented 3 years ago

image

kuhni2k commented 3 years ago

image

I can´t see that green box, but thanks for the quick respond

tofuSCHNITZEL commented 3 years ago

because your are not in the base folder (see screenshot) you can only download a zip of the whole project.

kuhni2k commented 3 years ago

ok, understood, found and worked, thanks :)

davemenkehorst commented 3 years ago

There is currently no denonavr folder in my custom components. Is that a problem? And should i delete the folder when i update to 2020.12.2?

tofuSCHNITZEL commented 3 years ago

before you update to 2020.12.2 you can delete the denonavr from your custom_components folder

coaxial commented 3 years ago

That's odd. I have the issue where my X2400h would stop responding to any command at all sent from HA. I then backed up the AVR to USB, factory reset by pressing TUNER CH+ TUNER CH- Power and then restored the data from USB. The AVR now works fine. HA says I'm on 2020.12.7. Is this because the issue is fixed in that version or is it because of the AVR reset?

pops106 commented 3 years ago

I might be going mad but I think a factory reset fixed an issue like this a long long time ago as well, I will give it a go.

On Fri, 18 Dec 2020 at 08:09, Rock notifications@github.com wrote:

That's odd. I have the issue where my X2400h would stop responding to any command at all sent from HA. I then backed up the AVR to USB, factory reset by pressing TUNER CH+ TUNER CH- Power and then restored the data from USB. The AVR now works fine. HA says I'm on 2020.12.7. Is this because the issue is fixed in that version or is it because of the AVR reset?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/44199#issuecomment-747936796, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJUOSHZWXREXUW6FFXALLSVME47ANCNFSM4U2AA35A .

kuhni2k commented 3 years ago

So I have just one more question left, i can find all sources and everything works fine, except for internet radio, can´t select that as a source on the HA interface. Anybody knows how to change that? And thanks again for the great and quick support

jeffs1212 commented 3 years ago

I updated to 2020.12.7 and still had this problem. I used the patch suggested by @tofuSCHNITZEL and this works good for now. Thanks.

Try2Fly commented 3 years ago

By putting the denon folder in the custom folder, my receiver (AVR-x2500h) is found again in the integrations section, however the status stays on off, although the receiver is on. Are others also experiencing this?

curt7000 commented 3 years ago

By putting the denon folder in the custom folder, my receiver (AVR-x2500h) is found again in the integrations section, however the status stays on off, although the receiver is on. Are others also experiencing this?

Try power cycling your AVR. I have two AVRs and both exhibit this behavior sporadically.

tofuSCHNITZEL commented 3 years ago

Yes it happened to me too once. It seems the internal webserver just crashed and I had to unplug the power completely.

Try2Fly commented 3 years ago

Thanks, that did the trick. I removed the power and also reconfigured the network settings

quizzical86 commented 3 years ago

Sorry for this simple question, but is my understanding correct that it is still the intention to include this fix in the next update of the Home Assistant Core? I've been avoiding doing the manual update as I feel waiting for the update is the safer solution :)

tofuSCHNITZEL commented 3 years ago

Yes, the fix has already been merged. https://www.home-assistant.io/blog/2020/12/13/release-202012/#release-2020122---december-30

@dannykreynin I think you can close this now since the fix is included in today's release.

pops106 commented 3 years ago

Can confirm after the update all is working fine now.

frenck commented 3 years ago

Fixed in the latest release 🎉