Door Lock Routine Suddenly Stopped Working


#1

I’ve been using this piston for quite a while and it’s mainly worked flawlessly up until November 23rd when it seems to have just dropped dead and no longer functions. Can anyone spot the issue?

I did switch over to the new ST app not that long ago, but well before the date in question.


#2

Does it run? Logs?


#3

Well, I went to go get a log showing it stopping on 11/23 and see now that it ran yesterday, but that’s it back to 11/23:

11/30/2020, 4:17:09 PM +158ms
+176ms ║Front door re-locked after 30 minutes during day hours

Not sure what I did. I was just outside so it’s due to lock again in 5 minutes. Waiting to see if it does so. Perhaps just reloading the dashboard can kick it out of whatever funk it was in???


#4

Pause and resume also works in some cases if it’s been working just fine for months. I have one with a timer that seems to die once in a while, it triggers but just doesn’t run the tasks. This is on Hubitat though.


#5

Well, the period came and went. It didn’t relock and the log is just as above (here’s a snippet):

11/30/2020, 4:17:09 PM +158ms
+176ms ║Front door re-locked after 30 minutes during day hours
11/23/2020, 9:59:07 PM +172ms
+316ms ║Front door re-locked after 30 minutes during day hours
11/23/2020, 4:37:42 PM +216ms
+309ms ║Front door re-locked after 30 minutes during day hours
11/23/2020, 10:34:04 AM +116ms
+192ms ║Front door re-locked after 30 minutes during day hours


#6

I would love to see a Full Log showing any errors.


I am actually surprised that three overlapping timers worked well in the past.
Normally, I keep STAY timers separate, or use only one, with WAITS to continue the logic. IE:

IF Sensor7's contact stays closed for 1 min  <-- Trigger
Then
    Lock
    Wait 1 min

    IF Sensor7's contact is closed           <-- Condition
    Then
        Lock
        Wait 28 min
    END IF

    IF Sensor7's contact is closed           <-- Condition
    Then
        Lock
    END IF
END IF

Note:
Opening Sensor7’s contact will cancel all the timers, and closing it will start all over at the top.
(although notice only one timer will be running at any given moment)


… or that same logic flow condensed:

IF Sensor7's contact stays closed for 1 min  <-- Trigger
Then
    Lock
    Wait 1 min
    Lock
    Wait 28 min
    Lock
END IF

This version runs at the same intervals (1, 2, and 30 min), and will also abort if the door opens.
(but is not as customizable)


Pro Tip:

In my experience, every piston with STAY as a trigger, (IE: every piston on this page) should limit the triggers to a single “device:attribute”, as you have done. :+1:


#7

Thanks WC. Not sure I quite follow the logic here as it appears it would wait a minute and lock, then look to lock again (a minute later) and then look to lock again 28 minutes later. None of that has anything to do with what time it is. What am I not following?

The point of the piston is to lock the door after 30 minutes if it’s daytime (and I’m likely walking around the yard or doing something), after 2 minutes if it’s night time (and I likely just came in from an errand) or after 1 minute if the alarm state is set to Armed.


#8

Yes, in my example above I stripped down the logic to the bare essentials, but all those extra conditions can be added to any step along the way.


#9

Okay. Got it now. Thanks!