Well, that would explain why I couldn't figure out how to do it, haha. This will be difficult to explain clearly but I'll try! There are likely better ways to do what I'm trying to do too but here goes.
My smart door lock has an autolock feature but the built in time delay is not long enough and also I want the ability to easily (by voice) to disable or re-enable the autolocking feature (think repairmen going in/out on a certain day). I disabled the integrated autolocking and decided to have VC do the autolocking instead.
The lock sends VC a code every time it is unlocked (manually,by voice, by timer, etc.). I'm using that code to trigger a 20 minute timer, a the end of which, the lock is polled and, if still unlocked, it will be locked.
In order to disable auto-locking, I put the command that detects the code the door sends when unlocked (and starts the timer) in a folder that is disabled when I say "disable autolocking". [I also have the "disable autolocking" command set to lock the door and re-enable that folder (and thus autolocking) after 24 hours in case I forget to re-enable it by voice but that shouldn't matter in this discussion.]
This is all working flawlessly BUT, to be perfect, I also want to be able to detect if autolocking is currently disabled or enabled. As it is now, if I say "disable autolocking" VC responds with "disabling autolocking", however, if I say "disable autolocking" again a minute later, VC will again respond with "disabling autolocking" even though it is already disabled. I was planning to just detect if that folder was enabled or disabled to use in IF/THEN logic to have VC respond "autolocking is already disabled" if the folder is disabled.
I hope that makes sense and I can probably figure out another way to do it but I was assuming I could just detect the enabled/disabled status of the folder.
I've include the relevant working (but unfinished) code in case it helps.
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands version="2.2.2.0" space="preserve" date="6/19/2016 12:00:00 AM">
<groupCollection open="True" name="mine">
<commandGroup open="True" name="vera" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="505" name="disable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Group.Disable</cmdType>
<params>
<param>auto door lock</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Auto door locking has been disabled.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.SetEventTimer</cmdType>
<params>
<param>24h</param>
<param>24hrrestart</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>disable autolock, disable auto door lock</phrase>
</command>
<command id="528" name="enable autolock" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Group.Enable</cmdType>
<params>
<param>auto door lock</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>Auto door locking has been enabled.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.TriggerEvent</cmdType>
<params>
<param>lockdoor</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>enable autolock, enable auto door locking</phrase>
</command>
<command id="596" name="enable autolock no voice 24hr" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Group.Enable</cmdType>
<params>
<param>auto door lock</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.TriggerEvent</cmdType>
<params>
<param>lockdoor</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>24hrrestart</event>
</command>
</commandGroup>
<commandGroup open="True" name="auto door lock" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="534" name="lock the door" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Vera.Get.LockStatus</cmdType>
<params>
<param>9</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{LastResult}&&1</ifParams>
<then />
<else>
<action>
<cmdType>Vera.Toggle</cmdType>
<params>
<param>9</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<event>lockdoor</event>
</command>
<command id="580" name="start timer" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>VC.SetEventTimer</cmdType>
<params>
<param>20m</param>
<param>lockdoor</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>Vera1.DoorLock.9.Open</event>
</command>
</commandGroup>
</groupCollection>
</VoiceCommands>
Thanks!