Auto Lock Closed Door after Inactivity


#1

1) Give a description of the problem
When my piston triggers due to a “stay” trigger after X minutes and not all of the triggers are met core re-schedules piston to run another X minutes in the future even though the other triggers will be true in a much shorter period of time.

2) What is the expected behavior?
X minutes after both contact sensors close and motion ceases the door should lock.

3) What is happening/not happening?
A timer for X minutes is scheduled when the door closes then a few minutes later the motion sensor goes inactive. The timer isn’t re-scheduled and when the piston triggers from the timer the motion sensor hasn’t been inactive for X minutes yet. Core then re-schedules the timer for another X minutes instead of (X - motion sensor inactivity time).

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
Will Post Logs tomorrow morning.

Based on reading the triggers vs conditions I’m thinking I need to have three different if blocks one for Contact 1, Contact 3, and Motion. Then for each trigger verify that all three have been closed/inactive for X minutes and then lock the door.


#2

Try this format, I shortened the time and changed the SMS for my short test.


#3

Don’t I need some logic to cancel the Wait if any of the conditions change? Like if I have Wait 15m and one of the doors open I need to cancel that wait right?


#4

The default cancel policy is cancel on condition change so it will reset the wait each time it changes.


#5

Thanks! That worked much better.