Author Topic: Auto lock door only after door is closed using PLEG  (Read 547 times)

Offline gibby

  • Full Member
  • ***
  • Posts: 174
  • Karma: +3/-1
Re: Auto lock door only after door is closed using PLEG
« Reply #15 on: September 27, 2017, 09:55:14 am »
In PLEG under Editor Option, click on logic report. That is what we need.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 852
  • Karma: +18/-8
    • Worthington Engineering, Inc.
Re: Auto lock door only after door is closed using PLEG
« Reply #16 on: September 27, 2017, 08:59:59 pm »
I find the status report more helpful than the logic report since you can see when conditions are last true.
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline jrweiland

  • Sr. Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Auto lock door only after door is closed using PLEG
« Reply #17 on: September 27, 2017, 09:46:08 pm »
Just throwing this idea out there--  could you achieve your overall goal through a simple scene?  Here's what I'm thinking.

I like the idea of it doing a "lock check" every 10 mins or so.  It would be a good way to make sure that your door was locked again, in case it was randomly unlocked.

But thinking about my personal habits, any time I unlock my door, I always close it after that. It's never hanging open.

What if "closed door" is a better and easier trigger to use?  A scene that said "any time the door is closed, the door will lock X minutes later" might achieve what you're looking for.

Just a shot in the dark :)

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 852
  • Karma: +18/-8
    • Worthington Engineering, Inc.
Re: Auto lock door only after door is closed using PLEG
« Reply #18 on: September 28, 2017, 07:59:03 pm »
A corollary to that idea is one I use for my garage door. When it opens, I get a notification (and it triggers an iPhone check). If left open for more than 10 minutes, I get a notification every 10 minutes that it is still open. Sometimes we forget to close it. Rarely, the sensor does not know it is closed, so it reminds me to clear that error (by opening and then closing the door via Vera).

That could work for the door locks.  Either locks them after 10 minutes or sends you a notification so you can manually (either physically or using Vera) lock the lock. Or investigate since something may be up.

A door lock with a sensor makes this even better. If the door is left open, no sense locking the lock, but certainly notify would be appropriate.

And the logic could be tied to House Mode.  A door left open/unlocked in Away Mode probably needs to be treated differently than when in Home Mode.

Lastly, with unique pin codes, if family opens the door, you likely need difference lock treatment than when a handyman enters when you do not expect them.   
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline Robinbb

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Auto lock door only after door is closed using PLEG
« Reply #19 on: October 08, 2017, 07:36:06 am »
Nice one Don!  ....but how do you get the alert to repeat every 10 minutes?
Thanks!

Offline michaelhinchey

  • Full Member
  • ***
  • Posts: 141
  • Karma: +2/-1
Re: Auto lock door only after door is closed using PLEG
« Reply #20 on: October 14, 2017, 12:09:35 pm »
OK hopefully I figured the way to save and post the PDF you wanted to see ..  Sorry it took so long
Let me know if this is what I needed to show you for help.  THX

Offline michaelhinchey

  • Full Member
  • ***
  • Posts: 141
  • Karma: +2/-1
Re: Auto lock door only after door is closed using PLEG
« Reply #21 on: October 14, 2017, 04:17:37 pm »
Just throwing this idea out there--  could you achieve your overall goal through a simple scene?  Here's what I'm thinking.

I like the idea of it doing a "lock check" every 10 mins or so.  It would be a good way to make sure that your door was locked again, in case it was randomly unlocked.

But thinking about my personal habits, any time I unlock my door, I always close it after that. It's never hanging open.

What if "closed door" is a better and easier trigger to use?  A scene that said "any time the door is closed, the door will lock X minutes later" might achieve what you're looking for.

Just a shot in the dark :)
So this is kind of the band-aid for people who don't use pleg or lua to achieve the end result.  The way to achieve this is by using the just the door sensor correct in the scene as the trigger?  This works on some level if that is the case.
   The trouble lies is when someone accidentally unlocks the door or whatever and never actually open the door, like you mentioned.  The scene only will run when the door(Sensor) was actually opened and armed in my case..  Then the door will stay unlocked until the door lock check scene runs (Which I have set to one hour to save battery life).  Now with this scene it actually will still lock the door whether or not the door sensor is in the closed or open position.  This is why I called it a band-aid.  Does this make sense or am I missing something in the above statements.  Is there something I can add during the door lock check to make sure it only runs when the sensor is in the closed position and the door is unlocked.  Do I just add the sensor into the door lock check trigger as well?  I dont think that will work because that would be an and/if statement and vera doesnt support that without code from my understanding.  I could be way off here, im learning as I GO..  lol