X10 Commands

Top  Previous  Next

There are 10 commands available for controlling X10 devices:

 

result = cm11a.allLightsOff( portname, callback )

result = cm11a.allLightsOn( portname, callback )

result = cm11a.allOff( portname, callback )

result = cm11a.on( portname, houseCode, deviceCode, callback )

result = cm11a.off( portname, houseCode, deviceCode, callback )

result = cm11a.dim( portname, houseCode, deviceCode, percent, callback )

result = cm11a.bright( portname, houseCode, deviceCode, percent, callback )

result = cm11a.deviceStatus( portname, houseCode, deviceCode, callback )

result = cm11a.hail( portname, houseCode, deviceCode, callback )

result = cm11a.sendBinary( binary, callback )

 

Name

Type

Description

callback

function ( sent )

The callback function, sent is a boolean

portname

string

The portname of the CM11A to use for sending. cm11a.getList() returns a list of available outputs.

houseCode

Single character

Character "A" through "P"

deviceCode

number

Device Code 1 through 16

percent

dim steps

0-100 (internally X10 only 22 steps so your value will be rounded to the nearest increment )

binary

string

You can send your own commands using this. The command, device and houseCode ids are available in cm11a.commands, cm11a.houseCodes and cm11a.deviceCodes

result

true or nil, error

If the CM11A with portname is not available an error will be returned.