VoxCommando

Help and Support (Using VoxCommando) => Vera Home Automation Controller => Topic started by: nime5ter on November 22, 2014, 09:36:21 AM

Title: Only execute macro during certain times of the day
Post by: nime5ter on November 22, 2014, 09:36:21 AM
Thankyou so much guys for your time.
It works a treat now.
What else I would like to do is if it's  between 12am and 6am turn off that group that handles that event, but thats probably for another post.


If it is only this one command that you want to stop between midnight and 6, you should be able to use a logic block within the command like so:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.2.1-->
<command id="291" name="test -- stop macro between midnight and 6:00" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="70" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>24,01,02,03,04,05,&amp;&amp;{DtCustom.HH}</ifParams>
    <then>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>{3}&amp;&amp;4</ifParams>
    <then>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <params>
          <param>{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>vera.Light.5.*</event>
</command>

For more info on the date/time variables: http://voxcommando.com/mediawiki/index.php?title=Variables
Title: Re: Only execute macro during certain times of the day
Post by: achel on November 22, 2014, 10:53:47 AM
thanks once again  :D
I much prefer the flexibility of creating your own scenes with VC