The ADI controllers (Ocelot and Leopard) use a serial protocol in order to allow external programs to communicate with them and exchange information or trigger actions. Any serial communications with the controller must be done at 9600 baud, 8 data, 1 stop and no parity bits. There is no flow control implemented.


The "official" protocol docs can be obtained here:

http://www.appdig.com/Serprot/serprot.html

The above documents have not been updated for some time and a few additionnal commands have since been added and documented (all <x> values are decimal):


New module types have been added:

Get Unit Type

->Send 8 binary bytes: <42> <0> <0> <1> <176> <0> <148> <39>

<-Receive 6 byte header: <n> <n> <n> <n> <n> <n>

<-Receive 256 bytes data: <unit 1 Type> <unit 2 Type> <unit 3 Type> <unit 4 Type> etc…

Note: only the first 128 bytes of data are valid
<-Receive 2 byte CRC <n> <n>

Data Explanation:

SECU 16IR,Type = 6
SECU 16, Type = 11
SECU 16I, Type = 12
RLY08-XA, Type = 13
Speak-EZ, Type = 14
Slave, Type = 15
Bobcat-L, Type = 1 (light sensing)
Bobcat-H, Type = 4 (humidity)
Bobcat-T, Type = 5 (temperature)
Bobcat-A, Type = 21 (serial)



Speak Easy Control

->Send 8 binary bytes:

<200> <103> <unit> <messagenum> <command> <0> <0> <csum>

<-Receive 3 byte header:

<6> <0> <6> Note:

Data Explanation:
unit = the adnet address of the module
messagenum = message number
command = the desired command: 3 = record, 4 = play
csum = the 8-bit sum of 200 + 103 + unit + messagenum + command + 0 + 0




Note: The next two commands (and any commands beginning with "42,0,...") are commands that dump a block of memory, and it could happen that these might change in a future version of C-Max.


Read Variables

-> Send 8 binary bytes:

<42>,<0>,<0>,<143>,<169>,<0>,<13>,<151>

<- Receive 256 bytes representing the variables like this:

<var 0 LSB>, <var 0 MSB>, <var 1 LSB>, <var 1 MSB>, <var 2 LSB>, <var 2 MSB>...

For example: If variable #0 = 1 and variable #1 = 1234 decimal, then your returned data will start like this:

<1>,<0>,<210>,<4> ...


Read Timers

-> Send 8 binary bytes:

<42>,<0>,<0>,<15>,<169>,<0>,<54>,<205>

<- Receive 256 bytes (follows the same scheme as for the variables):

<tim 0 LSB>, <tim 0 MSB>, <tim 1 LSB>, <tim 1 MSB>, <tim 2 LSB>, <tim 2 MSB>...


Write Timer

-> Send: 50 bytes

<200> <41> <TimerID> <Value LSB> <Value MSB> <1> <0> <Checksum>

<- Receive: 3 byte header

<6> <0> <6>

This command writes data to the timer specified by TimerID. Value = The value to set the variable to
Checksum= 200 + 41 + VariableID + Value LSB + Value MSB + 1



"Old" ASCII Protocol

There is an older and simpler serial protocol that uses simple ASCII strings to perform certain functions such as change variables, send IR commands, etc. This protocol is more limited in functionality and is output only. Also, since it dates from the earlier CPUXA controller, it only supports variables 0 to 99 and data values from 0 to 999.

Although this protocol is less versatile in terms of what it can control, it is very handy for use with non-PC applications such as alarm panels, etc. that can only send a fixed string and not expect any response.

These commands need to the have all the characters sent within a few milliseconds to work, so you cannot test them by just keying them in manually with a terminal program like Hyperterminal. Instead, write them in a text file and then use "Send File" to send all the characters at once.

The strings are of a fixed length of 8 characters and no line termination characters (such as carriage return) are needed.


CPUXA Eight Character ASCII PROTOCOL
Application Software Version 2.31 or later
Firmware 8.21/10 or later
C-Max 1.30 or later

Learn IR
+Ryy0xxx
note: while this command is still supported, it is
recommended that C-Max software be used to learn IR
where xxx is the IR Location to learn, yy is the IR carrier frequency to be used with this code
example, learn IR # 0 at 38 kHz +R380000
example, learn IR # 17 at 36 kHz +R360017


Send Local IR
+T000xxx
where xxx is the Learned IR Location to send
example, send IR # 1 +T000001
example, send IR # 10 +T000010
example, send IR # 23 +T000023


Set/Clear Relay
+Cmmpp0x
where mm is the Module Number 01 thru 99
where pp is the I/O Point Number 00 thru 15
where x is the Relay Status to send (0 = OFF, 1 = ON)
example, turn relay 2 in module 3 ON +C030201
example, turn relay 0 in module 15 OFF +C150000
example, turn relay 5 in module 10 ON +C100501


Select Remote IR Zone
+Smmpp00
where mm is the Module Number 01 thru 99
where pp is the I/O Zone Number 00 thru 15
example, select zone 2 in module 3 +S030201
example, select zone 0 in module 15 +S150000
example, select zone 5 in module 10 +S100501


Send Remote IR
+K000xxx
note: sends IR xxx to Module and Zone selected
on above command
where xxx is the Learned IR Location to send
example, send IR # 1 +K000001
example, send IR # 10 +K000010
example, send IR # 23 +K000023


Change Variable Contents in CPUXA
+Vnn0xxx
where nn is the variable # 00 thru 99
where xxx is the new variable contents 0 thru 999 (MUST have the leading 0)
example, change variable 4's contents to 1 +V040001
example, change variable 18's contents to 0 +V180000
example, change variable 0's contents to 8764 +V008764

NOTE: It has been found that anything above 999 either has the most significant digit ignored, or causes unexpected
results in the variable contents.


Send X10 command
+Xhhkkrr
where hh is the house code 0 thru 15 (A-P)
where kk is the key (unit) code 0 - 15 (1-16)
where rr is the number of times to repeat this code 1 thru 15
example, send B 11 once +X011001
example, send B ON once +X011801
example, send B DIM 5 times +X012005


Send Extended X10 Level Command
+Ehhkkbb
where hh is the house code 0 thru 15 (A-P)
where kk is the key (unit) code 0 - 15 (1-16)
where bb is the brightness level 0 - 63
example, set H5 to 50% brightness (32) +E070432
example, set C2 to 25% brightness (16) +E020116
example, set P14 to 75% brightness (48) +E151348


Send Extended X10 Group (Scene) Command
+Ghhkkgg
note: Use C-Max Software to configure modules in groups
where hh is the house code 0 thru 15 (A-P)
where kk is the key (unit) code 0 - 15 (1-16)
where gg is the group (scene) number 0 - 63
example, set H5 to group (scene) 32 +G070432
example, set C2 to group (scene) 16 +G020116
example, set P14 to group (scene) 48 +G151348