I’m running openHAB3 and having some problems with a binding, which regularly irregularly runs into an error. I then can either turn off the device, restart it and the binding would go Online again, or I can stop the binding, wait for a few minutes and restart it with the same effect. (I suspect some kind of overflow within the device).
So, my use case for a rule would be:
check the binding’s status
if it is “ERROR” - deactivate the binding
wait for a few minutes
restart the binding
So, is there a way to achieve this with built-in logic within a OH3-rule?
Not entirely. You can trigger the rule when the Thing enters an error state. You can wait a few minutes. But you’ll have to resort to executeCommandLine or the Exec binding to log into the karaf console and issue the commands to stop and restart the binding.