Fritzbox User has access to Smart Home function

Since a few weeks my openhab (1.8.2) fritzaha binding is not working anymore. The log says:

User has no access to FritzBox home automation functions

Between “User” and “has” there is a double space an no username is listed. In the openhab.cfg I have a username configured:

fritzaha:fritzbox.host=10.1.20.1
fritzaha:fritzbox.port=80
fritzaha:fritzbox.protocol=http
fritzaha:fritzbox.user=openhab (I tried .user and .username)
fritzaha:fritzbox.password=openhab

With the username I am able to login the FritzBox. Can anyone help?

Best
Simon

Hi Simon,

‘username’ worked for me:

fritzaha:fritzbox.host=fritz.box
fritzaha:fritzbox.port=80
fritzaha:fritzbox.protocol=http
fritzaha:fritzbox.username=openhab
fritzaha:fritzbox.password=openhab

Do you permit the user the ‘Smart Home’ authority on your Fritz Box?
Please check under ‘System’ - ‘FRITZ!Box-Benutzer’ - ‘Benutzer’

Regards,
Daniel

Hi,
I have the same issue with the current OH2 release.

I configured a new user “obenhab” with pw on the fritzbox and gave it Homeautomation rights.

The thing is set like in the example:

Bridge avmfritz:fritzbox:1 [ ipAddress="192.168.178.1", password ="mypassword", user="openhab", port=80] {
	FRITZ_DECT_200 DECT1 [ ain="087610351029" ]
	}

But I get the error for the thing Fritz!box in paperUI:
Status: OFFLINE - CONFIGURATION_ERROR User openhab has no access to FritzBox home automation functions
I also tried without a port=… setting, no difference.

What did I wrong?

Hi,
could you please check if your “Smart-Home-Funktion im FRITZ!Box-Heimnetz freigeben” is activated? You can find the option in “Heimnetz” -> “Heimnetzübersicht” -> “Netzwerkeinstellungen” (hope you are german).

I will add a more detailed description to the documentation.

In my opionion you don’t need the port parameter except you configured an other port than 80.

Yes, I am German.
The setting was correct for “Heimnetzwerk freigegeben”.

I found a hint in another forum which works. They proposed not to use a separate user for Openhab, but just the user= and the password for logging in to the Fritz!Box. And this works!

Bridge avmfritz:fritzbox:1 [ ipAddress="192.168.178.1", password ="mypassword"]

I don’t understand why the dedicated user does not work, but ok, this is also a solution.

Hm, ok, the solution works, but I think it is not sufficient.

I use an special user with his own password and only access to “Smart Home” on my own. Please check another configuration “System” -> “FRITZ!Box-Benutzer” -> “Anmeldung im Heimnetz”. Which checkbox is activated? Try the first: “Anmeldung mit FRITZ!Box-Benutzernamen und Kennwort”.

Yes, I have the selection at passoword only, the 2. selection.
I fear to change that and lock nyself out of my Fritzbox!

That is the reason. You cannot use other users without activating that option.

But don’t be afraid. Just do it. The standard user is “admin” with your known password. After that you can use your new user for openhab with less rights. I would recommend that. It is much more secure.

I am brand-new to OpenHab, but pretty excited how quickly I could setup an installation and control my Max! thermostats.
So I continued to try more devices and got stuck with the error message of this thread when trying to control a Fritz!Dect 200 switch. So here is what I have:

Fritzbox 7270v2 Firmware 6.06
Openhab2 release running on an laptop under windows 10

I tried the 3 different optiones which are discussed above on how to log on to the fritzbox, but keep getting the error that “the user has no access to Fritzbox home automation function”. I see that in Ereignisse on Fritzbox the user frequently and successfully logs on to the the box but Fritzbox binding stay offline.

I guess my main question here is whether somebody has that Fritzbox 7270v2 successfully running with openhab or what else could be the problem.

Thanks for any hint

Erik

Hey Erik,

I assume firmware 6.06 is the most recent version for your FRITZ!Box, am I right?

I guess the problem is following: Since FRITZ!OS 6.50 the AHA interface has a new restriction for logging in. A so called session id, which is required. The binding tries to connect to the FRITZ!Box and checks whether a sessionid is returned or not. Additionally the binding checks for correct rights. In the first place the user must have “Smart Home” access. In the second place the user must have ReadWrite rights for Smart Home. If one of both is not set, the binding will throw the mentioned error.

Maybe you have to check that.

Thanks for your quick response! Yes 6.06 is the most recent. Are you saying the 6.06 would not be able to return that session id? So maybe that box is just too old…
I will try a more recent fritzbox with current firmware in the office tomorrow and see whether that makes a difference and let you know.

Thanks again

Erik

Yes, please do that. If that isn’t a solution for you, we may work out a sufficient one for your situation. I am eager to help and modify the binding to provide a working version to you.

Today I was able to test the same openHab setup on a Fritzbox 7390 with current firmware 6.80 and the Fritzbox binding worked immediately. So it seems to be definitely related with the older firmware. If its an easy fix to modify the binding for that older firmware I would really appreciate your help. On the other hand I will have to update my Fritzbox anyway when the German Telekom will offer VDSL 50 to me, which they promised for quite some time …

Hey Erik, there was a pull request #1878 merged into master repository which eventually fix your issue. Are you able to test if it works for you?

I had the same problem described here. Newest firmware 6.80 on FritzBox and openHAB 2 and ‘user does not have access…’ all the time

I tried with admin user, special openHAB user and so on. Nothing worked until I did go to:
FritzBox Benutzer->Anmeldung im Heimnetz and deactivated ‘Bestätigen’ - Ausführung bestimmter Einstellungen und Funktionen zusätzlich bestätigen

It then worked immediately.

I had the same problem and nothing in this thread worked.
I found out that there is a setting that affects how to login to the FritzBox and that was set to password only which prevents a login with username/password. After changing this the connection from OpenHab (with separate user) worked.
Here is a description on how to change it (in german):
https://service.avm.de/help/de/FRITZ-Box-Fon-WLAN-7490/011/hilfe_system_kennwort

@warhog Nice catch. I will do some tests and add a more specific documentation about it too.
Here is the link in Englisch: https://service.avm.de/help/en/FRITZ-Box-Fon-WLAN-7490/011/hilfe_system_kennwort