EventGhost

From VoxCommando
Jump to: navigation, search

If you have EventGhost installed already, make sure you have the latest version installed.

You should be using version 0.4.1.r1544 or later.

Install the Broadcaster plugin in EventGhost

In EventGhost

  • Click "Add Plugin..."
  • Open the tree branch "Other"
  • Select "Broadcaster"
  • Click "OK"
Egbroadcaster.png
Make sure your settings match the image to the right exactly, except for "Listening Address" which will be the IP address of your computer on the LAN
  • Event prefix: Broadcast
  • Broadcast zone: 255.255.255.255
  • UDP port: 33333
    • if you want to change this you must adjust the settings in VoxCommando Options to match
  • Listening address: will vary from system to system. Usually there will only be one choice. If you have two network cards, choose the IP for the card that is connected to the same LAN as VoxCommando
  • Respond to self broadcast: should be CHECKED unless VoxCommando is running on a different computer than EventGhost
  • Payload delimiter MUST be set to: &&
Egbroadcaster2.png
The corresponding settings in VoxCommando (see screenshot at right) --->> Egbroadcaster5.png

Sending events From EventGhost to VoxCommando

To send an event from EventGhost to VoxCommando

  • Create a new macro
  • Choose "Broadcaster" and click "OK"

In the eventGhost window that pops up you define the data to send to Voxcommando

  • Set port to 33000 (or whatever port VoxCommando is set to listen on)
  • In the image below we are sending an Event to VoxCommando. To send an event:
    • for the command name enter the word: event
    • for the parameter enter the name of the event to trigger.
    • if you want your event to carry a payload that VoxCommando can use add && to the parameter and then the payload.
    • even more payloads can be added separated by &&
      • example: eg.trigger&&50

Egbroadcaster3.png Egbroadcaster4.png


As always, in VoxCommando you can then use these events to trigger and pass payloads to commands.


If for some reason you want to send an action to VC (or issue commands using VC.TellVox from Eventghost instead of generating events, follow the standard message format outlined on the API page of the wiki. The action name goes in the "Command" field. All other parameters go in the payload field, separated by &&.

How to send events from VoxCommando to EventGhost

Assuming that you set everything up correctly as described above, you need only create a command in VoxCommando and add an EventGhost.Send action. The first parameter will be the event name. Additional payloads can be sent as optional parameters.

Double click a command in VC's Command Tree Editor to open the LCB (Logical Command Builder) Vc event to eg.png

If you've left the default prefix "Broadcast" set in the Broadcaster plugin settings, this will send an event that in Eventghost will take the form:

Broadcast.Eventname'[payload if it exists]'

You can then drag this event onto the macro that you want to trigger in Eventghost, and you're done.

If you want to create an event name from scratch in Eventghost, make sure it matches the event name that you're sending from VC.

Obviously, you can send different distinctly named events to Eventghost if you want to be able to trigger different macros.

Sending payloads

Sending payloads along with an event is slightly idiosyncratic. If you use payloads in your VC command, those values will be sent *automatically* along with the event. In other words: You don't need to include the {1} syntax within your VC command macro; you only need to specify a payload element in your voice command input.

So, the following command would send an event called "StereoVolumeUp" to Eventghost along with a payload value from 1 to 100:

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<command id="302" name="Stereo volume up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>EventGhost.Send</cmdType>
    <params>
      <param>StereoVolumeUp</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>stereo volume up</phrase>
  <payloadRange>1,100</payloadRange>
  <phrase optional="true">percent</phrase>
</command>