Difference between revisions of "EventGhost"
(→Video tutorial) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 88: | Line 88: | ||
<phrase optional="true">percent</phrase> | <phrase optional="true">percent</phrase> | ||
</command></pre> | </command></pre> | ||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 07:58, 31 January 2021
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.
Contents
Install the Broadcaster plugin in EventGhost
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
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)
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>