Light triggered by motion

Hi,

I’m new to Node Red and I’m experimenting with motion detection and turning on my light in the bath. Everything is working fine, just a little issue with the delay.

I want a delay of 1 minute to turn the light off if there is no more motion. But if there is motion afterwards, he should again start counting the delay from 0. Unfortunately, I don’t know how to implement it into my current flow so he stops the process of turning it off after the 1 minute delay.

Is there any good tutorial for this?

There is a standard trigger node from NR which you can use. In there, you can specify a delay and if there is another motion within the delay, the delay will reset

2 Likes

thank you, this worked perfectly with this trigger!

I’m new to NR and I’m facing the exact same problem, but I couldn’t figure it out yet.
Would you mind sharing your flow/setup?
Thanks!

Do consider the standard HA automation, this is a simple automation setup there

Thanks! But I’m going the other way around.
I’m trying to learn Node-Red and therefore converting my existing HA automations to NR flows!
I found a YouTube video which describes exactly what I needed: https://www.youtube.com/watch?v=tHGt4GeHWVE&t=0s

This may also help.

Hi, which node is that and how to specify the delay and the reset?
Very curious. :wink: