There are a variety of ways to trigger events in VC from Domoticz. One way is to use a lua script together with udpsender.exe, which is part of the"Extra utilities" package available on VoxCommando's Downloads page (
http://voxcommando.com/home/downloads/)
In the lua script, you can call on the udpsender.exe, which will then
send a UDP message to VC (in this case, to trigger events).
Attached to this post is an example lua script called "script_device_VcNotifications".
DO NOT change the name of the attached lua file unless you know what you're doing.1. If you haven't yet done so, then download the Extra utilities package and put the udpsender program somewhere accessible on your Domoticz machine such as C:\Users\USERNAME\...
2. Put the lua file in C:\Program Files (x86)\Domoticz\scripts\lua (or whatever the correct file path is for your Domoticz installation).
3. Edit the script in Notepad or whatnot, to correct the filepath in the line:
UDPfilepath = 'C:/Users/USERNAMEHERE/udpsender.exe' --REPLACE WITH THE CORRECT FILE PATH ON YOUR COMPUTER
That's all you should need to do. Whenever you switch a device on or off, a "Domoticz.state" event should now be generated in VC. It will have 2 payloads: {1} the name of the device, {2} the state of the device.
Here is a very basic example of using an event-triggered command:
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="266" name="announcing all state changes" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Change "Living Room Light" to name of your switch. *case sensitive*!">
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>The device {1} is now:</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.AddText</cmdType>
<params>
<param>{2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>Domoticz.state</event>
</command>