Author Topic: VC.TriggerEvent  (Read 3488 times)

0 Members and 1 Guest are viewing this topic.

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
VC.TriggerEvent
« on: October 21, 2015, 01:00:40 AM »
Hello everyone.

I want sending some messages between to VC instances.
The sending instance is located at C:\Users\chris\VCenglish.
The receiving one at  C:\Users\chris\VC\VoxCommando.exe.
Both where started with -new parameter and have different ports 33001 vs. 33000
I try this with the Launch.Capture action.
In the pathfield a wrote C:\Users\chris\VC\VoxCommando.exe in the parametersfield i put -33000 "VC.TriggerEvent&&show&&317".
The "317" should be substituted by {1}, but for testing its not relevant I think.

If I send the messages from LCB the event appears in the history from the receiving VC, but the Event isn't throwing. Here the copy from the logfile

Code: [Select]
21.10.2015 05:51:13 471 received udp command:VC.TriggerEvent
21.10.2015 05:51:13 471 action repeat set to: 1
21.10.2015 05:51:13 471 Action:  VC.TriggerEvent -
21.10.2015 05:51:13 471 [action] VC.TriggerEvent:

If I send the the following command from the console
Quote
C:\Users\chris\VC>VoxCommando.exe -33000 "VC.TriggerEvent&&show&&317"
than the event trigger the action that is define.
Here the logfile
Quote
21.10.2015 05:57:42   VoxLog created / UAC test passed.
21.10.2015 05:57:42   819   Focused: cmd
21.10.2015 05:57:42   844   received udp command:VC.TriggerEvent&&show&&317
21.10.2015 05:57:42   844   action repeat set to: 1
21.10.2015 05:57:42   844   Action:  VC.TriggerEvent - show&&317
21.10.2015 05:57:42   844   [action] VC.TriggerEvent:show&&317

21.10.2015 05:57:42   846   [vcevent] show

21.10.2015 05:57:42   848   [info] event in group: labor

21.10.2015 05:57:42   850   doCommand:myshow
21.10.2015 05:57:42   850   action repeat set to: 1
21.10.2015 05:57:42   850   Action:  OSD.ShowText - 317
21.10.2015 05:57:42   850   [action] OSD.ShowText:317

21.10.2015 05:57:42   853   Action INFO: OK
21.10.2015 05:57:42   853   Action INFO:

Whats the different between these two ways?

Kind regards fishware

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: VC.TriggerEvent
« Reply #1 on: October 21, 2015, 01:43:04 AM »
I'm not sure why you would have different results with direct command line and using launch.capture that would be one for nime5ter or jitterjames

but you could use TCP.UDP.SendMixed (you will need to enable the TCP Plugin,
how to enable plugins
)

this is a sample command, you will need to change the IP address
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<command id="1212" name="trigger event on same pc but different VC" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TCP.UDP.SendMixed</cmdType>
    <params>
      <param>vc.triggerevent\x26\x26Hello</param>
      <param>33001</param>
      <param>192.168.1.14</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>



fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: VC.TriggerEvent
« Reply #2 on: October 21, 2015, 01:48:59 AM »
Quote
but you could use TCP.UDP.SendMixed (you will need to enable the TCP Plugin,
how to enable plugins)

I've tryed the TCP plugin as Server on the receiving instance and send with this plugin the message. It ends up with the same result. I'm also confused why this is different to CLI.


PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: VC.TriggerEvent
« Reply #3 on: October 21, 2015, 01:53:38 AM »
when building your commands on both VC's, are you saving and closing the command editor before testing the commands?

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: VC.TriggerEvent
« Reply #4 on: October 21, 2015, 02:09:05 AM »
Yes. I also rebooted the whole machine.  :bonk

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: VC.TriggerEvent
« Reply #5 on: October 21, 2015, 02:17:07 AM »
that is odd I tested on my pc using 2 different VC's and changed the port on the 2nd one to 33001 like you said you where doing and then created a command that was triggered by the "hello" event and had it show an OSD and it worked no problem on my system Windows 7 64bit,

