[SOLVED] Fritzboxconnection requires to be modified

I have created a pull request over at bitbucket to add authentication support to the fritzconnection project. Newer versions of Fritz!OS, or at least some models with newer versions, require you to authenticate at the fritzbox to retrieve information. This applies to the fritzbox_netmonitor sensor.

If the patch gets accepted, we can update the component in Home Assistant. If not, fritzbox_netmonitor will stay broken for some users.

You can turn off the extra authentication and it works as per normal.

The only option is to disable authentication at all, and opening up the fritzbox to all devices and users within the local network is not a very secure solution.

I have authentication on and it works fine.
config yaml:

# FritzBox
  - platform: fritzbox_netmonitor
    host: !secret my_fritz_host

Works perfectly well.
I have turned off the ‘extra confirmation to confirm extra settings’ as it’s just a PITA however I am set to have to ‘Login with the FRITZ!Box password’
That is plenty secure for a home network and the net monitor works perfectly.

This is how it used to work, and I configured my device. AVM changed the behavior on some boxes and now you require to authenticate before you can read the values for “WANIPConnection” : “GetStatusInfo”, otherwise the values zero or none.

The changes were introduced in version FRITZ!OS 6.83.

The execution of commands through specifically prepared parameters in the
TR-064 context is now disabled. To perform TR-064 commands required knowledge
of the device's password. [...]

https://en.avm.de/service/security-information-about-updates/

I’m on Fritz OS 7 on a 7590. I can’t post a screen shot till tomorrow but I assure you it works fine as I have it configured.

That’s nice for you. But it won’t work for my fritzbox. I have tesed it with fritzconnection and patched the fritzstatus.py to get it working, because I had to authenticate first.

I have configured it the same way as you did, but it doesn’t change the fact, that I need to enter the password.

./fritzstatus.py -i 192.168.178.1

FritzStatus:
version:            0.5.1
model:              FRITZ!Box 6490 Cable (lgi)
is linked:          False
is connected:       False
external ip:        192.168.178.1
uptime:             00:00:00
bytes send:         0
bytes received:     0
max. bit rate:      ('40.0 MBit/s', '429.7 MBit/s')

Using basic authentication settings with my fritzbox, after updating the script and entering credentials:

./fritzstatus.py -i 192.168.178.1 -u homeassistant -p <redacted>

FritzStatus:
version:            0.5.1
model:              FRITZ!Box 6490 Cable (lgi)
is linked:          True
is connected:       True
external ip:        <redacted>
uptime:             96:25:10
bytes send:         0
bytes received:     0
max. bit rate:      ('40.0 MBit/s', '429.7 MBit/s')

I meant to post this yesterday:
image
I only have the config yaml as I show above

Do you really think I have not configured my component correctly, after all that tests and links I posted?

I have no idea what you have configured. All I know is how mine is configured which I posted and also a screenshot showing it is working as expected. I have no idea what else on your network on in HA is causing a problem for you.

It’s an issue with the fritzconnection module for python. It has nothing to do with the configuration.

So why is mine working correctly and yours not?

Because you have a different fritzbox and firmware version running and it seems not to be affected by this problem. I believe you that yours is working fine. Mine is not and it stopped working, when the firmware 6.88 was installed. I pasted the results for my fritzbox above, but you cannot accept it that it is not working for my, or other as well.

I posted the change log describing the changes done by avm, but you still cannot accept it that it is not working for me or others.

Hello,
i can confirm it. This Module stopped working after the Update of 6.88. I have a maintaned avm fritz box 6490.
In the Script it have to added the authentification to the box. Anonymously you can’t obtained any information from the box.
i added username and password but it has to be added in the python module. I dont know any other fritzbox that needed this new configuration, but the 6490 cable with 6.88 got to have it.

When I look at the output of the program to test. The fields for the upload and download values are zero. It seems not only a problem with the missing capability to authenticate to receive the status values from the Fritzbox, but it might be a bug as well in the Fritzbox.

Did you (@kostak) successfully retrieve these values?

Hello,
no, i get zeros, too.

I had also problems before.
But last week I updated my Fritzbox 6490 Cable to FritzOS 7.0.
Now everything seems to work as aspected.

Okay, hopefully my provider will update the Unitymedia Fritzbox to version 7.00 in the future.

I’m having issues with the callmonitor. Couldn’t get it to work since months. It always looses the connection to the Fritzbox.

@0rn0lf wrong topic and also a different module we are talking about.