Author Topic: VC to VC  (Read 1787 times)

0 Members and 1 Guest are viewing this topic.

Nick

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
VC to VC
« on: November 08, 2014, 06:35:46 PM »
Hi,

Since I don't feel like spending a lot of money on a lot of microphones and a auto mixer, i'd like to have one VC communicate with another.
i've tried doing this:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>TCP.UDP.SendMixed</cmdType>
    <params>
      <param>VC.TellVox&amp;&amp;{1}</param>
      <param>33000</param>
      <param>192.168.1.8</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>
but the && is a delimiter and the UDP command isn't sent.. I've tried but have yet to find a way around this.
Is there any way of doing this?

Also is it possible to let VC's use shared maps?
I noticed the maps are locked from writing when vc is active.. again, workaround?
« Last Edit: November 08, 2014, 06:42:09 PM by Nick »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC to VC
« Reply #1 on: November 08, 2014, 07:00:22 PM »
Hi Nick,  Welcome to the community.  ;D

Luckily this TCP.UDP.SendMixed action lets you encode characters using their hex code (even if they are normal ascii, despite the action description), so you can just replace & with \x26

For example:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.1.0-->
<command id="1180" name="send udp tellvox" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TCP.UDP.SendMixed</cmdType>
    <params>
      <param>VC.TellVox\x26\x26pay attention</param>
      <param>33000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

Another option is to use the EventGhost actions.  If you aren't using EventGhost then this is a handy way, since adding optional payloads appends them to the UDP message along with the && delimiter.

It should also be pretty easy for me to add another action for the TCP.UDP.* which will do something similar.

If you want to share data "on the fly" while two VCs are both active you will probably need to use your own files.  You can either use text files, or the payloadXML actions, or set up some kind of web server that can store and return values.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC to VC
« Reply #2 on: November 08, 2014, 07:02:03 PM »
Here's an example using the EventGhost UDP.  Note that you don't have to set the port and IP in every command, it will remember it, so you could just set it at startup or in the VC Options / advanced tab.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.1.0-->
<command id="1133" name="send udp a la eventghost" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>EventGhost.SetPort</cmdType>
    <params>
      <param>33000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>EventGhost.SetIP</cmdType>
    <params>
      <param>192.168.0.125</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>EventGhost.Send</cmdType>
    <params>
      <param>TTS.Speak</param>
      <param>Hi there</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>