[deconz] rules permanently not working when deconz API is temporarily unavailable during OpenHAB boot #13740
Labels
awaiting feedback
bug
An unexpected problem or unintended behavior of an add-on
stale
As soon as a PR is marked stale, it can be removed 6 months later.
Rules depending on the deconz binding for switches/channels don't work when OpenHAB boots up while the deconz API is not available.
Expected Behavior
OpenHAB's deconz binding should retry to connect to the deconz API from time to time, and if it is connected, the rules should load/activate without user intervention required.
Current Behavior
The rules never fire, as if OpenHAB is not aware of deconz trigger events. Only when restarting OpenHAB while the deconz API is already online will the rules become responsive.
Possible Solution
I'm guessing that either the deconz binding goes into a permanent silent error state when the deconz API is not available, or the channels that depend on the deconz binding will get stuck in a permanent 'deaf' state. Something that is not working needs to re-activate themselves from time to time, for example every 60 seconds, or for a more perfect implementation it should retry fast first and then slower, e.g.: after 2 seconds, then after 4 seconds, then 8, 16, 32, and then just every minute permanently until the API comes online.
Steps to Reproduce (for Bugs)
Have OpenHAB and DeCONZ on different machines. Start OpenHAB first, start DeCONZ later. Rules responding to channel events are not working.
Context
I run deCONZ on a Raspberry Pi 0, and OpenHAB 3.3.0 on a Raspberry Pi 3. Post power outage, both Raspberry's race to be online first. If deCONZ Pi 0 is online first, there is no problem. But when OpenHAB Pi 3 is online first, any rule depending on deCONZ will permanently not work, even though the deconz API comes online seconds later. To fix the problem, I need to restart the OpenHAB Pi 3.
Your Environment
OpenHAB 3.3.0 docker version running on Linux 5.10
The text was updated successfully, but these errors were encountered: