1
General Discussion / What VC Action can I use?
« on: January 23, 2016, 09:41:30 PM »
I have created a command in VC that listens for events from my ISY. In summary my hope is to have VC activate my home security system via my ISY. I have started to write a command and got stuck and need some assistance with identifying the next action that will cause VC to delay for a certain amount of time and or a confirmation requirement is met. For example... "You have thirty seconds to provide the password before I call the police"
Here is what I have written so far
The next action should be the start of the timer which will be thirty seconds. If a confirmation is not given within this time. The next action will be to execute via a scrape command a program in my ISY that will activate my home security system.
Any help with ideas to finish my code would be appreciated.
Here is what I have written so far
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<command id="478" name="Unusual Motion" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<if ifBlockDisabled="False" ifNot="False">
<ifType>ProcessRunning</ifType>
<ifParams>Kodi&&</ifParams>
<then>
<action>
<cmdType>XJson.Raw</cmdType>
<params>
<param>InputExecuteAction</param>
<param>"action"."pause"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentStayonTop&Auth={M:botpass.botpass}&onTop=True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentShow&Auth={M:botpass.botpass}&STATE=WSMaximized</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentResolution&Auth={M:botpass.botpass}&Resolution=1</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentShow&Auth={M:botpass.botpass}&STATE=WSMAXIMIZED</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentResolution&Auth={M:botpass.botpass}&Resolution=0</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<action>
<cmdType>VC.Pause</cmdType>
<params>
<param>1000</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://127.0.0.1:8000/Agent?function=AgentSpeak&Auth={M:botpass.botpass}&Text=Excuse me! I don't recognize you. Please identify yourself, You have thirty seconds before I call the police</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>UnMot</phrase>
<event>UnMot.UnMot
</event>
</command>
The next action should be the start of the timer which will be thirty seconds. If a confirmation is not given within this time. The next action will be to execute via a scrape command a program in my ISY that will activate my home security system.
Any help with ideas to finish my code would be appreciated.