AVM FRITZ! Binding loses connection after some hours

I’m using Ópenhab 2.5.9 on a Raspberry 4 (Buster).
Since about a week the AVM FRITZ! Binding loses every day after a couple of hours contact to the devices. Some more time later I getting about each minute the following messages in the event.log:

2020-10-25 08:46:28.653 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_109_1’ changed from OFFLINE (COMMUNICATION_ERROR): Request is invalid to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.
2020-10-25 08:46:28.672 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_109_1’ changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond. to OFFLINE (COMMUNICATION_ERROR): Request is invalid

When it restarts Openhab it works again for some hours.
I cleaned the cache several times but nothing changes, after some hours all DECT devices and the Fritzbox 7590 are no longer responsive.

I have now learned that the connection loss of the AVM FRITZ! Binding is happening typically right after one of the regular reconnects (by code every two hours) of the Fritzboxtr064 Binding, most likely at midnight. the TR64 reconnect is successful but a few minutes later the Fritz Binding fails. I would like to deinstall this 1.x binding but I make use of a lot of features that are still not available in the AVM FRITZ! Binding.

It does this every 2 hours, and is by design… and is inconsequential to running your OH.
I have set my log level to WARN and since then live in peace :slight_smile:

How?

Launch the karaf console and type:
log:set WARN org.openhab.binding.fritzboxtr064

done.

Thanks for the reply @Max_G. I’m aware of the reconnect is by design for the fritzboxtr064 and it does not bother me.

My problem is that the connection of my avmfritz binding is dead afterward.

I’m also not absolutely sure that the reconnection of the fritzboxtr064 is the reason, but just now I need to restart openhab to regain the connection for the avmfritz binding.

Apologies, I did not read your post properly…
What about unloading the binding (via cron, rule or exec), rather than restarting OH?
I know it is a band-aid (but better than a restart).

A silly question: I assume OH is connected via wired Ethernet, and not WiFI, which may get disabled by a schedule in the Fritzbox?!

Could this be a network/cabling issue (considering the Fritzbox reportedly goes offline)?

NP, I’m really thankful for any hint.
I already tried to restart the binding (ssh openhab@localhost -p8101 ‘bundle:restart org.openhab.binding.avmfritz’)
But this doesn’t solve the issue. Only ca complete restart of Openhab allows the devices to reconnect again.
My Openhab Raspberry 4 is directly connected to my Fritzbox by a 1 m Patch Cable - so I expect no network connection issues.

Fair enough… :slight_smile:
What about a corrupt file… maybe due to SD card issues?

I am running OH solely on USB booted SSDs.

In case you are running on an SD card, maybe grab another one and start from scratch.

I have no further ideas to offer; all the very best.

I had a defective SD card, about a year ago and some strange effects, but my actual one should be fine, so far all my other bindings and further services are stable. I cleaned the cache several times and delete all active log files, so I don’t think it’s a corrupt file.
Starting from scratch is a lot of effort and this is to be an absolute last option.

Unfortunately I do experience the same problem. The binding does not manage to reconnect to the FritzBox:

2020-11-06 16:46:25.777 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_1_1’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.
2020-11-06 16:46:27.780 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_1_1’ changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond. to OFFLINE (COMMUNICATION_ERROR): Request is invalid
2020-11-06 16:46:28.776 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:192_168_1_1’ changed from OFFLINE (COMMUNICATION_ERROR): Request is invalid to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.

Restarting OpenHAB (2.5.10) does solve to problem but I doubt that this is a state-of-the-art solution.

If I could be of any help solving this problem please do not hesitate to contact me.

Regards.

Same here…
Only a full restart of OH brings the binding back again.

I’am using the following setup:

  • OH (openHAB 2.5.2 Release Build) is running on a Synology Diskstation DS218+ (DSM 6.2.3-25426)
  • FRITZ!Box 6590 Cable (FRITZ!OS 07.20)
  • 2x FRITZ!DECT 301

I’ve played around switching the binding protocol from HTTPS to HTTP. Unfortunately without success.

I’ve tested a lot in the last few weeks., without any success. My problem started around the time I needed to change my IP Address range in my LAN. But I checked several times for any leftovers from this.
I typically lose the connection when devices on my Shelly Binding become very active (send updates for power consumption changes once a second), that seems to be a pattern, but I find no way to prove it.
Just now I need to restart Openhub at least once a day and I try to automate it as a temp. workaround.

Have now migrated to OH 3.0.0 - the problem is still the same…

Same for me. This is really annoying and I have deactivated both FritzBoxes currently.

My eventlog shows this cycle

2021-01-09 11:27:35.438 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (COMMUNICATION_ERROR): Request is invalid to OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions.
    2021-01-09 11:27:38.648 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.
    2021-01-09 11:27:39.030 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond. to OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions.
    2021-01-09 11:27:39.030 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): Request is invalid

And yes my user that connects to the boxes has the required permissions and the boxes have call monitoring enabled.

Sometimes they go online for a couple of seconds and fail again

2021-01-09 11:34:11.514 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.
2021-01-09 11:34:12.080 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond. to OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions.
2021-01-09 11:34:12.081 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): Request is invalid
2021-01-09 11:34:12.584 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (COMMUNICATION_ERROR): Request is invalid to ONLINE
...
14 seconds later
...
2021-01-09 11:34:24.748 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions.
2021-01-09 11:34:26.967 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond.
2021-01-09 11:34:27.528 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (COMMUNICATION_ERROR): FRITZ!Box does not respond. to OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions.
2021-01-09 11:34:27.529 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'avmfritz:fritzbox:192_168_1_1' changed from OFFLINE (CONFIGURATION_ERROR): User openhab has no access to FRITZ!Box home automation functions. to OFFLINE (COMMUNICATION_ERROR): Request is invalid

This is very frustrating and makes the binding unusable for me.

Any Ideas

Yes, I know what you mean, I’m struggling now for months with it. I’m now restarting OH each morning and it seems to me the AVMFritz Binding stops Updating when a specific Shelly 2.5 Actor comes active in the evening, without any messages. Some hours later the same INFO messages appear as @dolittle describes.

Filed an issue in github. Let’s see.

2 Likes