Lock door after 10


#1


#2

Not sure what you are asking. But, this might work better


#3

why not just keep it simple?

if (whatever) lock stays unlocked for 10 minutes, with (whatever) lock, lock


#4

I went off what op was trying to do. But in relation to your idea, that is great, if you want to keep the doors locked at all times. However, there are times during the day, that I personally leave my door unlocked. For example going in and out, parties, normal day to day stuff. I would find it frustrating to have to unlock the door every time I go out for a few minutes and then come back in. That being said, I live in an area that is generally pretty safe.


#5

I set mine to relock whenever it remains unlocked for five minutes. I also have it lock at 10:45pm each night, just before bedtime - just in case it’s unlocked for some reason (missed a command?). BUT, along the lines of what you mentioned, I have a virtual “override” switch and piston (SmartThings, Alexa and Action Tiles accessible) that pauses the ‘lock every five minutes piston’ for two hours. It then relocks the door and un-pauses the 5-minute piston. This accounts for the fact that I’d likely forget to relock it. For me, this is the best of both ideas - convenience and safety.


#6

Thanks guys this is my first piston.
I just want to lock my lock after 10pm and then keep checking status if it stays unlocked for 15 min lock again but only between 10pm and say 1am
Gopack2 I cant figure out how you inputed the /* */


#7

Sorry. That variable is not needed in that piston you can delete it. It was a leftover from testing


#8

A really simple piston to accomplish that would look like this:


#9

Thanks for the info that worked great


#10

What happens if the door is unlocked at 12:55 am. Doesn’t it stay unlocked then?


#11

Yes I guess it would but ill be in bed so no one should be unlocking the door.


#12

Im having trouble with these pistons. Cant figure out y this one will not work at all


#13

That piston should only lock the door between 9PM and 6AM…

Also, I would return TCP to default. You do not need the (N) in this piston.


Side Note:
If the door is unlocked at 5:50AM, then it will not lock after the 15 minutes are up, because it will be outside of the time restriction by then.


I am curious what you had to do to get TWO import codes on this piston?!?
I have never seen that before!!


#14

I thought that any time you use a timer I had to use Never cancel tasks.
Also the task does not work at all.
I didnt even notice the two import codes. When I clicked on the icon to create a snapshot nothing happened so I clicked on it again and thats what happened


#15

If the trigger is a precise moment in time, and you use a WAIT, then the commands after the wait need TCP set to Never if you want them to run. On the other hand, the command “stays unlocked for 15 minutes” is not treated like a WAIT. It is treated as a trigger.


I still think setting TCP to “On condition state” is the next move. If that doesn’t resolve the issue, then it would be helpful to turn on full logging and trace before uploading your latest snapshot & logs showing a time period where it did not work…


#16

Im using this piston to lock my front door. Just had a question on how it works
The piston runs at 9 pm and locks the door
but the way I read the piston is that It should lock the door at 9:15 because the timer or the piston should start counting the 15 min at 9PM then at 9:15 if the lock is unlocked then lock it
Also does it make a difference if line 18 and 19 are reversed


#17

Line 18 is a precise trigger that only fires once… 15 minutes after you unlock the door.


#18

Ok got it so the piston allready knows that the lock has being unlocked for 15 min so as soon as the 9 oclock comes around it will unlock.
If I reversed those lines then would the lock unlock 15 min after 9