FRITZ! Binding cannot reconnect when Fritzbox was offline

Hi all,
this is my first entry. I am new to Openhab and working with ist for 4 Weeks. The results are very promising. Thanks to the very good forum i got my Openhab2 Installation and Bindings up an running.

I am using an Raspi 3B with openHAB2, Astro Binding, NTP Binding and AVM FRITZ! Binding. All is working reliable.

Now to the Problem i have…
When i reboot my Fritzbox (remove power and apply power again) the FRITZ! Binding is not able to connect again.

From the log i see the first time

2019-01-23 17:48:37.689 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_178_1’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond

that is correct, the Fritzbox is down

and then every 15 Seconds i get

2019-01-23 17:59:22.464 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_178_1’ changed from OFFLINE (COMMUNICATION_ERROR): Request is invalid to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond

2019-01-23 17:59:22.481 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_178_1’ changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond to OFFLINE (COMMUNICATION_ERROR): Request is invalid

This log message appears for ever, Fritzbox and all Fritzbox Things are marked “offline” in PaperUI. Obviously the FRITZ! Binding tries to reconnect, but fails. Restarting openhab service via console solves the problem. FRITZ! Binding can establisch the connection again.

That is no big Problem, just do not reboot the Fritzbox :slight_smile: But it`s not acceptable for reliable operation of course.

The FRITZ! Binding setup uses the default settings, nothing changed here. For login a seperate user “openhab2” with password is used.

Restarting the service from a rule by detecting offline state could be a solution. But i am not happy with this, FRITZ! Binding can (should) reconnect again when things go right.

So what can be done to solve the Problem. Any ideas what the problem is ? Any help is welcome !
Thanks for the effort !

Roland

1 Like

Hi Roland,

welcome to the openHAB community.

Thanks for reporting your problem. You are not the only one seeing this behavior. We already filed an issue for it in our repository:

1 Like

Hi, I’ve the same problem and I’m using nearly the same configuration except fritzbox model which in my case is 7390. Everthing worked fine until a week ago. Since then avmfritz can no longer connect to the Fritzbox. Even after a firmware update of the fritzbox the problem remained. fritztr064 binding is working correctly.

Any news? I have the same problem. Even changing the password etc. does not solve the problem temporarily.

I do have the same problem. Until this is fixed the workaround of restarting the openHAB service works for me.

I am afraid not. I do not have time to work on it. Currently I am trying to implement support for the FRITZ!DECT 400. But the new XML structure of the API got so weird that it is not possible to find proper POJOs for it without the used XML library (JAXB) complaining about it. Thus I am thinking about a bigger refactoring and like to switch to the XStream library - which we recommend and which will improve the performance of the binding itself.

1 Like

Which version of openHAB do you have? My feeling is that this error is connected to my update to 2.4.

I uninstalled avmfritz binding and all related fritz!dect things in PaperUI. Reinstalling binding and things solved communication problems. Now everthing works well :slight_smile:

This is certainly a quick fix, but I suppose you don’t want to repeat this by hand every time. So the fact that the binding does not recover on its own from a FritzBox being temporarily offline remains an open issue of the binding as Christoph @cweitkamp pointed out above.

I’m using version 2.4 as well.

Hi,

I`ve noticed one thing after Fritz!Box reboot - there is a stream of error messages in the system log of the Fritz!Box, all with the same message:

Anmeldung an der FRITZ!Box-Benutzeroberfläche von IP-Adresse 192.168.178.62 gescheitert (ungültige Sitzungskennung). Zur Sicherheit werden alle noch gültigen Sitzungen zur IP-Adresse 192.168.178.62 beendet. [15 Meldungen seit 30.03.19 08:58:54

So apparently there is an old session cookie kept by the binding which does not fit to the rebooted / updated Fritz!Box?

In my case after ~12h the error disappears and the binding is connecting just fine.

I did some research and submitted a fix for it. @ollo Your post gave me a hint into the direction to look for and to implement an easy fix.

5 Likes

Hi Christoph,

glad I could help! Where can I get the latest .jar file? I’m running OH 2.5.0-M1 and would like to use the fixed version.

Thanks!

Hi Thomas,

Currently it is not possible to use a newer *.jar file in an older build. If you want to benefit from the fix you have to upgrade to the snapshot build.

Hi Christoph,

I guess FW 7.11 breaks the binding. Since I’ve updated my 7580 with latest release version 7.11 my OH 2.5M1 setup fails to connect to the FB with some communication error so all my Smarthome devices stay offline.

Any chance to get this fixed while OH 2.5M2 is around the corner?

Thanks, Thomas

Hi Thomas,

Which FRITZ!Box do you use? I have a 7490 running FRITZ!OS 7.11 for over two weeks without any issue. But maybe it is working because I use the latest version of the binding.

Best, Christoph

Hi Christoph,

encouraged by your post I restarted my OH system and now it connects again to the FB7580 and all smarthome devices are back online. Something must have been stuck. Sorry for the noise.

Thanks & regards, Thomas

No problem. I am glad you got it working again.

Same behavior here. After FritzBox Update, log was full of disconnect notifications. Restarting the openhab2 service does the trick. In Ubuntu:

sudo service openhab2 restart

I have the same issue, after a desconnect in the night from my Provider, the eventlog will be full with the offline messages. a reboot helps but then I must reboot oh every day - thats makes not really sense. use OH 2.5.4 and FB 7490 FW 7.12
best
Christian

2 Likes