Sometimes my locks don't all lock

Is there a reason why all my locks don’t always lock? Do I need to run in some parallel mode or something?

I have not tested your code. But your trouble is probably with the WAIT. Take a look at TCP (Task Cancellation Policy). Once your WAIT is finished, your trigger (your IF statement) may no longer be true. And your THEN never gets executed.

Thanks @Pantheon. Something like this?

Try if alarm “stays” disarmed for 5 minutes.
Then…

The variables were ok in the first Piston.

Wait with triggers sometimes act funky. Stays is sorta wait but more reliable.

Agreed. I love using WAITS, but they do sometimes introduce nuisances in execution. The way you have it now should work. You only need to put the TCP on your first IF. It will be applied to everything within that IF. Your variables before were fine. You just did not use them in your code -
Such as

WITH
  GarageDoors
  Do
    Close;

If you were using those variable names often in your code, you could just use GarageDoors.

Thanks for your feedback. I removed the TCP condition on all but the IF statement. I don’t think I can use the Stays since I’m triggering on the Alarm moving away from disarmed and waiting 5 min for everyone to get out such that ST can lock up the house.

I’ll see how this works over the week since it fails somewhat infrequently.

:+1: Let us know how it goes. Always happy to help.

That would be If stays armed…

Changes away from is a “Trigger” (Changes away from disarmed)
Change to is a “Trigger” (Changes to armed)

You can say either and it means the same thing.

“Stays” is a “Trigger” with a timer… which simplifies the logic

If ____Changes away from disarmed
Then
Wait 5 minutes

The above is 2 things webCoRE has to monitor

If Stays armed for 5 minutes

Only one thing to monitor

Same concept, less arguments.

@rontalley thanks for the explanation! I’m going to change that and see how it goes. I take it I still have to never TCP option on the if statement.

In my experience, you do not have to use TCP when you do not have a WAIT.

1 Like

Z-Wave timing issue, try adding a buffering device, see this: FAQ: why would I need another beaming repeater if my zwave lock is already close to my hub? - #2 by RBoy