News:

VoxCommando works with Amazon Echo, Domoticz, EventGhost, Google Assistant, IFTTT, iTunes, J.River Media Center, Kodi, MediaMonkey, Nest, Philips Hue, Vera, Wemo, and the list keeps growing!

Main Menu

Use confirm command together with trigger events

Started by sebaszz, December 30, 2015, 11:03:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sebaszz

Hi guys,

I would like to trigger VC by using event. Then VC ask a TTS question, I need to confirm, then Action.
I found example on youtube for confirming commands. that's but only with phrase triggers not events.

I create the example to get the result but of course this should be done differently


<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<commandGroup open="True" name="Fibaro Asking" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="330" name="Shall I spray the garden?" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Shall I spray the garden?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Garden</event>
  </command>
  <command id="372" name="Irrigation system activated" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Irrigation system activated</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>yes</phrase>
    <phrase optional="true">please</phrase>
  </command>
</commandGroup>


nime5ter

#1
See: http://voxcommando.com/forum/index.php?topic=1589.msg13879#msg13879

Your commands will work fine if you add a VC.TellVox action to the first command. Then the second one can require confirmation.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="Fibaro Asking" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="330" name="Shall I spray the garden?" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Shall I spray the garden?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <params>
        <param>Activate the irrigation system</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Garden</event>
  </command>
  <command id="372" name="Activate irrigation" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>Fibaro action to activate the irrigation system ....</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Irrigation system activated</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Activate the irrigation system</phrase>
  </command>
</commandGroup>
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

sebaszz