Restart timer for motion sensor triggered light

motion

#1

Hi community, I’ve setup the following piston to turn on a light based on motion… Turning on and off as desired however…


I would like the timer to restart if motion is triggered within the 5 minutes…I think it’s an advanced setting but can’t find one that looks correct. Thanks in advance.


#2

Personally I would do it like this.
If you look at the ‘with’ you will see a red N.
This is for Task Cancellation Policy (TCP) and this means that the 5 minute timer will stop if motion is detected before it matures. It will then start again when there is no motion again.
You can use the code to import if you wish.


#3

Thanks for the example… I’ll have a play with that.


#4

this would work too. you dont need any other settings. :slight_smile:


#5

Thanks for this. I like the simplicity of the piston. I know there is another long thread about turning on lights if motion detected, except if manually turned on, but is there a simple way to modify this piston to achieve that.

I really like the TCP of this piston.