News:

HOT TIP! Commands and groups can be copied and pasted directly from your command editor to the forum, and vice versa. This makes sharing command XML on the forum much easier!

Main Menu

VC to VC

Started by Nick, November 08, 2014, 06:35:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nick

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: <?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?

jitterjames

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:
<?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

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.

<?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>