X10

From VoxCommando
Jump to: navigation, search

Setup

VoxCommando can work with X10 devices provided that you have an X10 CM15A USB device connected to the computer which is running VoxCommando. Devices other than the CM15A may work if they are compatible with the SDK but we have not tested any.

You must have the Activehome Pro SDK installed on your system and the X10 plugin must be enabled in VoxCommando options.


Activehome Pro does not need to be running, it is sufficient to install the SDK and attach the CM15A device to your computer using a USB cable.

Using X10 actions in your voice commands

Once the device is attached, the SDK installed and the X10 plugin enabled, you can send x10 commands using the action:

X10.SendPlc

This action accepts one parameter which is the PLC (power line command) to send.

Here are some examples of valid PLCs that you can use:

A1 ON Switch Device A1 On
A5 Off Switch Device A5 Off
B3 DIM 20 Decrease the brightness of device B3 by about 20 percent
A5 BRIGHT 40 Increase the brightness of device A5 by about 40 percent
C1 ALLUNITSOFF Turn all devices in house 'C' Off



Sample XML Code for X10

Here is some xml code for a sample group in VoxCommando to get you started. You can copy ALL the xml code from the box below, and then paste it into your VoxCommando command tree. This code is just to get you started and give you an idea of what you can do. You will need to adjust the device addresses and names according to your own X10 setup. For a more complex configuration with many devices you should learn about Payload XML files which you can use to name all your devices. You can also create multiple actions in a command in order to create the equivalent of a "scene".

<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="X10 sample" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1099" name="Turn switch on/off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A5 {1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>turn</phrase>
    <phrase>switch, corner switch</phrase>
    <payloadList>On, Off</payloadList>
  </command>
  <command id="1114" name="Turn the lamp on/off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="'The lamp' has an address of A1&#xD;
Our payload: {1} will be either On or Off">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 {1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>turn</phrase>
    <phrase>the fan</phrase>
    <payloadList>On, Off</payloadList>
  </command>
  <command id="1125" name="Brighten the lamp by {1} percent" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="'The lamp' has an address of A1&#xD;
Our payload: {1} tells it how much to adjust the brightness by.">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 Bright {1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Brighten the lamp by</phrase>
    <payloadList>5,10,15,20,25,30,35,40,45,50,60,70</payloadList>
    <phrase optional="true">percent</phrase>
  </command>
  <command id="1115" name="Dim the lamp by {1} percent" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="'The lamp' has an address of A1&#xD;
Our payload: {1} tells it how much to adjust the brightness by.">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 Dim {1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Dim the lamp by</phrase>
    <payloadList>5,10,15,20,25,30,35,40,45,50,60,70</payloadList>
    <phrase optional="true">percent</phrase>
  </command>
  <command id="1132" name="The lamp brightness to {1} percent" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="'The lamp' has an address of A1&#xD;
Our payload: {1} tells it what brightness we want.&#xD;
We first turn the lamp off to set brightness to 0&#xD;
Then we raise brightness by {1} %">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 OFF</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 BRIGHT {1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>The lamp brightness to</phrase>
    <payloadList>5,10,15,20,25,30,35,40,45,50,60,70,80,90,100</payloadList>
    <phrase optional="true">percent</phrase>
  </command>
  <command id="1153" name="Shut down the West Wing" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="West Wing is house 'A'.  So this will shut off all units with an address that starts with 'A'">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>A1 ALLUNITSOFF</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Shut down the West Wing</phrase>
  </command>
  <command id="1136" name="Shut down the East Wing" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="West Wing is house 'B'.  So this will shut off all units with an address that starts with 'B'">
    <action>
      <cmdType>X10.SendPlc</cmdType>
      <cmdString>B1 ALLUNITSOFF</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Shut down the East Wing</phrase>
  </command>
</commandGroup>