I would turn logging on, on both or your VC's and trigger the event and then post both logs here (make sure to note which log goes to which VC, master/slave)

I would also imagine system information would be a lot of help,

I'm not sure where to go from here, I think we will have to see what the guru jitterjames has to say

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: VC.TriggerEvent
« Reply #6 on: October 21, 2015, 02:24:01 AM »
what is your command supposed to do when event "show" is triggered? I'm not sure but from what you shared it looks like your event "show" is supposed to trigger another vc.trigger event,

if you upload both of your commands it will also help give us a better understanding of what your are doing plus I can test them and see what I get for results

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: VC.TriggerEvent
« Reply #7 on: October 21, 2015, 03:01:08 AM »
Okeh, Lets go.

My System is Windows10 Prof 64bit

First I will post all from the sendinginstance

This cames from
Quote
C:\Users\chris\VCenglish
and is started via CLI with
Quote
C:\Users\chris\VCenglish\VoxCommando.exe -new

The UDP Listenport in options is set to 33001

This is command that sends command
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>Launch.Capture</cmdType>
    <params>
      <param>C:\Users\chris\VC\VoxCommando.exe</param>
      <param>-33000 "VC.TriggerEvent&amp;&amp;show&amp;&amp;317"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

And this is logfile after I used the "Save & Run" button in the LCB (in german Speichern und ausführen)

Quote
21.10.2015 07:47:11   VoxLog created:
21.10.2015 07:47:10   379   doCommand:Eventsend
21.10.2015 07:47:10   379   action repeat set to: 1
21.10.2015 07:47:10   379   Action:  Launch.Capture - C:\Users\chris\VC\VoxCommando.exe&&-33000 "VC.TriggerEvent&&show&&317"
21.10.2015 07:47:10   379   [action] Launch.Capture:C:\Users\chris\VC\VoxCommando.exe&&-33000 "VC.TriggerEvent&&show&&317"

21.10.2015 07:47:10   674   Action INFO:
21.10.2015 07:47:10   717   Focused: VoxCommando

Now to the receiving instance. This will started via
Quote
C:\Users\chris\VC\VoxCommando.exe -new

The UDP Listenport in options is set to 33000

And here is the logfile

Quote
21.10.2015 07:53:24   VoxLog created / UAC test passed.
21.10.2015 07:53:24   584   received udp command:VC.TriggerEvent
21.10.2015 07:53:24   584   action repeat set to: 1
21.10.2015 07:53:24   584   Action:  VC.TriggerEvent -
21.10.2015 07:53:24   584   [action] VC.TriggerEvent:

21.10.2015 07:53:24   587   Action INFO:

And now the logfile I've send the command via CLI

Code: [Select]
C:\Users\chris\VC\VoxCommando.exe -33000 "VC.TriggerEvent&&show&&317"

The logfile
Quote
21.10.2015 07:58:39   VoxLog created / UAC test passed.
21.10.2015 07:58:39   508   received udp command:VC.TriggerEvent&&show&&317
21.10.2015 07:58:39   508   action repeat set to: 1
21.10.2015 07:58:39   508   Action:  VC.TriggerEvent - show&&317
21.10.2015 07:58:39   508   [action] VC.TriggerEvent:show&&317

21.10.2015 07:58:39   511   [vcevent] show

21.10.2015 07:58:39   513   [info] event in group: labor

21.10.2015 07:58:39   515   doCommand:myshow
21.10.2015 07:58:39   515   action repeat set to: 1
21.10.2015 07:58:39   515   Action:  OSD.ShowText - 317
21.10.2015 07:58:39   515   [action] OSD.ShowText:317

21.10.2015 07:58:39   519   Action INFO: OK
21.10.2015 07:58:39   519   Action INFO:
21.10.2015 07:58:40   156   Focused: cmd
21.10.2015 07:58:43   153   Focused: explorer

