FritzBox Tr064: Connection problem after RPI3-reboot

Hi,
I’m using the FritzBox Tr064 binding on a Raspberry Pi 3. After every reboot, the binding does not connect to my FritzBox:

2017-10-10 18:33:22.620 [DEBUG] [org.openhab.binding.fritzboxtr064 ] - BundleEvent STARTING - org.openhab.binding.fritzboxtr064
2017-10-10 18:33:22.671 [DEBUG] [org.openhab.binding.fritzboxtr064 ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/command/*, service.pid=org.openhab.fritzboxtr064, url=https://192.168.0.1:49443, pass=xxx, component.name=org.openhab.binding.fritzboxtr064.binding, component.id=193, service.id=317, service.bundleid=201, service.scope=bundle} - org.openhab.binding.fritzboxtr064
2017-10-10 18:33:22.709 [DEBUG] [xtr064.internal.FritzboxTr064Binding] - FritzBox TR064 Binding activated!
2017-10-10 18:33:22.713 [WARN ] [xtr064.internal.FritzboxTr064Binding] - Fritzbox User was not provided in config. Using default username.
2017-10-10 18:33:23.662 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Failed to receive valid response from httpGet: Connect to 192.168.0.1:49443 [/192.168.0.1] failed: Das Netzwerk ist nicht erreichbar (connect failed)
2017-10-10 18:33:23.665 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Releasing connection to FritzBox because of error!
2017-10-10 18:33:23.668 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Could not read xml response services
2017-10-10 18:33:23.673 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Failed to receive valid response from httpGet: Connect to 192.168.0.1:49443 [/192.168.0.1] failed: Das Netzwerk ist nicht erreichbar (connect failed)
2017-10-10 18:33:23.676 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Releasing connection to FritzBox because of error!
2017-10-10 18:33:23.679 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Could not read xml response services
2017-10-10 18:33:23.695 [WARN ] [ing.fritzboxtr064.internal.Tr064Comm] - No tr064 service found for service id urn:WLANConfiguration-com:serviceId:WLANConfiguration2
2017-10-10 18:33:23.699 [WARN ] [ing.fritzboxtr064.internal.Tr064Comm] - No tr064 service found for service id urn:WLANConfiguration-com:serviceId:WLANConfiguration3
2017-10-10 18:33:23.701 [DEBUG] [ing.fritzboxtr064.internal.Tr064Comm] - Found 2,4 Ghz Wifi
2017-10-10 18:33:23.706 [TRACE] [xtr064.internal.FritzboxTr064Binding] - FritzboxTr064 executing…
2017-10-10 18:33:23.715 [DEBUG] [.FritzboxTr064GenericBindingProvider] - Adding item fboxRinging with config callmonitor_ringing
2017-10-10 18:33:23.720 [DEBUG] [.FritzboxTr064GenericBindingProvider] - Adding item fboxIncomingCall with config callmonitor_ringing
2017-10-10 18:33:23.724 [DEBUG] [.FritzboxTr064GenericBindingProvider] - Adding item larsOnline with config maconline:7C-F9-0E-70-8E-80
2017-10-10 18:33:23.727 [DEBUG] [org.openhab.binding.fritzboxtr064 ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.fritzboxtr064.FritzboxTr064BindingProvider}={component.name=org.openhab.binding.fritzboxtr064.genericbindingprovider, component.id=194, service.id=316, service.bundleid=201, service.scope=bundle} - org.openhab.binding.fritzboxtr064
2017-10-10 18:33:23.729 [DEBUG] [org.openhab.binding.fritzboxtr064 ] - BundleEvent STARTED - org.openhab.binding.fritzboxtr064
2017-10-10 18:33:35.325 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: not authorized
2017-10-10 18:34:30.574 [TRACE] [xtr064.internal.FritzboxTr064Binding] - FritzboxTr064 executing…
2017-10-10 18:34:30.582 [DEBUG] [xtr064.internal.FritzboxTr064Binding] - call monitor is not running. Configured items require call monitor → Starting call monitor…
2017-10-10 18:34:30.584 [DEBUG] [xtr064.internal.FritzboxTr064Binding] - Downloading phonebooks
2017-10-10 18:34:30.590 [INFO ] [tzboxtr064.internal.PhonebookManager] - Downloading phonebook ID 0
2017-10-10 18:34:30.592 [WARN ] [ing.fritzboxtr064.internal.Tr064Comm] - No tr064 service found for service id urn:X_AVM-DE_OnTel-com:serviceId:X_AVM-DE_OnTel1
2017-10-10 18:34:30.737 [WARN ] [ing.fritzboxtr064.internal.Tr064Comm] - Error constructing request SOAP msg for getting parameter. null
2017-10-10 18:34:30.739 [DEBUG] [ing.fritzboxtr064.internal.Tr064Comm] - Request was: phonebook:0
2017-10-10 18:34:30.740 [WARN ] [ing.fritzboxtr064.internal.Tr064Comm] - Could not determine data to be sent to FritzBox!
2017-10-10 18:34:30.741 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread FritzboxTr064 Refresh Service
java.lang.NullPointerException: null
at org.openhab.binding.fritzboxtr064.internal.Tr064Comm.getTr064Value(Tr064Comm.java:161) [201:org.openhab.binding.fritzboxtr064:1.11.0.201710050110]
at org.openhab.binding.fritzboxtr064.internal.PhonebookManager.downloadPhonebook(PhonebookManager.java:120) [201:org.openhab.binding.fritzboxtr064:1.11.0.201710050110]
at org.openhab.binding.fritzboxtr064.internal.PhonebookManager.downloadPhonebooks(PhonebookManager.java:133) [201:org.openhab.binding.fritzboxtr064:1.11.0.201710050110]
at org.openhab.binding.fritzboxtr064.internal.FritzboxTr064Binding.execute(FritzboxTr064Binding.java:181) [201:org.openhab.binding.fritzboxtr064:1.11.0.201710050110]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [191:org.openhab.core.compat1x:2.2.0.201710072239]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [191:org.openhab.core.compat1x:2.2.0.201710072239]

When I restart OH2 (without RPI-reboot!), the bindings works as expected. Maybe the binding tries to connect the Fritzbox when the wifi connection has not been established?

/var/log/kernel.log:

Oct 10 18:32:44 raspberrypi kernel: [ 6.406408] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Oct 10 18:32:45 raspberrypi kernel: [ 6.891927] IPv6: ADDRCONF(NETDEV_UP): enxb827ebc6a80e: link is not ready
Oct 10 18:33:27 raspberrypi kernel: [ 49.356823] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

In this case, it should re-try to establish a connection…

You may try to configure your RPi for “Wait for network at boot”:

Thanks, this is a workaround. Nevertheless, I think the binding should be fixed so that it tries to reconnect. I haven’t any similar problems with other network-dependent bindings like the hue binding.

I don’t know it it needs to be “fixed”, but you could open a problem report at

I did not even notice this because one of my first actions after setting up a RPi is to enable the “Wait for network at boot” :grinning: