Advanced: Scenes that lock the door

I have a vera edge and installed a zwave lock. I found the lock’s auto-lock feature to be annoying because the lock was often deploying while the door was still open (It would simply re-lock 30 seconds after being unlocked). So I turned off the lock’s auto-lock.

I now have a scene so that whenever a door is closed (door/window sensor), 30 seconds later, the door locks.

But what happens if, say, 15 seconds after closing the door, I open the door. 15 seconds later, the deadbolt deploys, whether the door is closed or not.

So how do I make my “door auto-lock” scene abort if the door is opened during that 30 second period?

Also, I want to be able to press a button on remote, and it would disable the “door auto-lock” scene for 5 minutes. This could be useful, if, for example, I would be opening and closing the door multiple times while unloading the car.

This can be accomplished using the Program Logic Event Generator (PLEG) plugin.

Ok. Thanks for the suggestion! :o

I spent a couple hours reading up on stuff and messing around (probably an hour was wasted wondering why the deadbolt was deploying when the door was open before I realized I had forgotten to delete the old autolock scene!). At last I figured out how to make the door auto-lock if it’s closed for 30 seconds! (For some reason, I find the actual time it takes to lock the door is about as much as 10 seconds early or 60 seconds late. But at least I haven’t seen the deadbolt deploying while the door is open.)

Input Triggers:
tFDclosed: Whenever front door sensor is closed

Condition:
tFDclosed; Now > 00:00:30

Action:
Lock front door

=======adding override button=====
(my goal here is to be able to press a button that will override the autolock function for 5 min)

Scene: Front Door Autolock Override: Virtual switch “VS FrtDr AuLk ovride” is supposed to turn on immediately when pressing minimote button 3-. Then the Virtual switch is turned off after 5 minutes.

For some reason, I am unable to trigger this scene with my Aeon Labs DSA03202W-ZWUS button 3. I even tried rebooting. (when I press #3, function #2 executes. i also tried creating a scene triggered by #2 and it isn’t working. must be the remote. but Button #1 still successfully unlocks the door!)

Input Triggers:
tFDclosed: Whenever front door sensor is closed
tFDoverride: Whenever VS FrtDr AuLk ovride is turned on (virtual switch “front door auto lock overrride”)

Condition:
(tFDclosed; Now > 00:00:30) + tFDoverride <2
(tFDclosed; Now > 00:00:30) + tFDoverride =1

(My understanding is this statement will execute if front door is closed for at least 30 seconds, and if the override switch is off, thus less than 2 statements are true, and
door is not closed nor is override is on)

Problem: this is not working as intended. What am I doing wrong?

i also tried just having the condition as: (tFDclosed; Now > 00:00:30) + tFDoverride =1

Couldn’t you have a trigger tied to the remote without a scene?

Then you would use
(tFDclosed; Now > 00:00:30) and (tFDclosed) and (switchTrigger; Now > 00:05:00)

So if the door has been closed 30+s
AND
The door is closed now
AND
It has been 5+ min since button was pushed

Hi,

The difference in time response is because NOW runs on a schedule exactly every 60 seconds so it won’t be precise.

Using a virtual switch plugin you could try something along this lines(I’m still a noob so take it with a grain of salt):

Input Triggers:
tFDclosed: Whenever front door sensor is closed
tVSwitchOn: Whenever virtual switch is turned ON (Called by Scene)

Schedule
s30Seconds: Self re-triggered timer when door is closed, interval 30 seconds

Condition:
cLockDoor: tFDclosed AND !s30Seconds
cOverride: tVSwitchOn

Action:
cLockDoor: Lock front door AND Start timer s30Seconds AND turn Virtual Switch Off
cOverride: Start timer s30Seconds, intervalTime 05:00 (Override)

Thanks for the help everyone! Finally got this one working.

For some reason, the only way I could get buttons 2, 3 and 4 to work on the minimote was to create a scene, then go to the Devices>Minimote>Select scene for device buttons.

So here’s a rundown of my final solution for anyone else trying to do this:

Scene: FD Autolock override
Trigger: Minimote scene #3
Immediately: VS FrtDr AuLk ovride On (turns on Virtual Switch “Front Door autolock override”)
Wait for 5 minutes and then: VS FrtDr AuLk ovride Off

PLEG:

Inputs:
tFDclosed: Whenever front door sensor is closed
tFDoverrideoff: VS FrtDr AuLk ovride is turned off

Conditon:
cLockDoor: (tFDclosed; Now > 00:00:30) and (tFDclosed) and tFDoverrideoff

[quote=“Kramak, post:6, topic:191980”]Action:
cLockDoor: Lock front door AND Start timer s30Seconds AND turn Virtual Switch Off
cOverride: Start timer s30Seconds, intervalTime 05:00 (Override)[/quote]

Kramak: I didn’t quite understand how to setup the actions in your suggestion.

Hi gregdetroy,

My suggestion was something similar to this, which I have configured over here to give you an example:
Pic 1: a schedule(timer) for 1 minute.
Pic 2: a condition with three actions added, in this case one that starts the timer from pic 1. But, you can override the 1 minute interval using the field intervalTime when called by this particular condition.
Pic 3: another action for this same condition that turns On a light.

I’m glad you sorted it out.

Thanks for the clarification! totally makes sense now