Piston only runs if tested


#1

1) Give a description of the problem
I want a couple lights to turn off late at night if the motion sensor doesn’t pick up motion between midnight and 5:30am. I know the piston works properly because when I test the piston, it behaves as I want it to. The problem is that the piston never appears to run on its own, only after I test it.

2) What is the expected behaviour?
When the motion sensor doesn’t detect any motion during specific hours, lights turn off.

3) What is happening/not happening?
The piston never appears to run on its own, it only runs when I test it

**4) Post a Green Snapshot of the piston![image|45x37]

.


#2

Move the trigger motion sensor 6 motion stays unchanged for 30 minutes to the first line.


#3

Will try that suggestion but it shouldn’t matter where that particular “if” is located.


#4

In addition to what @jkp said, this might be the case for a double trigger. The reason is the command:
IF Sensor's motion stays unchanged for X minutes
is only true once, exactly 30 minutes after the last motion was detected.

Meaning, if you leave the room at 11PM, it will fire at 11:30, but not do anything because of the time restriction.

I would be tempted to code it this way:

(lines 31-43 is the safety net)


#5

That sounds more likely. Thank you I will give that a try.