question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"

See original GitHub issue

Hey. So on the newest Homeassistant version using fritzconnection library I am gettin this error messages:

2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.binary_sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, 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 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/binary_sensor.py", line 95, in update
    self._attr_is_on = bool(self._avm_device.fritz_status.is_connected)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 49, in is_connected
    status = self.fc.call_action("WANIPConn", "GetStatusInfo")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.binary_sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/binary_sensor.py", line 97, in update
    self._attr_is_on = bool(self._avm_device.fritz_status.is_linked)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 40, in is_linked
    status = self.fc.call_action("WANCommonIFC", "GetCommonLinkProperties")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, 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 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 72, in _retrieve_external_ip_state
    return status.external_ip  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 55, in external_ip
    return self.fc.call_action("WANIPConn", "GetExternalIPAddress")[
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, 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 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 67, in _retrieve_connection_uptime_state
    return _uptime_calculation(status.connection_uptime, last_value)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 94, in connection_uptime
    status = self.fc.call_action("WANIPConn", "GetStatusInfo")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 77, in _retrieve_kb_s_sent_state
    return round(status.transmission_rate[0] / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 152, in transmission_rate
    status = self.fc.call_action("WANCommonIFC1", "GetAddonInfos")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 82, in _retrieve_kb_s_received_state
    return round(status.transmission_rate[1] / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 152, in transmission_rate
    status = self.fc.call_action("WANCommonIFC1", "GetAddonInfos")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 87, in _retrieve_max_kb_s_sent_state
    return round(status.max_bit_rate[0] / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 180, in max_bit_rate
    return self._get_max_bit_rate("WANCommonIFC")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 187, in _get_max_bit_rate
    status = self.fc.call_action(servicename, "GetCommonLinkProperties")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 92, in _retrieve_max_kb_s_received_state
    return round(status.max_bit_rate[1] / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 180, in max_bit_rate
    return self._get_max_bit_rate("WANCommonIFC")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 187, in _get_max_bit_rate
    status = self.fc.call_action(servicename, "GetCommonLinkProperties")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 97, in _retrieve_gb_sent_state
    return round(status.bytes_sent / 1000 / 1000 / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 122, in bytes_sent
    status = self.fc.call_action("WANCommonIFC1", "GetAddonInfos")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"
2022-01-09 12:08:37 ERROR (MainThread) [homeassistant.components.sensor] fritz: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 281, in call_action
    service = self.device_manager.services[service_name]
KeyError: 'WANCommonIFC1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 686, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 345, in update
    ) = self.entity_description.value_fn(status, self._last_device_value)
  File "/usr/src/homeassistant/homeassistant/components/fritz/sensor.py", line 102, in _retrieve_gb_received_state
    return round(status.bytes_received / 1000 / 1000 / 1000, 1)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/lib/fritzstatus.py", line 136, in bytes_received
    status = self.fc.call_action("WANCommonIFC1", "GetAddonInfos")
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 283, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"

On fritzconnection -s -i 192.168.178.1 I am getting the following:

                    DeviceInfo1
                    DeviceConfig1
                    Layer3Forwarding1
                    LANConfigSecurity1
                    ManagementServer1
                    Time1
                    UserInterface1
                    X_AVM-DE_Storage1
                    X_AVM-DE_WebDAVClient1
                    X_AVM-DE_UPnP1
                    X_AVM-DE_Speedtest1
                    X_AVM-DE_RemoteAccess1
                    X_AVM-DE_MyFritz1
                    X_VoIP1
                    X_AVM-DE_OnTel1
                    X_AVM-DE_Dect1
                    X_AVM-DE_TAM1
                    X_AVM-DE_AppSetup1
                    X_AVM-DE_Homeauto1
                    X_AVM-DE_Homeplug1
                    X_AVM-DE_Filelinks1
                    X_AVM-DE_Auth1
                    X_AVM-DE_HostFilter1
                    WLANConfiguration1
                    WLANConfiguration2
                    WLANConfiguration3
                    Hosts1
                    LANEthernetInterfaceConfig1
                    LANHostConfigManagement1
                    WANCommonInterfaceConfig1
                    WANDSLInterfaceConfig1
                    WANDSLLinkConfig1
                    WANEthernetLinkConfig1
                    WANPPPConnection1
                    WANIPConnection1

So I guess the service is called something else on my router. What can I do about that. Its a Fritbox 7590 on firmware 7.29. Related HA Issue: https://github.com/home-assistant/core/issues/63725

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
kbrcommented, Mar 2, 2022

I close this, because the issue is triggered by the settings.

1reaction
chk1commented, Mar 1, 2022

I had this error in my logs with Home Assistant and Fritzbox 7530 (firmware 7.29, unbranded/retail DSL version). It was weird because I have this very similar setup in two locations, but only one location showed the error.

I compared my configs and it appears to be this setting is the cause for it, if you turn it off:

Statusinformationen über UPnP übertragen

Found in network settings, translation in English approx. “Transmit status information via UPnP”

Screenshot: Fritzbox Settings page in German, highlighted in yellow "Statusinformationen über UPnP übertragen"

As soon as you turn it on & restart HA, the log errors disappear, two new UPnP devices are found. And new sensors are available on the Fritzbox integration, which were previously missing (e.g. current download throughput).

Screenshot: Home-Assistant found two new UPnP devices

Read more comments on GitHub >

github_iconTop Results From Across the Web

Status Module: Issue with non matching service names #88
I managed to track this to the fact that the services needed to request the status items are named differently from what fritzconnection/ ......
Read more >
fritzconnection 1.10.3 - PythonFix.com
/pkg/f/fritzconnection/fritzconnection-banner.webp ... FritzServiceError: unknown service: "WANIPConn1"; Improvement request: FritzStatus ...
Read more >
Introduction — fritzconnection 1 documentation - Read the Docs
In case that a service or action is unknown (because of a typo or incompatible router model) fritzconnection will raise a FritzServiceError ....
Read more >
Fritz_Netmonitor Component doesn't show up as sensor
Hey everybody, First of all, I am pretty new to the whole Home Assistant thing. I am using HassOS 3.10 on a Raspberry...
Read more >
fritzconnection - PyPI
fritzconnection.py makes the SOAP interface of the FRITZ!Box available on the command line. Shows all available services and actions when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found