Homematic UNREACH not updated on restart

Hello everyone!

I’m using the latest openHAB 2.2 snapshot and Homegear version 0.7.8-1314.

Every Homematic device/thing exposes an Item called UNREACH, reflecting the unreachable information also visible in homegear directly. I’m seeing the issue, that these are not correctly loaded. A typical scenario is a reboot of my RPi. After I gave openHAB a few minutes to initialize, it got the unreachable state for some devices, not all. This will not change over the coming minutes, hours or days.
All Homematic things are ONLINE, the other items of the devices are working correctly.

The problem seems to be, that the binding does not reliably request or receive this channel. Is that behavior known or reproducible on other systems?

openhab> smarthome:items list | grep gUnreach
BD_Deckenlicht_Unreach		(Type=SwitchItem, State=NULL, Label=Bad Deckenlicht unreachable, Category=siren, Groups=[gW, gUnreach])
BD_Fenster_Unreach		(Type=SwitchItem, State=OFF, Label=Bad Fenster unreachable, Category=siren, Groups=[gW, gUnreach])
BD_Heizung_Unreach		(Type=SwitchItem, State=NULL, Label=BD_Heizung unreachable, Category=siren, Groups=[gBDHeat, gUnreach])
BD_Tuer_Unreach			(Type=SwitchItem, State=OFF, Label=Bad Tür unreachable, Category=siren, Groups=[gW, gUnreach])
BD_Waschmaschine_Unreach	(Type=SwitchItem, State=NULL, Label=Waschmaschine unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Edison_Dimmer_Unreach	(Type=SwitchItem, State=NULL, Label=Edison Dimmer unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Fenster_Unreach		(Type=SwitchItem, State=OFF, Label=Küche Fenster unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Heizung_Unreach		(Type=SwitchItem, State=NULL, Label=FK_Heizung unreachable, Category=siren, Groups=[gFKHeat, gUnreach])
FK_Kuehlschrank_Unreach		(Type=SwitchItem, State=NULL, Label=Kühlschrank unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Spuelmaschine_Unreach	(Type=SwitchItem, State=NULL, Label=Spülmaschine unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Taster_Schrank_Unreach	(Type=SwitchItem, State=OFF, Label=Küchenschrank Taster unreachable, Category=siren, Groups=[gW, gUnreach])
FK_Taster_Tokyo_Unreach		(Type=SwitchItem, State=NULL, Label=Flur Taster Tokyo unreachable, Category=siren, Groups=[gW, gUnreach])

I don’t see this behaviour with my items. Unreach is updated the same as other channels. I am using the ccu2 as the bridge.

After some time for thoughts I realized, that the behavior is not limited to unreach items. However other than e.g. the readings of a temperature sensor, the UNREACH channel isn’t updated regularly.

After some more time, I realized, that there is the long forgotten channel RELOAD_ALL_FROM_GATEWAY. And look what happens, as soon the channel is triggered all items, including UNREACH, are updated from homegear. I’ve now added the reload datapoints action to a “system started” rule and my issue is solved.

I’m btw seeing this behavior on two independent setups, both running homegear locally. @job are you using restoreOnStartup and if so, could it be that is why you are not seing NULL items?

@gerrieg Is the not-loading of states at startup intended behavior or is it specific to homegear? My workaround is doing the job now but if possible it would be great if the loading of states at startup could be fixed. Let me know if you need additional debugging details.

Loading values at startup and with reload_all_from_gateway is exactly the same, there should be no difference. The same is for a CCU or Homegear. The binding also does not differentiate the channels by name, it treats all the same.
The values from channel zero, the one with the UNREACH flag, are always loaded, regardless of whether they are bound to an item or not.

What you can try is to switch the binding into TRACE mode, start OH or the binding, wait until everything has been initialize, then do a reload_all_from_gateway and send me the logfile. Also tell me the device addresses with the wrong UNREACH values. Maybe i find something in the log that I can narrow the problem.

Yes, i am using restoreOnStartup, but the UNREACH items are not persisted. I just persist some items.

Finally got around to do the testing.

Here’s the log on reboot on DEBUG level: https://pastebin.com/D9pD4C5N
And this is added after triggering the reload_all_from_gateway switch: https://pastebin.com/9xqwbJm0

The same on TRACE is just too much. Could you please tell me what to grep for in order to gain useful data? If you need everything I guess I could paste it somewhere.