Hue binding bouncing between offline and online during reboot

I have a Raspbee installed (on a separate Pi), and I’m using the deCONZ and the Hue binding. Usually I monitor bindings using something like the following rule:

rule "Hue Thing offline"
when
    Thing "hue:bridge:xxxxx" changed from ONLINE to OFFLINE
then
    logInfo("Hue Status", "Hue offline")
end

rule "Hue Thing online"
when
    Thing "hue:bridge:xxxxx" changed from OFFLINE to ONLINE
then
    logInfo("Hue Status", "Hue online")
end

That works quite nice for the other bindings, but the Hue binding somehow thinks it has to make an exception. When I boot the Pi with the Raspbee, this is the log:

2020-06-04 13:27:15.371 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ Status: COMMUNICATION_ERROR
2020-06-04 13:27:15.383 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ Status: Disconnected
2020-06-04 13:27:16.377 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ offline
2020-06-04 13:27:16.731 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:17.277 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:17.399 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:17.754 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:17.767 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:18.230 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:18.232 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:18.765 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:18.765 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:18.943 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:19.013 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:19.330 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:19.703 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:19.703 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:19.867 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:19.990 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:20.316 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:20.464 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:20.824 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:21.354 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:26.308 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:26.465 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:31.892 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:31.906 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:36.826 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:36.849 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:41.832 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:42.037 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:47.414 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:47.418 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:52.428 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:52.603 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:57.383 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:57.533 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:27:58.583 [INFO ] [se.smarthome.model.script.Hue Status] - Hue offline
2020-06-04 13:27:59.068 [INFO ] [se.smarthome.model.script.Hue Status] - Hue online
2020-06-04 13:28:08.237 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ Status: NONE
2020-06-04 13:28:08.249 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ Status: null
2020-06-04 13:28:09.007 [INFO ] [smarthome.model.script.deCONZ Status] - deCONZ online

The other Pi is not reachable at this time, it’s currently rebooting. Why is the Binding bouncing between offline and online status all the time, and how can I avoid this?

Anyone got an idea?

Thanks!

Depending on how the binding is written, how the technology involved works, you can see this kind of thing when it’s retrying comms. You want that to happen after all - try again until it works.

You might add a timer / blocker to your rule to prevent message flooding.

I’d be careful with the changed triggers as well; if the Thing status goes via UNINITIALIZED you’ll miss the events.

The rule is specifically checking for changes between OFFLINE and ONLINE. If the Bridge is not online, why is the Binding then reporting that status? :wink:

I’m just using this for reporting in case something comes not back online - however here I get flooded with reports in a matter of seconds.

You might add a timer / blocker to your rule to prevent message flooding.