Expire timer does not always work

  • Platform information:
    • Hardware: Supermicro running ESXI
    • OS: Debian 10.7 VM
    • Java Runtime Environment: 11
    • openHAB version: 3.0.0
  • Issue of the topic: Expire timer does not work for long time duration
  • Please post configurations (if applicable):

I am using a Zwave wallswitch, with the switch connected to a bathroom fan. I have the Expire Metadata set for it with the following code, however it does not work as expected:

value: 0h20m0s,command=OFF
config: {}

Screen snip:

I can use this same item but set the Expire to 2 minutes, 3 minutes, 5 minutes, 10 minutes and it works properly. But when it is set to 20 minutes it fails to complete and turn the fan off. Also have set it for 30 minutes and same failure.

Is there any way to see if the Expire timer is activated, and/or what its remaining time is?

Thanks
Craig

Hi Craig,

just a quick guess: Remove the “0h … 0s” in the expire duration and see if that makes it work.

I have/had a few items that use/d expire times in your time range and they all work/ed without a problem.

1 Like

Expire timer restarts when the target Item receives any update.

I expect your zwave switch is issuing routine status messages every 15 minutes?

Expire does not solve all timing requirements, sometimes you need rules.

1 Like

Thanks Lars and rossko57.

I cut the command to only contain “20m”, however as soon as I saved it, the 0h and 0s were added back on. I’m using the GUI for all editing and configuration.

I’ll watch the switch item to see if any updates are sent. Thanks for the hint if I may need to implement some rules for Expire functionality.

I will follow up and post what I find out.

Thanks for the pointers.
Craig

I too am having intermittent failures with Expire Timers, but I am using .item text files. It’s not frequent, but it is real. It happened today. Never had a problem using same item text files in 2.5.x. Because it doesn’t happen all the time, I think it is going to be difficult for me to trace to a root cause. Mine is set to 15s.

Doing, or not doing, what?

If you suspect unexpected Item updates, you don’t get to see Item state-updated-to-same-value in your events.log
That does make it harder to understand.

But you can capture those with a little rule, example

rule "diagnostic"
when
   myItem received update
then
   logInfo("diagnostic", "Updated to " + myItem.state.toString)
end

and look in openhab.log for the messages

1 Like