Difference between revisions of "EventGhost"
m (1 revision) |
|
(No difference)
|
Revision as of 11:24, 13 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>
Video tutorial
This video is hosted at screencast.com. If it doesn't load, try again later. Their server is not so reliable. :(