Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fritz!Box integration KeyError: 'WANIPConn1' #83665

Closed
micium opened this issue Dec 9, 2022 · 3 comments · Fixed by #83757
Closed

Fritz!Box integration KeyError: 'WANIPConn1' #83665

micium opened this issue Dec 9, 2022 · 3 comments · Fixed by #83757
Assignees
Milestone

Comments

@micium
Copy link

micium commented Dec 9, 2022

The problem

Logger: homeassistant.components.binary_sensor
Source: components/fritz/common.py:670
Integration: Sensore binario (documentation, issues)
First occurred: 14:09:31 (2 occurrences)
Last logged: 14:09:31

Error while setting up fritz platform for binary_sensor
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/fritzconnection/core/fritzconnection.py", line 375, in call_action
service = self.device_manager.services[service_name]
KeyError: 'WANIPConn1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/fritz/binary_sensor.py", line 63, in async_setup_entry
connection_info = await avm_wrapper.async_get_connection_info()
File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 682, in async_get_connection_info
ipv6_active=await self.async_ipv6_active(),
File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 672, in async_ipv6_active
return bool(await self.hass.async_add_executor_job(wrap_external_ipv6))
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 670, in wrap_external_ipv6
return str(self.fritz_status.external_ipv6)
File "/usr/local/lib/python3.10/site-packages/fritzconnection/lib/fritzstatus.py", line 71, in external_ipv6
return self.external_ipv6_info["NewExternalIPv6Address"]
File "/usr/local/lib/python3.10/site-packages/fritzconnection/lib/fritzstatus.py", line 82, in external_ipv6_info
return self.fc.call_action("WANIPConn", "X_AVM_DE_GetExternalIPv6Address")
File "/usr/local/lib/python3.10/site-packages/fritzconnection/core/fritzconnection.py", line 377, in call_action
raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"

What version of Home Assistant Core has the issue?

2022.12

What was the last working version of Home Assistant Core?

2022.11.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

bynary_sensor

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?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Dec 9, 2022

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 close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign fritz Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


fritz documentation
fritz source
(message by IssueLinks)

@mib1185
Copy link
Contributor

mib1185 commented Dec 10, 2022

Hi @micium

please share a bit more information about your environment (at least the Fritzbox model, firmware version and type on WAN connection)
Further 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.

@micium
Copy link
Author

micium commented Dec 10, 2022 via email

@mib1185 mib1185 added this to the 2022.12.2 milestone Dec 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants