I have Shalge lock with my Vera Plus. I’m trying to figure out how to best setup a scene that if the door is in the UNLOCKED state for more than XX minutes to LOCK it. Can this be done w/ PLEG if so, how? Or can it be done with the normal Vera scenes.
I should work both in PLEG and regular scenes. It just requires a timer. PLEG has that capability, and you can install the countdown timer plug-in. The scene would start a timer when. A second scene would lock the door when the timer completed. Similar in PLEG. Play with it, you will learn trying to get it to work.
THanks, I’ll mess with the countdown timer, still having trouble with fully understanding PLEG with simple scenes like this. Even after printing the entire manual…
PLEG is much more powerful. They way I would do it is create a schedule using a selftrigger, a trigger to start the timer, a condition when the door is unlocked and the time expired, and an action to lock the door when the condition is true. Another learning opportunity ;D
I have this set up on my locks. To do it right you also need a door sensor to be sure the door is shut or the bolt will extend while the door is open.
I have a PLEG trigger for the door being closed and another for it being unlocked. The condition below confirms both are currently true and that they have been that way for more than 3 minutes.
tfrontDoorClosed and tFr_unlocked and ( tFrontDoorClosed ; Now >3:00) and (tFr_unlocked ; Now >3:00)
Then you can use that condition as the trigger for a lock scene or directly add luup code to trigger the lock.
I recommend an additional condition to trigger a notification if the locking failed. e.g. below
That is how I do mine with the exception of having a virtual switch to turn auto locking on and off. It works very well and since I’ve managed to train people to lock the door when they know it should be locked, it’s not even too bad on batteries. That said, my locks use AA batteries so I’m not too concerned with them…
Thanks Kigmatzomat. I’ve moved all my timers over into PLEG and have struggled a bit with getting the lock timer moved in. In my testing, everything was working right, but when I eventually closed the door, it didn’t wait the 3 minutes to lock it. It would immediately lock. I’ll try your condition above and see if that helps.
One comment on your notification. Shouldn’t you have a DoorClosed trigger too? Otherwise when you leave the door open, and unlocked, it will notify you, right?
tfrontDoorClosed and tFr_unlocked and (tFr_unlocked ; Now >5:00)
For Nutshell, I have 4 different scenes running my door lock right now.
Front Door Opens - When my door sensor trips (open) - Action Cancel my Countdown timer
Front Door Closes - When my door sensor untrips (closed) - Start my Countdown timer
Front Door manually locked - When I twist the inside lock or push the lock button outside - Cancel the Countdown timer
Front Door Auto Lock - When the Countdown timer expires, lock the door and notify me.
If you want to be notified of it being left open, then you’d just need to set up a condition to do so. I have a condition that turns off my A/C in the event that the patio door (leading out onto the pool deck) is left open for more than 5 minutes. This allows me to not concern myself with the status of the A/C in the event that I wish to leave the door open. I will likely add some kind of notification to my garage door, but as of this moment, I haven’t. For the door open notification, there’s a post on notifications with repeats…
[quote=“3rdStng, post:7, topic:195632”]One comment on your notification. Shouldn’t you have a DoorClosed trigger too? Otherwise when you leave the door open, and unlocked, it will notify you, right?
tfrontDoorClosed and tFr_unlocked and (tFr_unlocked ; Now >5:00)[/quote]
We don’t use my front door so in my case if the door is unlocked, open or closed, for more than 5 minutes I want to know.
I have a schedule for our garage entry door that excludes our normal home times from notification.
For Nutshell, I have 4 different scenes running my door lock right now.
1. Front Door Opens - When my door sensor trips (open) - Action Cancel my Countdown timer
2. Front Door Closes - When my door sensor untrips (closed) - Start my Countdown timer
3. Front Door manually locked - When I twist the inside lock or push the lock button outside - Cancel the Countdown timer
4. Front Door Auto Lock - When the Countdown timer expires, lock the door and notify me.
I think the countdown tickers are probably overkill. Look at my example again.
tfrontDoorClosed and tFr_unlocked and ( tFrontDoorClosed ; Now >3:00) and (tFr_unlocked ; Now >3:00)
The first two are true/false. The latter two compare the timestamps from the last time the events were true.
If the door is open, tFrontDoorClosed is false and the whole expression is false.
2.When door closes, it sets the tFrontDoorClosed timestamp which is evaluated by the first NOW statement, so it can’t be true until 3 min after door closed.
When it is manually locked, tFr_unlocked becomes false and the whole expression is false.
Have lock scene triggered by the PLEG condition as a device property or use luup code. Include notification as needed.
Now this kind of expression isn’t exact, it might take 3:01 or 3:59 to trip. NOW() is only evaluated once a minute for all conditions, which is where the wobble comes from.But an average of 30s of drift isn’t make or break issue and it keeps the load on the unit down. One precise timer isn’t an issue but after you write a few dozen rules with them they add up, chewing clock cycles and slowing down other functions.
Oh, don’t get me wrong, PLEG is way easier to deal with. My scenes are from before I had PLEG. I tried a few weeks back to move it into PLEG with one additional item. If someone unlocked the door but never opened it, lock it back up after a period of time. My tests before didn’t work as I wanted. But after seeing your condition, I think it will do what I want. And if it does, I can get rid of my last countdown timer.
My Shclage lock does this natively and can be set to be disabled/enable on its own. I believe it’s default to autolock @ 30 seconds. I wouldn’t trust vera to autolock anything.
All of the locks can relock on their own, but you’ll find it beats the door frame to hell when you’re closing the door and the bolt extends. You need a door sensor to ensure that the door is actually closed…
Best Home Automation shopping experience. Shop at Ezlo!