Help with a Piston. Can I have a "running piston" not run again until the first has completed?


#1

1) Give a description of the problem
Temporarily disable alarm system when motion is detected from 1 of 2 sensors inside the home. Then reenable the alarm. This prevents the alarm from going off “if” we were to open the door from the inside.

2) What is the expected behavior?
If alarm is armed at home and motion is detected, disable the alarm for 3 min, then set BACK to armed/stay.

3) What is happening/not happening?
Problem is that when it is “waiting” to renable the alarm, if motion is detected again, it cancels the existing job and never re enables the alarm because the first IF is not true.
4) Post a Green Snapshot of the pistonimage

Capture

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2
  1. you should change with Alarm to with Location
  2. click on the with and then click on the cog and change Task Cancellation Policy to Never Cancel Tasks
    :slight_smile:

#3

Hello,

Thanks for the help. So location is greyed out when i try to replace it with Alarm. What changes when i do do that if i could?

Also, i changed the cancellation policy on with and if it detected motion again during the 3 min wait it seems to have just cancelled the wait and rerun the job. Since the alarm was disabled when the job reran, it never reenables. I have also tried applying the policy to the IF statement and tried the async setting with no luck.