We have moved at community.getvera.com

Author Topic: Status of Door Lock (Schlage)  (Read 2530 times)

Offline swazi

  • Full Member
  • ***
  • Posts: 121
  • Karma: +0/-0
Status of Door Lock (Schlage)
« on: June 18, 2014, 08:39:40 pm »
Great app! But I'm struggling to get up and running.
I followed the guide to report status of my thermostat and it works great. But then I tried to do the same with my door lock. In the list of variables I tried the following:
%avlocked()
%avstate()
%avstatus()

But all of these report either 1 or 0.
How do I get it to interpret the 1/0 to open closed?


And then I also have a bonus question:
In the guide "VOICE ACTIVATE SCENES WITH AUTOVERA AND AUTOVOICE" you use command filters. where can I find a list of accepted commands and syntax? E.g. (?<scene>.+)

Offline dkc

  • Moderator
  • Jr. Member
  • *****
  • Posts: 97
  • Karma: +6/-0
Re: Status of Door Lock (Schlage)
« Reply #1 on: June 18, 2014, 11:47:40 pm »
Quote
How do I get it to interpret the 1/0 to open closed?

The easiest way is to reference the logs within the AutoVera app. Toggle a device and check the status update. It will reveal both the new and old status. *Realizing that may not have been your question. Whoops.  I would have a look a this guide: http://guide.dkcautomation.com/Guide/Spoken+AutoVera+Status+Updates+with+a+Door-Window+or+Motion+Sensor/13

Door locks will report 1 for locked and 0 for unlocked when you call upon %avlocked with a Device Info action
 
AutoVera Device Info/Door Lock
If %avlocked~1
Do This
Else IF %avlocked~0
Do That
End If

Edit: Attached example screenshot

Quote
In the guide "VOICE ACTIVATE SCENES WITH AUTOVERA AND AUTOVOICE" you use command filters. where can I find a list of accepted commands and syntax? E.g. (?<scene>.+)

Within the parenthesis (?<anything>.+), you are simply naming the set. The naming of the variable is completely up to you. Whatever you choose to name your set, you'd then reference in the subsequent action. ex: %anything. You fill the in the manual scene name in your example, but it could also be an AutoVera Device or Info action.  RegEx cheat sheet here: http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/


Great questions, keep 'em coming.
« Last Edit: June 19, 2014, 12:27:01 am by dkc »

Offline swazi

  • Full Member
  • ***
  • Posts: 121
  • Karma: +0/-0
Re: Status of Door Lock (Schlage)
« Reply #2 on: June 20, 2014, 10:37:49 pm »
Great response. Thank you very much. I'll give it a try and shout if I have more questiions

Offline swazi

  • Full Member
  • ***
  • Posts: 121
  • Karma: +0/-0
Re: Status of Door Lock (Schlage)
« Reply #3 on: June 21, 2014, 01:47:52 pm »
OK - I'm back with more questions   :)
Let's say it is the same scenario as above, but I want to check on multiple doors and only report on those doors that are unlocked. In other words if it is locked I do not want to know about it. Would I create a task for each door or handle it in one task with if/or?

Offline dkc

  • Moderator
  • Jr. Member
  • *****
  • Posts: 97
  • Karma: +6/-0
Re: Status of Door Lock (Schlage)
« Reply #4 on: June 21, 2014, 04:41:53 pm »
This is actually really easy! Using the AutoVera app, add Nicknames to the locks you wish to get information from. To add a Nickname, press and hold on the device in the device list in AutoVera, the same place you enable status updates.  Enter the same nickname for each device.

Now create an AutoVera Device Info action, enable refresh, choose your Vera and skip the the advanced page.  In the Manual Name field, enter the nickname you assigned.  Check Match Multiple Devices and press back.

In your next Task, add a Say action from the Misc menu.  In the text field type: %avname(1) is unlocked  Now click the plus icon next to IF and add, using the variable tag: %avlocked(1) ~ 0

Then add a second Say action. In the text field type: %avname(2) is unlocked Now add the IF to that action, %avlocked(2) ~ 0

The say actions will be spoken consecutively, and only if the lock returns 0 for unlocked.  The index number within the parenthesis keeps  the name and status tied together.

Take a look at the screenshots and let me know if this helps!
« Last Edit: June 21, 2014, 04:43:56 pm by dkc »

Offline swazi

  • Full Member
  • ***
  • Posts: 121
  • Karma: +0/-0
Re: Status of Door Lock (Schlage)
« Reply #5 on: June 25, 2014, 11:00:25 am »
Thanks again for the detailed explanation!  But I realized while trying to set it up that my need is slightly different than my original question;
Some of my doors are sliding doors and as such does not have locks on them. Doors with locks would rely on %avlocked()  and sliding doors would need %avtripped(). Any solution for this?

Sent from my Nexus 4 using Tapatalk


Offline dkc

  • Moderator
  • Jr. Member
  • *****
  • Posts: 97
  • Karma: +6/-0
Re: Status of Door Lock (Schlage)
« Reply #6 on: June 26, 2014, 03:01:42 pm »
You can tackle this a few different ways.  Easiest will be to just stack your actions and separate your AV Device Info to look for locks and sensors in separate actions.  I've attached a screenshot to use as an example.