Lock all doors at set time if unlocked... best way.

I have a scene I’d like to move to PLEG that locks all my doors at a certain time. What’s the best way to do this?

I could easily just create a cFrontDoorUnlocked or cBasementDoorUnlocked or cGarageDoorUnlocked type condition to trigger an action to lock all doors but that seems inefficient, although that’s kind of how the scene works now.

If one door is unlocked will Vera/PLEG send the lock command to all doors even if they are locked or is Vera “smart” enough to know that it is already locked and send the command only to the door that needs it?

Should I create conditions/actions to do each one independently? There seems to be a better way.

I know this is pretty basic, but I’m not sure how Vera handles commands sent to devices that don’t need it. Does it check state first and send or not send or does it just fire the command blindly. Is it even worth worrying over? After all, this is just a safeguard and would only happen if we forget to lock a door.

Not PLEG but, I’m on UI7 and I just have Night mode setup that all doors are locked, then at 10pm I have a scene run that changes to Night mode and locks all doors.

The Lock Devices in Vera are smart enough to ignore LOCK requests if the door is already locked.

I just have a PLEG timer attached to a condition that LOCKS all my doors and closes any Garage Doors (Basically these look like a lock) at sunset.

After dark I like to have mine autolock after several minutes of being unlocked. Front door locks alot faster then the rear. I think my front door is 5 min. and rear around 15 or 20. So It doesn’t have to wait until say 10pm to lock and if I happen to go out or leave the door unlocked after that 10pm mark my doors will still get locked.

Sometimes I seem to stumble in late and forget how I got home or to lock the door. ;D

[quote=“RichardTSchaefer, post:3, topic:188159”]The Lock Devices in Vera are smart enough to ignore LOCK requests if the door is already locked.

I just have a PLEG timer attached to a condition that LOCKS all my doors and closes any Garage Doors (Basically these look like a lock) at sunset.[/quote]

Thanks Richard, just what I was wondering.

If I may ask, why use a timer instead of a schedule set to sunset? Is it in case of the off chance a door was opened right before sunset and you wouldn’t want a lock command sent to a door that may still be ajar?

[quote=“RHINESEL, post:5, topic:188159”][quote=“RichardTSchaefer, post:3, topic:188159”]The Lock Devices in Vera are smart enough to ignore LOCK requests if the door is already locked.

I just have a PLEG timer attached to a condition that LOCKS all my doors and closes any Garage Doors (Basically these look like a lock) at sunset.[/quote]

Thanks Richard, just what I was wondering.

If I may ask, why use a timer instead of a schedule set to sunset? Is it in case of the off chance a door was opened right before sunset and you wouldn’t want a lock command sent to a door that may still be ajar?[/quote]

If you don’t want the lock to lock while the door is opened then you need to isolate and add more logic to each door lock. IE…

Action to lock front door = Night and !FrontDoorOpen and (!FrontDoorOpen; Night)

Again this only works one time and if you unlock the door again for some reason after night (or the time you have set fires) it will never lock again the whole night.

I actually have two door-related PLEG conditions:

One notifies me if any door is open for more than 5 minutes. More than once that has made my wife turn around to properly close a door that the kids didn’t properly close as they left the house.

The other locks the door 5 minutes after it has been closed.

I also have a “goodnight” scene that shuts off all of the lights except the outside porch light, locks all the doors, and arms their sensors.

@JoeTomasone,
Is it possible for to share your PLEG report so others might gain insight into how you solved your door open and locking your door. It seems that a lot of folks are off solving aspects of their home automation problem but getting insight into possible solutions, new techniques and general usage that isn’t always apparent can go a long way. thanxs in advance Mike

[quote=“JoeTomasone, post:7, topic:188159”]I actually have two door-related PLEG conditions:

One notifies me if any door is open for more than 5 minutes. More than once that has made my wife turn around to properly close a door that the kids didn’t properly close as they left the house.

The other locks the door 5 minutes after it has been closed.

I also have a “goodnight” scene that shuts off all of the lights except the outside porch light, locks all the doors, and arms their sensors.[/quote]

[quote=“MNB, post:8, topic:188159”]@JoeTomasone,
Is it possible for to share your PLEG report so others might gain insight into how you solved your door open and locking your door. It seems that a lot of folks are off solving aspects of their home automation problem but getting insight into possible solutions, new techniques and general usage that isn’t always apparent can go a long way. thanxs in advance Mike

[quote=“JoeTomasone, post:7, topic:188159”]I actually have two door-related PLEG conditions:

One notifies me if any door is open for more than 5 minutes. More than once that has made my wife turn around to properly close a door that the kids didn’t properly close as they left the house.

The other locks the door 5 minutes after it has been closed.

I also have a “goodnight” scene that shuts off all of the lights except the outside porch light, locks all the doors, and arms their sensors.[/quote][/quote]

Sure:

Triggers

Name Description

FrontDoorOpen Whenever Front Door is opened whether is armed or disarmed
FrontDoorUnlocked Front Door Lock is opened
GarageDoorOpen Whenever Inside Garage Door is opened whether is armed or disarmed
GarageDoorUnlocked Garage Door Lock is opened
OutsideGarageDoorOpen1 Whenever Outside Garage Door detects motion whether is armed or disarmed
RearDoorOpen Whenever Rear Door is opened whether is armed or disarmed

Conditions

Name Repeat Expression
DoorOpen5Mins No (FrontDoorOpen and (FrontDoorOpen; Now > 300)) OR (RearDoorOpen and (RearDoorOpen; Now > 300)) OR (GarageDoorOpen and (GarageDoorOpen; Now > 300))
FrontDoorUnlocked5Mins No (FrontDoorUnlocked and !FrontDoorOpen and (FrontDoorUnlocked; Now > 300))
GarageDoorUnlocked5Mins No (GarageDoorUnlocked and !GarageDoorOpen and (GarageDoorUnlocked; Now > 300))
GarageDoorUp5Mins No (OutsideGarageDoorOpen1 and (OutsideGarageDoorOpen1; Now > 300))

Actions

Actions for Condition: DoorOpen5Mins

Device Actions:

Immediate

Device Action Arguments
VeraAlerts SendAlert Message=A door has been open for more than 5 minutes. Recipients=tomasone

Actions for Condition: FrontDoorUnlocked5Mins

Device Actions:

Immediate

Device Action Arguments
Front Door Lock SetTarget newTargetValue=1

Actions for Condition: GarageDoorUp5Mins

Device Actions:

Immediate

Device Action Arguments
VeraAlerts SendAlert Message=The Garage Door has been up for 5 minutes. Recipients= HouseModeMask=

Notifications

Name Description Users Last Sent
DoorOpen5Mins PLEG Automation has satisfied condition: DoorOpen5Mins undefined
DoorAutoLocked PLEG Automation has satisfied condition: FrontDoorUnlocked5Mins undefined
GarageDoorAutoLocked PLEG Automation has satisfied condition: GarageDoorUnlocked5Mins undefined
GarageDoorUp5Mins PLEG Automation has satisfied condition: GarageDoorUp5Mins undefined

@JoeTomasone,

Many thanxs for sharing your PLEG solution. I like that you’ve included both your door locks and Garage as many of us have the same HA issues and this helps in establishing a baseline PLEG rather than trying to re-invent the wheel every time. Mike

Richard,
I would assume that there should be several total HA PLEG solutions out there that could help/guide both novices and experts to quickly establish and setup total home solutions as templates? I know that not everyone may not have all of the device types which could easily be pruned to suit each user. Mike