[SOLVED] openHABianPI with pivCCU startup

Hi,

I just started with openHAB and had the following challenge:
For the beginning I wanted to just include the lights in my flat but with as less changes as possible. So no changes in cabling, beeing able to use all switches I have and get the desing of the current switches. As solution I found the HomematicIP wich allows me the further use of alternate switches (two switches turning the same light) and it also to use the old masks so it fully integrates in the old design.
Now I have an openHABianPi and on the same device an pivCCU3 (I don’t want to have to more devices than neccessary, so it should all stay on the same raspberry). All together it works like I wanted it.

So after the first setup I shut all down and got a backup of the SD-card to have a working point if I break up something when expanding to more than just the light-control :slight_smile: . Now after getting the SD back in the Pi and starting up at Things all HomematicIP-switches and Gateway-extras get the state “OFFLINE Confirguration Error” while the CCU itself gets “ONLINE”. After a restart of the openhab service all came back online.

2019-10-20 11:17:29.572 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2019-10-20 11:17:31.477 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2019-10-20 11:17:31.525 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Device with address '#deviceID' not found on gateway '#gatewayID'
2019-10-20 11:25:06.335 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from OFFLINE (CONFIGURATION_ERROR): Device with address '#deviceID' not found on gateway '#gatewayID' to UNINITIALIZED
2019-10-20 11:25:06.361 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-10-20 11:25:07.120 [temChannelLinkRemovedEvent] - Link 'Licht_Bad_Power => homematic:HmIP-BSM:#gatewayID:#deviceID:7#POWER' has been removed.
2019-10-20 11:25:07.130 [temChannelLinkRemovedEvent] - Link 'Licht_Bad_Schalter => homematic:HmIP-BSM:#gatewayID:#deviceIDB:4#STATE' has been removed.
2019-10-20 11:25:48.295 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2019-10-20 11:26:02.874 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2019-10-20 11:26:02.976 [hingStatusInfoChangedEvent] - 'homematic:HmIP-BSM:#gatewayID:#deviceID' changed from INITIALIZING to ONLINE

So in the end I assume that the connection between openhab and the CCU does not work if the openhab-service is started before the pivccu is fully started. Just checking if the pivccu-container is pingable in the autostart before the openhab startup would most likely not ensure a workign statup as the internal service would also take some time to startup while the ping already works.
Do you perhaps have any suggestions how to best do the startup-procedure? For the moment I hope to don’t need to restart the PI to often, but if it happens I won’t be happy if I forgot to have to restart the openhab service manually after a few minutes…

Best Regards

Define a Wants and an After line in openhab2.service, like the network-online.target, but for pivCCU3.target. This should prevent openHAB start before the service is started.

1 Like

Thanks for the hint, can you give me additional one where to find the openhab2.service?
Regarding a google-search it should be within /lib/systemd/system but I cannot find it there…
Otherwise I will try with creating the file as on https://github.com/openhab/openhab-linuxpkg/blob/master/resources/systemd/openhab2.service with the additional lines tomorrow

Hi,
many thanks again, I did a further search and found the file in /usr/…
With additionally adding pivccu.service to Wants and After it now worked on the startup (pivCCU3.target was not found, so I searched a bit and tried it with the existing pivccu.service)

1 Like