I have connected several Homematic thermostats via CUL Stick and Homegear. OpenHAB and Homegear run in DietPi on a Raspberry Pi 3B. However, when I reboot the system, the thermostats often no longer provide data. Only a restart of the OpenHab service will cause the connection to work. The problem occurs frequently, but not always. How can I find out what the cause is? I have already looked at log files. But I don’t know all the details of openHAB.
With system reboot you mean a restart of the raspberry?
If yes, i think that openhab is starting up faster then your homegear.
I don’t use homegear, but i have a CCU2 for my Homematic devices.
And after an power outage, my openhab is booting faster then the CCU’s, and nothing is working after openhab is ready.
I solve this by a rule at system start up, which will start a timer of 10 Minutes, and will restart the Homematic Binding when the timer is finished.
You could try to restart only the homematic binding the next time this failure is happening.
If it fix it, you could also create a rule for this
My bash-script looks like this:
#!/bin/bash sshpass -p 'habopen' ssh openhab@localhost -p8101 'bundle:restart org.openhab.binding.homematic'
Thanks. I’ll try some restarts until the problem happens again.
Okay, after restarting the homematic binding, I got the following log output. I’m not understanding, what’s going on there. I don’t have a CCU because I’m using the CUL-Stick to communicate with Homematic devices. Any suggestions what to do?
13:27:23.696 [WARN ] [nternal.discovery.CcuDiscoveryService] - Homematic CCU discovery: discovery not possible, no broadcast address found 13:27:24.327 [INFO ] [nternal.communicator.client.RpcClient] - Interface 'WIRED' on gateway '8b08d98f' not available, disabling support 13:27:24.334 [INFO ] [nternal.communicator.client.RpcClient] - Interface 'HMIP' on gateway '8b08d98f' not available, disabling support 13:27:24.341 [INFO ] [nternal.communicator.client.RpcClient] - Interface 'CUXD' on gateway '8b08d98f' not available, disabling support 13:27:24.349 [INFO ] [nternal.communicator.client.RpcClient] - Interface 'GROUP' on gateway '8b08d98f' not available, disabling support 13:27:24.352 [INFO ] [communicator.AbstractHomematicGateway] - HmGatewayInfo[id=HOMEGEAR,type=Homegear,firmware=0.7.45- 3101,address=VBC8678849,rf=true,wired=false,hmip=false,cuxd=false,group=false] 13:27:24.356 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.IllegalArgumentException: hostname can't be null at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149) ~[?:?] at java.net.InetSocketAddress.<init>(InetSocketAddress.java:216) ~[?:?] at org.openhab.binding.homematic.internal.communicator.server.BinRpcNetworkService.<init> (BinRpcNetworkService.java:50) ~[?:?] at org.openhab.binding.homematic.internal.communicator.server.BinRpcServer.start(BinRpcServe...
I have done a few more tests. The Homematic devices are always disconnected if no network is available when the system is started. Even restarting the binding later as suggested does not change this. This situation occurs when I temporarily take my network off power. The Pi with OpenHAB is faster back on the LAN than OPNSense. I still can’t get anywhere in this respect, because I don’t know which component in OpenHAB I need to start when and how. Anyone else out there?
After an openHAB restart I sometimes get the error message "HomematicGateway not yet available! So it seems to be a race condition. Unfortunately, I did not find a question or even a solution to this problem, neither here nor in the german forum. Again and again these little problems that cost hours. I will probably leave openHAB as soon as possible.
- openHAB connects to Homegar using network technologies. So if the network is not existing, it can’t connect.
- Homegear may wait on the network before it starts.
Network was up when I run systemctl restart openhab2. In /usr/lib/systemd/system/openhab2.service I see:
[Unit] ... Wants=network-online.target After=network-online.target
Maybe openHab doesn’t wait on Homematic binding and even on Homegear??
The Homematic Binding is part of openHAB, but openHAB does not care if Homegear is started or not.
Ok, thanks. But how can I solve this problem. I tend to start openHAB manually. Or maybe using Homematic devices without Homegear, if possible?
If you start openHAB manually, just make shure you have started homegear before.
But to be honest, I don’t see the issue. I am also running homegear on the same machine as openHAB and never had an issue. If homegear is not running, the bridge thing will be in state OFFLINE and come back to ONLINE once homegear is running.
What do you mean with that? The System is running all the time you just start openHAB manually or is the system down most of the time and you start the system with openHAB sometimes?
No, it doesn’t. Maybe this is exactly the problem with my installation. Because I don’t know how to solve it, I used to restart openHAB manually after system reboot has finished.
Please post your homematic bridge thing config.
Do you mean homematicbidcos.conf?
No, openHAB config for your homematic/homegear bridge…
Sorry, I cannot find such a configuration in /etc/openhab2.
Ok, did you configure your homematic bridge via PaperUI ?
If so, please post a screenshot from the config params.
Please press the edit button to show us the config details.