Kwikset Lock after certain time period


#1

1) Give a description of the problem
Door is locking when the door is still open

2) What is the expected behavior?
When it is night time, and the door is closed, then lock the lock, if the lock becomes unlocked, wait a period of time and then re-lock, re-check after certain time period.

3) What is happening/not happening?
The lock is locking when the door is open immediately after I open it. If I go through the door then I want it to weight for at least X number of minutes before it relocks, I also then want it to wait Y period before re-checking if the door is unlocked. Before it does anything it needs to ensure the door contact sensor is truly closed.

4) Post a Green Snapshot of the pistonimage

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

Since you have to unlock the door before it opens, your first IF condition will be satisfied immediately upon unlocking the door:

Door unlocked
Door still reporting closed
Time restriction

Without testing it to find other hiccups, the easiest solution I can think of for your piston would be to change “Contact sensor is closed” to “Contact sensor changes to closed”, then move that line to the top of your IF block so it’s evaluated first:

IF door changes to closed
AND lock is unlocked
AND time restriction

I don’t have a lock so I’ll post up a sample in a few minutes using a light to turn on… just change that device to your door locking and it should work.


#3

Here’s a simplified one to take care of locking the door one minute after closing (and it won’t lock immediately upon opening).

I didn’t quite understand what you’re after with “rechecking if the door is unlocked”. If you can give a real-world scenario, I’ll let you know if the piston below has it covered or if we need to tweak something:


#4

What i meant by rechecking is.

Lets say sunset is 5:30 it checks door is closed but unlocked the piston runs and locks the door

Then at 6:30 i go outside to take the dog out. I want it to run automatically again every hour or so until 5:00 am to make sure the doors stay locked

Id like there to be a small delay from the time the door shuts to the time it locks as well if that makes sense

For example if its running every hour and i went out the door at 6:29 i dont want it to run at 6:30 like the above i want it to wait x number of minutes regardless of the checking every x number of minutes

Thanks in advance
Automation Hoarder


#5

The piston above will be triggered each time the door opens or closes. Between 60 minutes past sunset and 5:30am, when the door is closed and stays closed 1 minute, the door will be locked.

I don’t see any need for a timer or rechecking beyond what is already there… it should meet your wishlist as its written.


#6

This is the one I use. Works great for me. I think it may work for you too:


#7

Thanks everyone