And this is the command that schould be triggered
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

 I also try your command with the same result, that the event is not rising

I'm confused about this behavor

ps. Is there any information missing I will provide this
« Last Edit: October 21, 2015, 03:16:46 AM by fishware »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: VC.TriggerEvent
« Reply #8 on: October 21, 2015, 05:31:28 AM »
Ok - the "TCP.UDP.SendMixed" action works fine, but leave the "target IP" blank, because it will send the message by default to the broadcast IP 255.255.255.255 - you must only specifiy the Port on which VC listen.


Try this command (it will generate a event which contain two payloads - in this example payload1= what and payload2= ever and now you can work with this payloads as your needs)  \x26 is the delimiter sign:


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<command id="313" name="send UDP messages a payloads {1}{2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TCP.UDP.SendMixed</cmdType>
    <params>
      <param>vc.triggerevent\x26\x26YourEVENT\x26\x26{1}\x26\x26{2}</param>
      <param>33000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>send</phrase>
  <payloadList>what</payloadList>
  <payloadList>ever</payloadList>
</command>


I hope this helps



***********  get excited and make things  **********

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: VC.TriggerEvent
« Reply #9 on: October 21, 2015, 05:57:08 AM »
 :hugs  :yay  :clap

(Hoch soll er leben)² 3xhoch

Das ist die Lösung. Wenn ich mir die so anschaue, scheint es die Codepage Einstellung von Windows 10 zu sein. Vor kurzem hatte ich ein ähnliches Problem welches durch umstellen auf UTF behoben wurde. Dank an min5ter an der Stelle nochmal.

Man bin ich jetzt glücklich

Allen einen schöne Tag und vielen Dank nochmal

ps. Ich lasse mir mit der englishhörenden Instanz nur die showID zurückgeben, und kann dann mit meiner normalen Instanz weiter arbeiten. Somit muß ich die commandos nicht zweimal pflegen, da ich nach der Wahl der Serie -und dazu brauch ich die ID- weiter durch die Staffeln und Folgen springe, und da macht sich die deutsche Erkennung wesentlich besser.

So, jetzt werd ick erstmal nen  ::zzz machen

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: VC.TriggerEvent
« Reply #10 on: October 21, 2015, 06:13:13 AM »
Ich auch  ::zzz
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC.TriggerEvent
« Reply #11 on: October 21, 2015, 09:54:55 AM »
I'm also confused why this is different to CLI.

It is different because you can't use && in a parameter.  The reason is that && is used to separate parameters so if you use it in a parameter VC gets confused.  This is the result of a simple program evolving and growing over several years and my desire to maintain backwards compatibility.

That is why we use \x26\x26 instead of && with UDP sendmixed.

One note: if you were going to use the Launch command for this there is no reason to use Launch.Capture since you are not trying to get information back.

Perhaps I will modify the api to interpret commands using either || or && to delimit the parameters.

I believe that the command PegLeg originally posted should have worked correctly after the port and IP address were set correctly, which is what Kalle ended up doing.
« Last Edit: October 21, 2015, 10:56:50 AM by jitterjames »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: VC.TriggerEvent
« Reply #12 on: October 21, 2015, 10:07:05 AM »
@fishware, I'm glad you got it to work  :D

sorry for bailing on you after requesting all the information I lost track of time and had to get to bed it was 12:30am here and I had to be up at 6:30AM, thanks kalle for helping fishware out :D

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: VC.TriggerEvent
« Reply #13 on: October 21, 2015, 10:37:11 AM »
This is one of the advantage in the VC-Forum - you will be never lost, because there is always someone there at any time  :)
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC.TriggerEvent
« Reply #14 on: October 21, 2015, 10:55:38 AM »
It is always nice when I wake up to find a new problem that has already been solved while I was sleeping. :)