Hi Richard,
First off, thank you for creating PLEG and for all the help you’ve provided on this forum. Up until now I’ve been able to find every answer I’ve needed on here and its been a great resource. However, I’ve run into an issue that I cannot find the answer to after searching for quite some time, so I’m wondering if maybe you or someone else can help or at least point me in the right direction.
Here’s what I’m trying to do:
I have two Schlage electronic locks, one on my front door and one on my garage entry door to the house. Both of these locks have 3 PINs programmed into them. When a PIN is entered on either lock, the foyer lights turn on. I have separate triggers/conditions for each PIN because I want different notifications and actions for each one. So far I think I’ve got that part working just fine.
Now the issue I’m having is that I want the lights to automatically go off 2 minutes after the door that was opened is closed. I have an alarm system sensor on each door and they update status pretty fast. Also, I only want the lights to go off if they were turned on by PLEG, not just every time I close the door. In my status report below I have it at 30 seconds for testing purposes, but the problem is every time I restart Vera the lights go off since the expression evaluates as True. I had to use the “_” prefix to the conditions since the PIN triggers are true until a different PIN is used, so in order for the actions to fire every time a PIN is entered I added the underscore. Furthermore, every time I close a door it reevaluates as True and so the lights go off again. Do I need a sequence expression to help with this, or maybe a Multi-Trigger? Any help would be greatly appreciated, I know I’m missing something.
[tt]Triggers
Name Description Last Trigger State
GarageGuestPIN PIN Code #3 is entered on Schlage Deadbolt 0 false
GarageFamilyPIN PIN Code #2 is entered on Schlage Deadbolt 2013-12-22 15:08:25.446 false
GarageOwnerPIN PIN Code #1 is entered on Schlage Deadbolt 2013-12-23 17:56:20.575 true
FrontGuestPIN PIN Code #3 is entered on Schlage Deadbolt 0 false
FrontFamilyPIN PIN Code #2 is entered on Schlage Deadbolt 2013-12-22 15:22:19.746 false
FrontOwnerPIN PIN Code #1 is entered on Schlage Deadbolt 2013-12-23 16:44:41.615 true
FrontDoorClosed Zone 09 - Front Door is not tripped 2013-12-23 18:59:04.629 true
GarageEntryClosed Zone 10 - Garage Entry is not tripped 2013-12-23 18:59:04.647 true
Conditions
Name Expression Last True State
_GarageOwnerEntry GarageOwnerPIN 2013-12-23 18:18:35.410 true
_GarageFamilyEntry GarageFamilyPIN 0 false
_GarageGuestEntry GarageGuestPIN 0 false
_FrontOwnerEntry FrontOwnerPIN 2013-12-23 18:18:35.414 true
_FrontFamilyEntry FrontFamilyPIN 0 false
_FrontGuestEntry FrontGuestPIN 0 false
_GarageEntry GarageOwnerPIN OR GarageFamilyPIN OR GarageGuestPIN 2013-12-23 17:56:20.605 true
_FrontEntry FrontOwnerPIN OR FrontFamilyPIN OR FrontGuestPIN 2013-12-23 17:31:48.633 true
LightsAutoOff (_GarageEntry AND GarageEntryClosed AND (GarageEntryClosed; NOW > 30)) OR (_FrontEntry AND FrontDoorClosed AND (FrontDoorClosed; NOW > 30)) 2013-12-23 18:58:59.557 false
[/tt]
Thanks again and Happy Holidays,
Mark