How to run a piston just once per day


#1

Quick question, how do i get a piston to only run once a day?

I want to kick off a piston using motion in the morning but I only want it to run the first time there is motion that day.

Can’t find a straightforward way to do it, but I’m sure there must be one.

Thanks,


#2

You could use a variable that you then reset.
Something around this.
IF
Motion is detected
AND
Variable motiondetected is false.
THEN
WITH
Light
DO
Turn on
Set boolean variable motiondetected to true.

In another statement.
TIME
Every day at 00:01
DO
Set var motiondetected false.

Should work.


#3

Perfect - works a treat.

Thanks very much!


#4


Please, can you check if I wrote correctly the piston that would only run once a day?