Questions about timing

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>”
Item SirenOn changed from OFF to ON
logInfo(“Siren”, “Siren Powered ON”)

There is a minor bug causing +1 effect on any expire period specified n seconds

There are alternative timing methods if you must have better accuracy.

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?

Oh right. Two likely causes of delay -

  • 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

Well, %CPU idle runs between 99.2 and 99.7 so I assume that’s not the problem.

It’s a Rpi 3a running Openhabian and nothing else. Most current version of OH. I thought it was Master, but it shows as 2.5.7-1 (Release Build).


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.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.