Create timer using Node Red with duration value taken from item?

Hi everybody,

just migrating from OH2 to OH3, wanted to create the rules I’ve had in OH2 with red node but I have very little practice with that and spent the last 3 days with looking videos and reading tutorials, anyway I couldn’t find the answer to my problem.

I have the following items in OH3:

  • switch tasmotaX
  • number timer_duration

timer_duration is defined as setpoint and can get values between 5 and 30 (minutes in my case).
I just want to define a timer flow that checks the value of timer_duration when tasmotaX is switched ON and sets the switch off after timer_duration has expired.
If tasmotaX is switched OFF and ON again while the timer is running the timer should obviously restart from scratch.

I’ve made some tests with adding a simple delay, but that will be always switch off at a fixed time.

How can I get this timer_duration variable into my flow?

Thank you very much!!!

which palette are you using with OH3?

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