core
core copied to clipboard
Fritz!box tools on fritzbox 5590 unable to add to home assistant
The problem
I want to add my fritzbox 5590 integration into home assistant. Fritz!box call monitor and Fritz!smarthome hhad no issue, but Fritz!box tools will not install.
What version of Home Assistant Core has the issue?
core-2024.1.5
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
fritz!box
Link to integration documentation on our website
https://www.home-assistant.io/integrations/fritz
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: aiohttp.server
Source: /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:421
First occurred: 22:00:12 (5 occurrences)
Last logged: 22:27:01
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 233, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 320, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 416, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fritz/config_flow.py", line 224, in async_step_user
if not (error := await self.hass.async_add_executor_job(self.fritz_tools_init)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fritz/config_flow.py", line 86, in fritz_tools_init
and not connection.call_action("X_AVM-DE_UPnP1", "GetInfo")["NewEnable"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/fritzconnection.py", line 456, in call_action
return self.soaper.execute(service, action_name, arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/soaper.py", line 286, in execute
return handle_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/soaper.py", line 268, in handle_response
raise_fritzconnection_error(response)
File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/soaper.py", line 191, in raise_fritzconnection_error
raise exception(message)
fritzconnection.core.exceptions.FritzInternalError: UPnPError:
errorCode: 820
errorDescription: Internal Error
Additional information
I have tried rebooting the fritzbox, restarting Home Assistant, updating my fritzbox from 7.58 to 7.80. Turning the Permit access for apps and transmit status information over UPnP off and on. The problem is still there. I used to have a fritzbox 5490 which worked perfectly with home assistant.
Hey there @mammuth, @aarondavidschneider, @chemelli74, @mib1185, 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!
Code owner commands
Code owners of fritz can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign fritzRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
fritz documentation fritz source (message by IssueLinks)
Hi @JaySea77
the error message let assume there is an issue with the Fritzbox itself.
please enable debug logging, restart HA and provide the home-assistant.log.
To do so add the following to your configuration.yaml:
logger:
default: info
logs:
homeassistant.components.fritz: debug
fritzconnection: debug
Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.
Here is the last part of the logfile homeassistant.log
@mib1185 Any idea?
please open the url http://fritz.box:49000/x_upnpSCPD.xml and provide the full result.
I am not at home, but this is what happens when I do it on the telephone with my vpn on:
1 0 GetInfo NewEnable out Enable NewUPnPMediaServer out UPnPMediaServer SetConfig NewEnable in Enable NewUPnPMediaServer in UPnPMediaServer Enable boolean 0 UPnPMediaServer boolean 0
this looks weird - it should be a valid XML output 🧐
Maybe because I open it on my phone?
even in my phone it looks as it should
This on my pc:
This XML file does not appear to have any style information associated with it. The document tree is shown below. <scpd xmlns="urn:dslforum-org:service-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <actionList> <action> <name>GetInfo</name> <argumentList> <argument> <name>NewEnable</name> <direction>out</direction> <relatedStateVariable>Enable</relatedStateVariable> </argument> <argument> <name>NewUPnPMediaServer</name> <direction>out</direction> <relatedStateVariable>UPnPMediaServer</relatedStateVariable> </argument> </argumentList> </action> <action> <name>SetConfig</name> <argumentList> <argument> <name>NewEnable</name> <direction>in</direction> <relatedStateVariable>Enable</relatedStateVariable> </argument> <argument> <name>NewUPnPMediaServer</name> <direction>in</direction> <relatedStateVariable>UPnPMediaServer</relatedStateVariable> </argument> </argumentList> </action> </actionList> <serviceStateTable> <stateVariable sendEvents="no"> <name>Enable</name> <dataType>boolean</dataType> <defaultValue>0</defaultValue> </stateVariable> <stateVariable sendEvents="no"> <name>UPnPMediaServer</name> <dataType>boolean</dataType> <defaultValue>0</defaultValue> </stateVariable> </serviceStateTable> </scpd>
I scanned this text fast and don't think it is different than yours. Both Safari and Chrome show it like my previous post on my iPhone
ok ... the service definition is there and can be fetched, but when calling the GetInfo your box answers with errorCode: 820 errorDescription: Internal Error - this is definitely an issue with/in the box itself. maybe restart the box again or in worst case, re-install (reset and reconfigure ) it
In the Support page there is an option to send support information. This option doesn't work either and I have a ticket open with AVM about this. Could this be the same problem?
Should I enable upnp for the homeassistant device? I have Permit independent port sharing for this device enabled.
In the Support page there is an option to send support information. This option doesn't work either and I have a ticket open with AVM about this. Could this be the same problem?
Only AVM can answer this.
Should I enable upnp for the homeassistant device? I have Permit independent port sharing for this device enabled.
yes, upnp needs to be enabled - this is also mentioned as note in the integration docs
upnp is enabled which is in the docs, but I didn't find if home assistant ip should have it enabled specificaly but I have that anyways.
if home assistant ip should have it enabled specificaly
which setting exactly do you mean here?
Though this would enable port forwarding outside the home network
ahh... this means that the device is allowed to create port forwardings by its own via upnp protocol - this is not required for HA.
okay, I can leave it on anyways.
just for science, please disable it and test again to integrate the box in HA
Tried with a normal user account and the default fritzbox account starting witch fritz and then a number. Neither worked.
Anything else I can try?
I reset my fritzbox and the only thing I changed was the internal ip range, the ip of the fritzbox itself and I have imported only my previous portforwarding. I still cannot get my fritzbox in my home assistant. Anything I can try @mib1185
HI @JaySea77 can you share fresh log please ?
Same Problem here... I will share logs after my own research...
I was able to add my fritzbox 5590 in ha after I enabled the "Allowing access for apps" in "Home network shares" - without I received the same error as decribed above
This is not fixing it for me... One question... Do you use the default Fritz ip config 192.168.178.0/24?
No. It's 192.168.1.2/24
4ich @.***> schrieb am Di., 13. Feb. 2024, 22:21:
This is not fixing it for me... One question... Do you use the default Fritz ip config 192.168.178.0/24?
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/109166#issuecomment-1942574851, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZQXYQLRSJPO7LDTWDH7N3YTPKNNAVCNFSM6AAAAABCR7GOWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGU3TIOBVGE . You are receiving this because you commented.Message ID: @.***>
HI @JaySea77 can you share fresh log please ?
I will as soon as I get better. Being a little ill at the moment.
Which user should I try to add btw. Is it the generated one starting with fritz or another one?