Autolock Door w/ no contact sensor


#1

*1) Give a description of the problem
the door is supposed to lock after being left unlocked for 15 min–i see a timer counting down, but the door does not lock itself after the time runs out

2) What is the expected behaviour?
door locks after being left unlocked for 15 min

3) What is happening/not happening?
door stays unlocked :frowning:

**4) Post a Green Snapshot of the piston![image|45x37]
piston

5) Attach logs after turning logging level to Full
The log is empty

REMOVE BELOW AFTER READING

PS: i am also very very sorry if something like this has already been answered. i am a WINK migrant and i have no idea what i am doing. i was able to do this in wink without a contact sensor. it is a wonder that i was able to download the classic app and install webcore :pensive: thank you in advance for your help :slight_smile:


#2

Your code looks good actually…
(although to be fair, 51 seconds is not long enough to test this)

pic


With that being said, I have a few suggestions:

You can slightly alter line 13 to:

IF Door's lock stays AWAY FROM locked for 900 sec

This will fire when the door is unlocked for that long, but it will also fire if the door is having an error, or unknown. (fairly common, unfortunately)

Speaking of errors, if the door lock is having an error, then sending a new lock command may or may not resolve it. Personally, I like getting an SMS, so at least I am aware of it at that moment.

Another tip is to change your 900 seconds to something like 20 seconds during testing.
(although for proper testing, don’t go less than 12 seconds)


Bonus:

I would also recommend a Full log level, with Trace turned on during testing. It will make troubleshooting much easier. (steps and more info here)


#3

You can also use Automation in the new ST app to perform this task…

d22660f263a9cb6bf65bedffa4eb2eabfe8a468c

just remove the send text message part


#4

Thank you for replying!

Here is the log after I made those changes:

5/18/2020, 9:57:23 PM +873ms
+5ms ╔Received event [Home].test = 1589857043872 with a delay of 1ms
+54ms ║RunTime Analysis CS > 28ms > PS > 6ms > PE > 19ms > CE
+57ms ║Runtime (36258 bytes) successfully initialized in 6ms (v0.3.110.20191009) (50ms)
+58ms ║╔Execution stage started
+72ms ║║Comparison (enum) unlocked stays_away_from (string) unlocked = false (1ms)
+74ms ║║Cancelling any timed trigger schedules for condition 2
+76ms ║║Cancelling statement #2's schedules...
+77ms ║║Condition #2 evaluated false (14ms)
+78ms ║║Condition group #1 evaluated false (state did not change) (16ms)
+83ms ║╚Execution stage complete. (26ms)
+84ms ╚Event processed successfully (84ms)
5/18/2020, 9:55:41 PM +128ms
+0ms ╔Starting piston... (v0.3.110.20191009)
+159ms ║╔Subscribing to devices...
+185ms ║║Subscribing to Side Door Lock.lock...
+262ms ║╚Finished subscribing (124ms)
+294ms ║Comparison (enum) unlocked stays_away_from (string) unlocked = false (2ms)
+296ms ║Cancelling condition #2's schedules...
+297ms ║Cancelling condition #1's schedules...
+309ms ╚Piston successfully started (309ms)

#6

Thanks for the log, but it won’t help without a fresh green snapshot with Trace turned on.


Each log refers to the piston at that time… So editing a piston makes the previous logs obsolete. (and posting a fresh log afterwards, makes the original snapshot obsolete as well)


Also note, that pressing Test will NOT work with this piston.
You actually have to lock the door, pause a moment, and then unlock to test it properly.


#7

So I did try doing it through Automation when I first got the ST hub up, but the door never seemed to autolock, so I figured I was using that function incorrectly, which is what led me to webcore…however, since you suggested it, I just tried it again. Lo and behold—it works, but only when I unlock the door via the app. I figured out it was not working before because I was unlocking the door manually. For some reason, the app is not showing a state change when I unlock the door the old fashioned way with my hands. oh brother-- this seems like a more complicated issue than my if/then statements…


#8

Did you try altering line 13 to:

IF Door's lock stays AWAY FROM locked for 20 sec
Then turn on Trace, and clear log…


Afterwards, to test:

  • Lock the door (using any method)
  • Pause at least 3 seconds
  • Unlock the door (using any method)
  • Wait 25 seconds…
  • Check the log

If something failed, please post a fresh green snapshot and the latest logs. (before editing further)


#9

You may want to post on the ST forum about the lock failing to report status when manually locking/unlocking and tag @ rboy (no space). Run z-wave repair and possible you will need a z-wave repeater if you have a z-wave lock.


#10

I may have to return to this thread after I figure out why ST is not updating the lock’s current state accurately—thank you all!