Closed michelebossa closed 3 years ago
File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 163, in raise_fritzconnection_error raise exception(message) fritzconnection.core.exceptions.FritzInternalError: UPnPError: errorCode: 820 errorDescription: Internal Error
Hi @michelebossa, as per the above error can you try to restart the router ?
Simone
fritz documentation fritz source (message by IssueLinks)
Hey there @mammuth, @aarondavidschneider, mind taking a look at this issue as it has been labeled with an integration (fritz
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
i have just tried restart router + after restart HA nothing it is changed same error.
i have just tried restart router + after restart HA nothing it is changed same error.
Them I'm sorry but I don't know where the Internal Error
of the router is coming from.
Simone
Do you know how to access the file system of your HA instance ?
If so please contact me on Discord: chemelli74#2180
Simone
I could reproduce this with my 4040. But I'm unsure how to debug this...
The 4040 does not have a modem, it can only use an existing internet connection.
I think calling the service WANDSLInterfaceConfig
raises an Internal Error
here https://github.com/home-assistant/core/blob/dev/homeassistant/components/fritz/sensor.py#L272
Adding FritzInternalError
to the except block fixes this, but I'm unsure if this introduces other problems š.
Note that there are different setups possible with the 4040. I'm using the IP-Client-Client mode. I have a 7590 that does dsl, dhcp and mesh-master. The 4040 is connected via LAN and gets its address from the 7590. You could also connect it to your LAN via its WAN-Port and let it provide its own dhcp subnet to its clients. Or you could attach a modem to the WAN-Port.
I have no idea how the different setups affect availability of WANDSLInterfaceConfig
or the sensors provided by this integration. In my case all sensors but device uptime and connectivity are useless.
@michelebossa @TheZoker what are your setups?
I think we need to investigate further to come up with a proper solution. Or we quickfix FritzInternalError
and open a second issue to dig deeper š¤. @chemelli74 what do you think?
@flabbamann i have an antenna with modem connected to WAN-Port. I have made some test with @chemelli74 and him is checking around FritzInternalError i have added the exception into code and it is fixed but i suppose there are some other check to add to avoid any extra problem.
@flabbamann, please test this code: https://github.com/home-assistant/core/compare/dev...chemelli74:chemelli74-fritz-err820?expand=1
Simone
@chemelli74 I get another exception:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspaces/core/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/workspaces/core/homeassistant/components/fritz/sensor.py", line 284, in async_setup_entry
reply = parse_device_reply(err)
File "/workspaces/core/homeassistant/components/fritz/common.py", line 49, in parse_device_reply
for str_reply_tuple in reply.split("\n"):
AttributeError: 'FritzInternalError' object has no attribute 'split'
It's working if I cast reply
to string, but I think you could skip on that parsing, as FritzInternalError
will always have error code 820
.
https://github.com/kbr/fritzconnection/blob/master/fritzconnection/core/exceptions.py#L176
I have the same issue with the 5490 router (the original one posted by @michelebossa).
Looking forward for the solution in the pull request. Same issue on my 5490.
Thanks all for the fix
Solved, Thx!!
The problem
All sensor related to status of router 4040 from FRITZ are unavailable and i have an error related to UPnPError code 820.
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 270, in async_setup_entry dslinterface = await hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 284, in call_action return self.soaper.execute(service, action_name, arguments) File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 254, in execute return handle_response(response) File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 238, in handle_response raise_fritzconnection_error(response) File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 163, in raise_fritzconnection_error raise exception(message) fritzconnection.core.exceptions.FritzInternalError: UPnPError: errorCode: 820 errorDescription: Internal Error
What is version of Home Assistant Core has the issue?
core-2021.9.1
What was the last working version of Home Assistant Core?
core-2021.8.*
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
AVM FRITZ!Box Tools
Link to integration documentation on our website
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response