Help with motion turn off piston

motion

#1

Hey everyone,

I have an odd situation with this piston. It’s design is to turn off the lights if they are on and then no motion is detected for 30 minutes. I have followed other examples, and the piston runs fine when I force it to execute. However, it won’t execute on it’s own. Does anyone have any thoughts?


#2

Rather than this screen capture, you need to post a green snapshot of your piston so we can see the whole thing. Is there a lightning bolt in the left margin?

I suspect it is nearly impossible for all of the motion sensors to go to inactive for 1 minute at the same time which is what I believe is necessary for you if to be true as a trigger. Are all these motion sensors and lights in the same room? Seems like you might need to separate them. @WCmore will be able to tell you more definitively.


#3

Change the piston to,

IF motion sensors 7, 14, 2 stays inactive for 1 minute
AND
IF keypad 1, 8, 12, 13 is ON
Then
Keypad switch 1, 8, 12, 13
Do 
Turn OFF

#4

Here you go.


#5

All the motion sensors are pointed at the same place. According to smartthings there isn’t any motion happening on any of the sensors. Like it said it works fine when executed, but it will not execute itself when the conditions are true.


#6

@guxdude is correct. The code:
IF Sensor's motion stays inactive for 1 minute
is a trigger, not a condition.

(meaning it is only true for an moment, at the instant the 1 minute timer expires)

It is nearly impossible for more than one trigger to be true at the same millisecond.


You might have to change the trigger to something like:

IF *ANY* of Sensor 1, Sensor 2's motion stays inactive for 62 sec   <-- Trigger
Then
    IF *ALL* of Sensor 1, Sensor 2's motion WAS inactive for 1 min  <-- Condition
    Then
        Do stuff
    END IF
END IF

The 2 second overlap is to make sure everything has registered in the hub before continuing.