X10 On Off

From XAP Automation
Jump to: navigation, search

The X10 connectors use a simple schema. To perform an action on an X10 device, you need to send a message in the following format to the X10 connector.

To turn device L1 on, you need to send a message which looks like this:

xap-header
{
v=12
hop=1
uid=FF123400
class=xap-x10.request
source=acme.my.controller
target=rocket.cm12u.home
}
xap-x10.request
{
command=on
device=L1
}

or to turn device L1 off you need to send a message which looks like this:

xap-header
{
v=12
hop=1
uid=FF123400
class=xap-x10.request
source=acme.my.controller
target=rocket.cm12u.home
}
xap-x10.request
{
command=off
device=L1
}

These messages can be originated from any xAP device or application which is aware of the X10 schema. To perform simple tests, you can use xap-send to originate messages like this from a text file. The docs folder for Patrick Lidstone's CM12U connector contains these messages as text files which you can send direct from the command line using:

xap-send L1_on.xap

or

xap-send L1_off.xap

Patrick