I’ve been playing with the expire binding and I’ve been noticing that the delay between when I turn something on and this rule fires is often over 10 seconds. Is this expected behavior?
Here’s the two log entries showing the delay: 13:09:47.781 [vent.ItemStateChangedEvent] - SirenOn changed from OFF to ON
13:09:59.012 [INFO ] [eclipse.smarthome.model.script.Siren] - Siren Powered ON
And here is the rule: rule “<Siren_Came_On>”
when
Item SirenOn changed from OFF to ON
then
{
SirenAutoOff.postUpdate(ON)
logInfo(“Siren”, “Siren Powered ON”)
}
end
This has nothing to do with the expire binding. The expire binding does not even get triggered till the logInfo line in the rule triggers. Why 12 seconds from the switch being turned on till the rule firing?
Your system is horribly load stressed, e.g. memory oversubscribed etc. You’d probably notice other effects from that, though.
There’s an odd thing where the first time a DSL rule is executed, after editing or after several hours, there is a host dependent delay, often reported around 8 seconds
I would like to point out that in my case the delay is not only just after edit/startup openhab service.
Currently I know that one of zwave devices (danfoss thermostat) sends report every 5 minutes and that cause script engine to reload. I didn’t go further with that yet.
Maybe this is similar case. You can try to log SystemStarted event, or enable all the logs on the most detailed level to know more.