# \#timer

**URL:** https://community.openhab.org/tag/timer/200.md

[Latest](https://community.openhab.org/latest.md) · [Categories](https://community.openhab.org/categories.md) · [Tags](https://community.openhab.org/tags.md)

---

## [Openhab 4.2.0 and timers in Javascript](https://community.openhab.org/t/openhab-4-2-0-and-timers-in-javascript/157567)

<div class="topic-metadata">

**Author:** [@Scriptwriter](https://community.openhab.org/u/Scriptwriter)\
**Replies:** 7\
**Last updated:** [August 1, 2024, 8:50pm UTC](https://community.openhab.org/t/openhab-4-2-0-and-timers-in-javascript/157567 "2024-08-01T20:50:40Z")

</div>

I have tried to rescript for openhab 4.2.0 a javascript for simple timercreation/retrigger as long the device draws current und switch off if not. var now = time.ZonedDateTime.now(); // Function to run when the timer g…

---

## [Metadata - expiration timer is not working](https://community.openhab.org/t/metadata-expiration-timer-is-not-working/155282)

<div class="topic-metadata">

**Author:** [@kentestforjob](https://community.openhab.org/u/kentestforjob)\
**Replies:** 1\
**Last updated:** [April 9, 2024, 2:35pm UTC](https://community.openhab.org/t/metadata-expiration-timer-is-not-working/155282 "2024-04-09T14:35:28Z")

</div>

Hello everyone, I am using expiration timmer in metadata of item. I tried to set 15s or 2m to turn off the light but it does not working. Any idea to solve it? Thanks

---

## [Shared cache and timers](https://community.openhab.org/t/shared-cache-and-timers/151807)

<div class="topic-metadata">

**Author:** [@chaoshome](https://community.openhab.org/u/chaoshome)\
**Replies:** 0\
**Last updated:** [December 5, 2023, 8:31pm UTC](https://community.openhab.org/t/shared-cache-and-timers/151807 "2023-12-05T20:31:23Z")

</div>

I’m experimenting with timers and shared cache to store the timer object. What I noticed, is that the object in the shared cache is deleted each time the rule is saved. I guess saving the rule unloads it so according to…

---

## [Best way to reschedule a timer](https://community.openhab.org/t/best-way-to-reschedule-a-timer/37719)

<div class="topic-metadata">

**Author:** [@kevin](https://community.openhab.org/u/kevin)\
**Replies:** 15\
**Last updated:** [November 25, 2023, 6:12pm UTC](https://community.openhab.org/t/best-way-to-reschedule-a-timer/37719 "2023-11-25T18:12:09Z")

</div>

When I need to reset a timer to start again due to a repeat trigger I do with something similar to the rule below. Is there a better way than cancelling the timer each time and creating it again? rule "timed light" when…

---

## [Help with OH 4 Android alarm clock rule](https://community.openhab.org/t/help-with-oh-4-android-alarm-clock-rule/148081)

<div class="topic-metadata">

**Author:** [@lum3n](https://community.openhab.org/u/lum3n)\
**Replies:** 10\
**Last updated:** [October 17, 2023, 4:05pm UTC](https://community.openhab.org/t/help-with-oh-4-android-alarm-clock-rule/148081 "2023-10-17T16:05:54Z")

</div>

Hi, can you please help me fixing the following rule? I finally upgraded from 2.x to 4.0 and am nearly done updating my rules. My alarm clock rule I can’t get to work again. The goal is to send to alarm clock time from …

---

## [Making sure that only one timer exists per itemName](https://community.openhab.org/t/making-sure-that-only-one-timer-exists-per-itemname/149723)

<div class="topic-metadata">

**Author:** [@helipus](https://community.openhab.org/u/helipus)\
**Replies:** 13\
**Last updated:** [September 22, 2023, 1:09pm UTC](https://community.openhab.org/t/making-sure-that-only-one-timer-exists-per-itemname/149723 "2023-09-22T13:09:23Z")

</div>

Hi there, in my JavaScript (ECMAScript 2022+) rule I’m using a function to set a timer for different windows or doors to remind me that these are still open. My goal is I want that for every itemName there is only one …

---

## [Strange behavior with SW Timer @ oh4](https://community.openhab.org/t/strange-behavior-with-sw-timer-oh4/149629)

<div class="topic-metadata">

**Author:** [@olili](https://community.openhab.org/u/olili)\
**Replies:** 32\
**Last updated:** [September 19, 2023, 2:52pm UTC](https://community.openhab.org/t/strange-behavior-with-sw-timer-oh4/149629 "2023-09-19T14:52:34Z")

</div>

I migrated my rule for automatic staircase lights from oh3 to oh4 In case of detected motion the following blockly script will be triggered It’s working as expected as it already did for a couple of years with oh3, …

---

## [OH4: Timers just stop rescheduling](https://community.openhab.org/t/oh4-timers-just-stop-rescheduling/148886)

<div class="topic-metadata">

**Author:** [@Dash](https://community.openhab.org/u/Dash)\
**Replies:** 4\
**Last updated:** [August 20, 2023, 1:53pm UTC](https://community.openhab.org/t/oh4-timers-just-stop-rescheduling/148886 "2023-08-20T13:53:32Z")

</div>

I’m on 4.0.2 and getting funny problems with my timers, they simply stop being rescheduled, which is a problem. I have a lot of movement scripts that will use timers for checking the current state and rescheduling to po…

---

## [No return value when using setTimeout in JavaScript rule](https://community.openhab.org/t/no-return-value-when-using-settimeout-in-javascript-rule/148373)

<div class="topic-metadata">

**Author:** [@Stone](https://community.openhab.org/u/Stone)\
**Replies:** 7\
**Last updated:** [August 10, 2023, 1:15pm UTC](https://community.openhab.org/t/no-return-value-when-using-settimeout-in-javascript-rule/148373 "2023-08-10T13:15:49Z")

</div>

Platform information: Hardware: Dockerized Openhab on a Proxmox VM Host OS: Debian Bullseye Java Runtime Environment: 17.0.7 openHAB version: 4.0.0 Issue of the topic: I’m trying to setup an irrigation configuration…

---

## [Timer with dynamic names in rules](https://community.openhab.org/t/timer-with-dynamic-names-in-rules/147716)

<div class="topic-metadata">

**Author:** [@DivineJimmi](https://community.openhab.org/u/DivineJimmi)\
**Replies:** 11\
**Last updated:** [August 3, 2023, 4:09pm UTC](https://community.openhab.org/t/timer-with-dynamic-names-in-rules/147716 "2023-08-03T16:09:15Z")

</div>

Hello everyone, i have a rule, which notifys me, when a things goes offline. Its a simple, but heavily filled rule. It looks like this: rule "Thing: Offlinegeräte erkannt" when Thing "Device1" changed or Thing…

---

## [Error: "PT2M" is an unsupported type for conversion to time.ZonedDateTime](https://community.openhab.org/t/error-pt2m-is-an-unsupported-type-for-conversion-to-time-zoneddatetime/147873)

<div class="topic-metadata">

**Author:** [@MartOs](https://community.openhab.org/u/MartOs)\
**Replies:** 15\
**Last updated:** [July 21, 2023, 1:35pm UTC](https://community.openhab.org/t/error-pt2m-is-an-unsupported-type-for-conversion-to-time-zoneddatetime/147873 "2023-07-21T13:35:24Z")

</div>

Strange bug maybe. Whenever I restart my Pi, I get error messages for some timers in the logs that say: “PT2M” is an unsupported type for conversion to time.ZonedDateTime at toZDT (/openhab/conf/automation/js/node\_mo…

---

## [Best Practise: 10Min timer?](https://community.openhab.org/t/best-practise-10min-timer/145616)

<div class="topic-metadata">

**Author:** [@binderth](https://community.openhab.org/u/binderth)\
**Replies:** 6\
**Last updated:** [April 27, 2023, 8:41am UTC](https://community.openhab.org/t/best-practise-10min-timer/145616 "2023-04-27T08:41:23Z")

</div>

My use case is as follows: I turn on the coffee machine (porta filter) It needs about 10-15mins pre-heating I forget about it (damn you, ADHD… :wink: ) I’ll remember hours later coffee machine is on standby So what I…

---

## [Killing executing scripts](https://community.openhab.org/t/killing-executing-scripts/146011)

<div class="topic-metadata">

**Author:** [@Dash](https://community.openhab.org/u/Dash)\
**Replies:** 13\
**Last updated:** [April 24, 2023, 2:34pm UTC](https://community.openhab.org/t/killing-executing-scripts/146011 "2023-04-24T14:34:49Z")

</div>

Hi, Still fairly new at this product. I’ve been building up Blockly scripts with generally a large degree of success. Generally I’m creating my logic in scripts and then calling it from a separate rule to act as a tri…

---

## [Timer reschedule loop will not end properly](https://community.openhab.org/t/timer-reschedule-loop-will-not-end-properly/143295)

<div class="topic-metadata">

**Author:** [@corx](https://community.openhab.org/u/corx)\
**Replies:** 2\
**Last updated:** [January 15, 2023, 11:59am UTC](https://community.openhab.org/t/timer-reschedule-loop-will-not-end-properly/143295 "2023-01-15T11:59:34Z")

</div>

Hi folks, I have a problem with my timer reschedule in a rule. The reschedule loop will not end properly. The rule should shut down my heater immediately, when the window is opend. If the outside temperature is lower th…

---

## [Do expire timers survive a reboot?](https://community.openhab.org/t/do-expire-timers-survive-a-reboot/143256)

<div class="topic-metadata">

**Author:** [@jabra\_the\_hut](https://community.openhab.org/u/jabra_the_hut)\
**Replies:** 16\
**Last updated:** [January 12, 2023, 6:28pm UTC](https://community.openhab.org/t/do-expire-timers-survive-a-reboot/143256 "2023-01-12T18:28:29Z")

</div>

Hi, simple question: Do items like Switch myTimer "my dummy Item" { expire="5h,command=OFF" } survive a reboot? Let‘s say from the 5 hours, 3 hours and 42 minutes have already passed. Will myTimer still trigger in 1 ho…

---

## [(Unit of Measure, Time) - Seconds to M:S time to show on Page/OH-Card](https://community.openhab.org/t/unit-of-measure-time-seconds-to-m-s-time-to-show-on-page-oh-card/142739)

<div class="topic-metadata">

**Author:** [@tkca916](https://community.openhab.org/u/tkca916)\
**Replies:** 2\
**Last updated:** [December 31, 2022, 4:37am UTC](https://community.openhab.org/t/unit-of-measure-time-seconds-to-m-s-time-to-show-on-page-oh-card/142739 "2022-12-31T04:37:04Z")

</div>

(Unit of Measure, Time) - Seconds to M:S time to show on Page/OH-Card Hello, I am currently working on building a simple countdown timer and now I am looking at figuring out how to display the time on my page in an eas…

---

## [Slider value in Notifications](https://community.openhab.org/t/slider-value-in-notifications/142510)

<div class="topic-metadata">

**Author:** [@cameronaps](https://community.openhab.org/u/cameronaps)\
**Replies:** 2\
**Last updated:** [December 28, 2022, 10:25am UTC](https://community.openhab.org/t/slider-value-in-notifications/142510 "2022-12-28T10:25:17Z")

</div>

I am trying to use a slider value in as a timer value and also send that value in a notification, both of which I have seen done in examples but nothing will work for me. Could someone please assist with working examples…

---

## [Starting a timer within a timer expiration lambda function generates exception](https://community.openhab.org/t/starting-a-timer-within-a-timer-expiration-lambda-function-generates-exception/139477)

<div class="topic-metadata">

**Author:** [@Mr-JR](https://community.openhab.org/u/Mr-JR)\
**Replies:** 0\
**Last updated:** [September 30, 2022, 6:43pm UTC](https://community.openhab.org/t/starting-a-timer-within-a-timer-expiration-lambda-function-generates-exception/139477 "2022-09-30T18:43:34Z")

</div>

Running openhabian openHAB 3.4.0 Build #3029 I’m trying to understand why the following code generates an exception. I boiled down the code to a minimum for posting. If test is set to 1, it always fails with the except…

---

## [Problems with Timer](https://community.openhab.org/t/problems-with-timer/137785)

<div class="topic-metadata">

**Author:** [@Gthorsten](https://community.openhab.org/u/Gthorsten)\
**Replies:** 8\
**Last updated:** [August 5, 2022, 12:06pm UTC](https://community.openhab.org/t/problems-with-timer/137785 "2022-08-05T12:06:47Z")

</div>

Hi, last week I updated my system from 3.2 to 3.3. After that eyerything looks ok, but now I found a strange behaviour. I did not see this directly after the update, because we have summer, and the heating is not need…

---

## [OH3: Cancel timer not working as intended](https://community.openhab.org/t/oh3-cancel-timer-not-working-as-intended/134975)

<div class="topic-metadata">

**Author:** [@martinhaustorp](https://community.openhab.org/u/martinhaustorp)\
**Replies:** 8\
**Last updated:** [April 9, 2022, 4:13pm UTC](https://community.openhab.org/t/oh3-cancel-timer-not-working-as-intended/134975 "2022-04-09T16:13:34Z")

</div>

Platform information: OS: Unraid with Docker Java Runtime Environment: Dont know openHAB version: 3.2.0 Issue of the topic: I have tried different ways to cancel my timer. But no matter how it is not working as i…

---

## [Variable timer set with a slider input OH3 rule](https://community.openhab.org/t/variable-timer-set-with-a-slider-input-oh3-rule/132462)

<div class="topic-metadata">

**Author:** [@Broncosis](https://community.openhab.org/u/Broncosis)\
**Replies:** 2\
**Last updated:** [January 27, 2022, 11:48pm UTC](https://community.openhab.org/t/variable-timer-set-with-a-slider-input-oh3-rule/132462 "2022-01-27T23:48:30Z")

</div>

I am sure this is been don but I could not find it and I thought it could come in handy I was able to piece this together thanks to many posts from others here it is likely not the best way to do things but it worked fo…

---

## [Android TV - androiddebugbridge. Use a Timer and turn off Outlet](https://community.openhab.org/t/android-tv-androiddebugbridge-use-a-timer-and-turn-off-outlet/132486)

<div class="topic-metadata">

**Author:** [@DMJ](https://community.openhab.org/u/DMJ)\
**Replies:** 0\
**Last updated:** [January 27, 2022, 3:09pm UTC](https://community.openhab.org/t/android-tv-androiddebugbridge-use-a-timer-and-turn-off-outlet/132486 "2022-01-27T15:09:48Z")

</div>

Hello everyone, I am trying to turn off an outlet when my AndroidTV updates to the state OFFLINE. I am noob with rules and stuff. I have surfed through the forum and cannot find a suitable help due to my lack of technic…

---

## [Member of triggered Timer works...but why](https://community.openhab.org/t/member-of-triggered-timer-works-but-why/132410)

<div class="topic-metadata">

**Author:** [@Andreas\_Beistle](https://community.openhab.org/u/Andreas_Beistle)\
**Replies:** 6\
**Last updated:** [January 26, 2022, 11:55am UTC](https://community.openhab.org/t/member-of-triggered-timer-works-but-why/132410 "2022-01-26T11:55:32Z")

</div>

openHAB version: 2.5.12 I got a Rule, which sends an notification to my Smartphone when some Doors or Windows (and some else) state changes and no one is at home. I use the Networkbinding for Presence detection which w…

---

## [Timer Keeps Running \[SOLVED}](https://community.openhab.org/t/timer-keeps-running-solved/132102)

<div class="topic-metadata">

**Author:** [@BigGeorgeTx](https://community.openhab.org/u/BigGeorgeTx)\
**Replies:** 7\
**Last updated:** [January 25, 2022, 12:46am UTC](https://community.openhab.org/t/timer-keeps-running-solved/132102 "2022-01-25T00:46:49Z")

</div>

Platform information: Hardware: Pi4B 4GB OS: openhabian Raspian/GNU Buster Java Runtime Environment: JDK 11 openHAB 3.2 Release Version Issue of the topic: I made my first rule using Blockly to create a script. It i…

---

## [Notification of condition with a built in timer and counter](https://community.openhab.org/t/notification-of-condition-with-a-built-in-timer-and-counter/129462)

<div class="topic-metadata">

**Author:** [@opnhab7373](https://community.openhab.org/u/opnhab7373)\
**Replies:** 6\
**Last updated:** [December 10, 2021, 3:28pm UTC](https://community.openhab.org/t/notification-of-condition-with-a-built-in-timer-and-counter/129462 "2021-12-10T15:28:29Z")

</div>

Hey Folks, I am still on the journey of upgrading from OH2 to OH3 and looking for an alternative (see below) to the rule I use for a variety of circumstances. The issue is that the timer no longer works in OH3. Uses: …

---

## [Timer Cancel Problem](https://community.openhab.org/t/timer-cancel-problem/129263)

<div class="topic-metadata">

**Author:** [@vbbaby3](https://community.openhab.org/u/vbbaby3)\
**Replies:** 3\
**Last updated:** [November 29, 2021, 12:47pm UTC](https://community.openhab.org/t/timer-cancel-problem/129263 "2021-11-29T12:47:34Z")

</div>

Hi, here is my Rule: var Timer myTimer\_Roll\_kueche = null if (r\_kueche.state == 100) { if (myTimer\_Roll\_kueche !== null) { logInfo("rules", "Timer rescheduled") // myTimer\_Roll\_kuech…

---

## [Time based Lights Control](https://community.openhab.org/t/time-based-lights-control/128684)

<div class="topic-metadata">

**Author:** [@Gianluca\_C](https://community.openhab.org/u/Gianluca_C)\
**Replies:** 6\
**Last updated:** [November 12, 2021, 6:37pm UTC](https://community.openhab.org/t/time-based-lights-control/128684 "2021-11-12T18:37:19Z")

</div>

Hello, I have to realize a clock for turning lights ON and OFF with the possibility at any time to set the lights to ON and wait for the timer to turn them off and the other way around. Example. Light 1 Time on 10.00 …

---

## [Timed command repetition](https://community.openhab.org/t/timed-command-repetition/127246)

<div class="topic-metadata">

**Author:** [@mstormi](https://community.openhab.org/u/mstormi)\
**Replies:** 5\
**Last updated:** [October 6, 2021, 2:46pm UTC](https://community.openhab.org/t/timed-command-repetition/127246 "2021-10-06T14:46:37Z")

</div>

Can anyone share a clever idea how to accomplish this in rulesDSL: On an item receiving a command, I need to repeat it for a variable number of times “n” with a variable interval “t” inbetween . n and t are variables or…

---

## [Timer/delay in rules in OH3](https://community.openhab.org/t/timer-delay-in-rules-in-oh3/127060)

<div class="topic-metadata">

**Author:** [@jogi](https://community.openhab.org/u/jogi)\
**Replies:** 2\
**Last updated:** [October 1, 2021, 1:22pm UTC](https://community.openhab.org/t/timer-delay-in-rules-in-oh3/127060 "2021-10-01T13:22:15Z")

</div>

Hi guys As always, I have tried to search first, but I’m getting just old style (OH2) samples, so I would really appreciate a bit of help. I have have upgraded from OH2.5 to 3 and pretty much lost all my home automatio…

---

## [Garagedoor rule with timer for stopped state](https://community.openhab.org/t/garagedoor-rule-with-timer-for-stopped-state/126648)

<div class="topic-metadata">

**Author:** [@dirkdirk](https://community.openhab.org/u/dirkdirk)\
**Replies:** 0\
**Last updated:** [September 18, 2021, 7:42pm UTC](https://community.openhab.org/t/garagedoor-rule-with-timer-for-stopped-state/126648 "2021-09-18T19:42:29Z")

</div>

Openhab 3.1 @ Raspberry 4B 4GB Hi, I need some help with a rule for my garagedoor. It is an old door with a motor, so no smart functions or confirmation about the state. I upgraded it with my smarthome system so that …

[Next page](https://community.openhab.org/tag/timer/200.md?match_all_tags=true&page=1&tags%5B%5D=timer)
