Author Topic: Use confirm command together with trigger events  (Read 1037 times)

0 Members and 2 Guests are viewing this topic.

sebaszz

  • Jr. Member
  • **
  • Posts: 8
  • Karma: 0
    • View Profile
Use confirm command together with trigger events
« on: December 30, 2015, 11:03:51 AM »
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


Code: [Select]
<?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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Use confirm command together with trigger events
« Reply #1 on: December 30, 2015, 11:48:10 AM »
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.

Code: [Select]
<?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>
« Last Edit: December 30, 2015, 01:56:38 PM by nime5ter »
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

  • Jr. Member
  • **
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Use confirm command together with trigger events
« Reply #2 on: December 31, 2015, 05:19:11 AM »
Many thanx again this works perfect.