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 PI 3B and so far it worked out pretty well for me. Now I’m desperately trying to configure the Fritz_Netmonitor Component. I added the following to the configuration.yaml:

sensor:
  - platform: fritzbox_netmonitor
    host: 192.168.178.1
    name: "Network Monitor"

But so far, even after restarting the whole Home Assistant multiple times, the netmonitor refuses to show up as a sensor and therefore can not be added to the UI.
Here is the Traceback:

fritzbox_netmonitor: Error on device update!

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/fritzconnection/core/fritzconnection.py", line 204, 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 304, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritzbox_netmonitor/sensor.py", line 119, in update
    self._is_linked = self._fstatus.is_linked
  File "/usr/local/lib/python3.7/site-packages/fritzconnection/lib/fritzstatus.py", line 41, in is_linked
    'GetCommonLinkProperties')
  File "/usr/local/lib/python3.7/site-packages/fritzconnection/core/fritzconnection.py", line 206, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANCommonIFC1"

What can I do?

Greetings,
Colin

That service hasn’t been called WANCommonIFC1 the library first came out around Oct 2019. On Jan 14 they went from 0.84 to 1.2.0 for the fritzconnection library (it’s currenlty at 1.4 now).

I’m confused. Hass 3.10 is new, right?

Can you ssh in and check the version of the fritzconnection lib?

pip freeze | grep fritz

I have zero idea what is actually wrong and am just looking at the source code. But since forever, the is_linked function has been using the key WANCommonIFC, which is hard coded! So no clue how you’re getting that key error.

Did you activate UPnP feature in your fritzbox?

No I didn’t. Problem fixed. Thank you all for the quick help Little suggestion: It might be helpful for others to add a little note like “Please be aware, that uPnP has to be activated in order for this component to function properly” to the component site

Feel free to edit the documentation. Everybody can do it.

Oh. Didn’t know that. Thanks for the info