X10's XTC798 Document (HTML Version)

"Standard" and "Extended" X-10 Code Formats September 22, 1993 Rev. 11/20/94, 07/12/96, 12/18/96, 04/02/97, 07/22/97, 05/07/98

Bit Encoding

Data is accepted bit by bit as the presence or absence of 120Khz carrier occurring after the positive or negative power line zero crossing. The acceptance window begins approximately 250 usecs. and ends approximately 900 usecs. after a zero crossing. In this window 48 or more cycles of carrier are accepted as a "1" bit and fewer than 48 as a "0" bit. Except for the Startcode, each bit of data is sent in its true (D8 D4 D2 D1) and complement (D8' D4' D2' D1') form.

Standard Message Format

Mains Cycles

   1    2    3    4    5    6    7    8    9   10   11   12   13
*----*----*----*----*----*----*----*----*----*----*----*----*---
  11  10   H8H8'H4H4'H2H2'H1H1'D8D8'D4D4'D2D2'D1D1'F1F1' 00  00
*---------*-------------------*-------------------*----*--------
STARTCODE *     HOUSECODE     *  ADDRESS/FUNCTION *FUNC*  EOM 
----------------------------------------------------------------

HOUSECODE SETTINGS				H8	H4	H2	H1
A						0	1	1	0
B						1	1	1	0
C						0	0	1	0
D						1	0	1	0
E						0	0	0	1
F						1	0	0	1
G						0	1	0	1
H						1	1	0	1
I						0	1	1	1	
J						1	1	1	1
K						0	0	1	1
L						1	0	1	1
M						0	0	0	0	
N						1	0	0	0
O						0	1	0	0	
P						1	1	0	0	

ADDRESS/FUNCTION

If D16 is a "1" the code is a function (command). Otherwise D1-D8 is an 'address'. Once addressed, a module responds to any command code. It becomes 'unaddressed' by the first 'address' message after a command, or by 'All Units Off'.

CODEWHEEL			D8	D4	D2	D1	D16
1				0	1	1	0	0
2				1	1	1	0	0
3				0	0	1	0	0
4				1	0	1	0	0
5				0	0	0	1	0
6				1	0	0	1	0
7				0	1	0	1	0
8				1	1	0	1	0
9				0	1	1	1	0
10				1	1	1	1	0
11				0	0	1	1	0
12				1	0	1	1	0
13				0	0	0	0	0
14				1	0	0	0	0
15				0	1	0	0	0
16				1	1	0	0	0
ON				0	0	1	0	1 (shutters open)
OFF				0	0	1	1	1 (shutters close)
DIM				0	1	0	0	1 (shutters up)
BRIGHT				0	1	0	1	1 (shutters down)
ALL LIGHTS ON		0	0	0	1	1
ALL UNITS OFF		0	0	0	0	1	
ALL LIGHTS OFF	  	0 	1	1	0	1
EXTENDED CODE 1 		0	1	1	1	1 FOR DATA/CONTROL
HAIL REQUEST			1 	0	0	0	1
HAIL ACK.			1	0	0	1	1
EXTENDED CODE 3		1	0	1	0	1 FOR SECURITY MESSAGES
UNUSED				1	0	1	1	1
EXTENDED CODE 2		1	1	0	0	1 FOR METER READ & DSM
STATUS "ON"			1	1	0	1	1 
STATUS "OFF"			1	1	1	0	1
STATUS REQUEST		1	1	1	1	1

The full message is sent twice without a gap. That is, the second Startcode begins on the next power line cycle after the Function bit. Standard X-10 modules do not respond to the Extended Code message. This code enables further bytes to be added to the message without them being "seen" by Standard X-10 modules. Details of the Extended Code bytes are given below. Any message containing Extended bytes must contain the Extended Code command in the first part of the message.

Extended Message Format for EXTENDED MESSAGE 1 (01111)

Cumulative Mains Cycles

   2		    6             11      15           23			  31
1110		HC/HC'		EXT/EXT'   DC/DC'  DATA/DATA'	COMMAND/COMMAND'

Start		House		Extended	Unit	 Data		Command 
Code 		Code		Code		Code	 Byte		Byte

4bits		4bits		5bits		4bits	 8bits	  	8bits

The coding of the HC and DC bytes is as shown in the Standard Code Tables.

The coding of the Data and Command bytes is shown below.

TYPE = 0	 Shutters and Sunshades
         DATA				COMMAND
					  TYPE   FUNCT
128 64 32 16  8  4  2  1	 	8 4 2 1 8 4 2 1 
x  x  x  D  D  D  D  D		0 0 0 0 0 0 0 1 	Open Shutter to amount in  								Data Field. Enable Sun 									Protection.
(D = 0 is closed, D = 25 is fully open)

x  x  x  D  D  D  D  D 	 	0 0 0 0 0 0 1 0 	Limit the degree of
opening to the value in
the Data Field.
								(Sun Protection)

x  x  x  D  D  D  D  D		0 0 0 0 0 0 1 1 	Open Shutter to amount in  								the Data Field. Disable   								Sun Protection.    

x  x  x  x  x  x  x  x		0 0 0 0 0 1 0 0 	Open all shutters on this  								Housecode. Disregard the  								Unitcode. Disable Sun     								Protection.

x  x  x  x  x  x  x  x		0 0 0 0 0 1 0 1 	Open all shutters.        								Ignore Housecode and      								Unit code fields.
								Disable Sun Protection.

L4 L2 L1  D  D  D  D  D	 	0 0 0 0 0 1 1 1 	Include this unit in  the  								Lifestyle mode L. D is    								the degree of opening.
DATA						COMMAND
					  TYPE   FUNCT

L4 L2 L1  x  x  x  x  x	 	0 0 0 0 1 0 0 0 	Begin Lifestyle mode L.   							      Disregard HC/DC 							  			(only responds if
 								previously included) 

L4 L2 L1  x  x  x  x  x	 	0 0 0 0 1 0 0 1 	Exclude (erase) this unit  								from Lifestyle L

x  x  x   x  x  x  x  x	 	0 0 0 0 1 0 1 0 	Exclude (erase) from  all  								Lifestyle modes.  										Disregard HC/DC fields

x  x  x   x  x  x  x  x	 	0 0 0 0 1 0 1 1 	Close all shutters on      								this HC. Disregard the     								Unit code. Enable Sun       								Protection

x  x  x   x  x  x  x  x	 	0 0 0 0 1 1 0 0 	Close all shutters. 								  	Disregard HC/DC fields
								Enable Sun Protection.

x  x  x   x  x  x  x  x 	 	0 0 0 0 1 1 1 0 	Self Test for 								 		Housecode/Unit Code match  								Drive UP for 1 sec. if 									match.

x  x  x   x  x  x  x  x 	 	0 0 0 0 1 1 1 1 	Self Test the EAROM 								 	addresses. Leave EAROM 									Blank. Drive UP for 								 	1sec.,then DN for 1sec 
						
TYPE = 1	Sensors

	      DATA		        TYPE/COMMAND
x  x  x  x  x  x  x  x 	  	0 0 0 1 0 0 0 1 	Request Average Light     								Data from the Unit      								 	addressed in the HC/DC   								fields.

x  x  x  x  x  x  x  x		0 0 0 1 0 0 1 0 	Request Instant          								Temperature from the     								addressed unit.

	      DATA		        TYPE/COMMAND
x  x  x  x  x  x  x  x 	  	0 0 0 1 0 0 1 1 	Request Status from      								addressed unit.

x  x  x  x  x  x  x  x 	  	0 0 0 1 0 1 0 0 	Request Instant Light 								  	Data from the addressed 								  	unit.

x  x  x  x  x  x  x  x 	  	0 0 0 1 0 1 0 1 	Request Average Temp. 								  	Data from the addressed 								  	unit.(16min. average)	

I2 I1 P  P  P  P  P  P 	  	0 0 0 1 1 0 1 1 	Ambient Light data
								from the sensor in the 								  	HC/DC fields.

T  T  T  T  T  T  T  T 	  	0 0 0 1 1 1 0 0 	Temperature data from 								  	the sensor in the HC/DC 								  	fields.

S  S  S  S  S  S  S  S 	  	0 0 0 1 1 1 0 1 	Status data (bit mapped)  								from the unit in the    								  	HC/DC field
TYPE = 2  Reserved for Security 

TYPE = 3  Control Modules (Dimmers and Appliances)

	   DATA		    TYPE/CMD
G1 G0 0  x  x  x  x  x		3  0 	INCLUDE IN GROUP G1G0 AT THE CURRENT  						OUTPUT SETTING (on this HC,DC). The  						GROUP ADDRESS IS ABSOLUTE (no GROUP    						REFERENCE)

G1 G0 1  x  S3 S2 S1 S0		3  0 	INCLUDE IN GROUP G1G0 AT THE CURRENT  						OUTPUT SETTING (on this HC,DC). The  						GROUP ADDRESS is RELATIVE to the GRP 						REFERENCE S3S2S1S0

x  x  B16B8 B4 B2 B1 B0		3  1 	PRESET RECEIVER O/P on this HC DC
For all units:
'B'FIELD=NZ means 'ON' Zero means 'OFF'.
For Dimmers:
'B'FIELD = H'3F'is 'ON'@ FULL BRIGHT IMMEDIATE. (63 values)
'B'FIELD = H'01'to H'3E' is ON @ PREVIOUS SETTING IMMEDIATE, brightening gradually to the new value of 'B'.
If previously OFF, the unit comes ON at FULL DIM before brightening.
  						'B' FIELD = '0' is 'OFF'

G1 G0 B16B8 B4 B2 B1 B0		3  2 	INCLUDE IN GROUP 'G' on specified     						HC, DC. 'B' defines O/P State, 'G' the  						Group to which it applies. Other     						Group membership is not affected.
 						Simultaneous membership of up to 4   						Groups is allowed. Group function is  						not executed until the EXECUTE GROUP  						message is received.

x  x  x  x  x  x  x  x		3  3 	ALL UNITS ON on specified HC.    

x  x  x  x  x  x  x  x		3  4 	ALL UNITS OFF on specified HC 

0  0  0  0  G3 G2 G1 G0		3  5 	REMOVE FROM GROUP(S) (this HC,DC).    						'G' is bit mapped

1  1  1  1  G3 G2 G1 G0		3  5 	REMOVE FROM GROUP(S) (this HC)

G1 G0 0  0  x  x  x  x		3  6 	EXECUTE GROUP FUNCTION (this HC).      						GROUP ADDRESS IS ABSOLUTE 								(no GROUP REFERENCE)

G1 G0 1  0  S3 S2 S1 S0		3  6	EXECUTE GROUP FUNCTION (this HC).    						The GROUP ADDRESS is relative to the   						GRP REFERENCE S3S2S1S0.	
 
G1 G0 0  1  x  x  x  x		3  6 	PUT UNITS IN THIS GROUP OFF. THE      						GROUP PRESETS ARE UNAFFECTED.GROUP  							ADDRESS IS ABSOLUTE. 

G1 G0 1  1  S3 S2 S1 S0		3  6 	PUT UNITS IN THIS GROUP OFF. THE     						GROUP PRESETS ARE UNAFFECTED. GROUP  						ADDRESS IS RELATIVE TO S3S2S1S0

x  x  0  0  x  x  x  x		3  7 	REQ. OUTPUT STATUS (this HC,DC) 
 						Req. TO module



	   DATA		    TYPE/CMD
x  x  0  1  x  x  x  x		3  7  REQ.OUTPUT STATUS (this HC,DC)
				Req. FROM Module after Power Up

G1 G0 1  0  0  0  0  0		3  7 	REQ. GROUP STATUS on this HC, DC
						The GROUP ADDRESS is absolute.
						Req. TO Module

G1 G0 1  1  S3 S2 S1 S0		3  7 	REQ. GROUP STATUS on this HC, DC
						The GROUP ADDRESS is relative 						 		to the GRP REFERENCE S3S2S1S0
						Req. TO module

A1 A0 B16B8 B4 B2 B1 B0		3  8 	OUTPUT STATUS ACK.(this HC,DC)
						A1 = 1 if load connected
						A0 = 0 for LAMP, 1 for SWITCH

G1 G0 B16B8 B4 B2 B1 B0		3  9 	GROUP STATUS ACK.(this HC, DC)
						GROUP may be ABS. or REL., 								depending on the REQUEST 		

x  x  x  x  x  x  x  x		3  A  GROUP STATUS ACK. Not in the Group  							requested. The DATA field returns    						the value contained in the REQUEST 

x  x  x  x  x  x  C1 C0		3  B  CONFIGURE MODULES (this HC )
						C0 = AUTOACK 'EXTENDED' MESS
						C1 = AUTOACK 'STANDARD' MESS
						Automatic ACK for messages that      						alter O/P state of unit. Bit's 2-7   						reserved for future.

G1 G0 0 B/D x  x  x  x		3  C  Group Bright or Dim. The Group      							address is absolute.
						B/D = 1 for Bright, 0 for Dim

G1 G0 1 B/D S3 S2 S1 S0		3  C  Group Bright or Dim. The Group      							address is relative to the GROUP      						REF. S3S2S1S0

NOTE on GROUP BRIGHT/DIM & GROUP OFF

This message causes the output state of a Dimmer to Brighten or Dim for as long as the message is received, so long as the HC and GROUP ADDRESS (ABS. or REL.) match the unit HC and it is within that Group. The Output Level defined for the unit within that Group is unaffected. Similarly, GROUP OFF will turn off any unit in the specified Group, but won’t affect the output level set for the unit for that Group.

TYPE = 4 Extended Secure Addressing

This field enables all Standard and Extended Type 3 X-10 message functions but with an additional 8 bit security address in the DATA BYTE of the message. For a unit to respond requires at least a HC and SECURE ADDRESS match.

	   DATA		    TYPE/CMD
A7 A6 A5 A4 A3 A2 A1 A0		4  0	Unit is 'addressed' if there is a    						'HC' 'ADDR' 'DC' match  									(HC EXT DC ADDR 40)

A7 A6 A5 A4 A3 A2 A1 A0		4  1 	Unit is 'addressed' if there is a     						'HC''ADDR' match
						(HC EXT xx ADDR 41)

A7 A6 A5 A4 A3 A2 A1 A0		4  2	Execute 'Standard' X-10 functions    						All Off, All Lights On, if there is a     						'HC''ADDR' match. Execute On, Off,   						Bright, Dim, if the unit is          						additionally 'addressed'.
						(HC EXT FN ADDR 42)

The Function is contained in the Unit Code nibble of the message and is the same number as defined in 'Standard' messages.

  
D7 D6 D5 D4 D3 D2 D1 D0		4  3	Execute 'Extended Type 3’ functions   						if there is a HC match and the unit  						is additionally 'addressed'.
						(HC EXT FN DATA 43)

The DATA BYTE is the Group Address as defined for TYPE 3 Messages. The TYPE 3 Function is defined in the Unit Code nibble of the message. The rules for the 'Addressed' Status follow the rules for Standard Adressing - a unit becomes 'Addressed' as a result of a Type 40 or 41 message and remains so until the next 40/41 message following a Type 42/43 message. The 'addressed' status is also reset if the is a HC match but secure address mismatch in a Type 4 message (BUT NOT 43).

					 
	    DATA		    TYPE CMD
A7 A6 A5 A4 A3 A2 A1 A0		4  4	Execute ‘Unit Code’ ’On’ if there is 
a HC and SECURE ADDRESS match.
(HC EXT DC ADDR 44)

A7 A6 A5 A4 A3 A2 A1 A0		4  5	Execute ‘Unit Code’ ’Off’ if there    						is a HC and SECURE ADDRESS match. 
						(HC EXT DC ADDR 45)

SECURE ADDRESS ACQUISITION (MODULES WITH SECURE ADDRESS CAPABILITY)

If there is no current secure address in the unit, it will acquire the address in the DATA BYTE if the first TYPE 40/41/42 or TYPE 5X message it sees, so long as there is a HC match. Once it has acquired a secure address, it will not respond to 'Standard' or 'Type 3 Extended' messages. The unit may be set back to a 'non secure address state' by applying power to the unit with the MAXDIM key held pressed.

TYPE = 5 Extended Secure Addressing for Groups

	   DATA 		   TYPE CMD
A7 A6 A5 A4 A3 A2 A1 A0		5  0	Execute Group 0 (relative to the     						Group Ref. in the Unit Code nibble)
						(HC EXT GRPREF ADDR 50)

A7 A6 A5 A4 A3 A2 A1 A0 		5  1	Execute Group 1 (relative to the     						Group Ref. In the Unit Code nibble)
						(HC EXT GRPREF ADDR 51)

A7 A6 A5 A4 A3 A2 A1 A0 		5  2	Execute Group 2 (relative to the      						Group Ref. In the Unit Code nibble)
						(HC EXT GRPREF ADDR 52)

A7 A6 A5 A4 A3 A2 A1 A0 		5  3	Execute Group 3 (relative to the     						Group ref. in the Unit Code nibble)
						(HC EXT GRPREF ADDR 53)

A7 A6 A5 A4 A3 A2 A1 A0		5  4	Turn ‘Off’ all units in Group 0 (rel.   						to Group Ref. in Unit Code nibble)
						(HC EXT GRPREF ADDR 54)

A7 A6 A5 A4 A3 A2 A1 A0		5  5	Turn ‘Off’ all units in Group 1 (rel.   						to Group Ref. in Unit Code nibble)
						(HC EXT GRPREF ADDR 55)

A7 A6 A5 A4 A3 A2 A1 A0		5  6	Turn ‘Off’ all units in Group 2 (rel.   						to Group Ref. in Unit Code nibble)
						(HC EXT GRPREF ADDR 56)


	   DATA		    TYPE/CMD
A7 A6 A5 A4 A3 A2 A1 A0		5  7	Turn ‘Off’ all units in Group 3 (rel.   						to Group Ref. in Unit Code nibble)
						(HC EXT GRPREF ADDR 57)

A7 A6 A5 A4 A3 A2 A1 A0		5  8	Brighten all units in Group 0 (rel.   						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 58)

A7 A6 A5 A4 A3 A2 A1 A0		5  9	Brighten all units in Group 1 (rel.   						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 59)

A7 A6 A5 A4 A3 A2 A1 A0		5  A	Brighten all units in Group 2 (rel.   						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 5A)

A7 A6 A5 A4 A3 A2 A1 A0		5  B	Brighten all units in Group 3 (rel.   						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 5B)

A7 A6 A5 A4 A3 A2 A1 A0		5  C	Dim all units in Group 0 (rel. to    						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 5C)

A7 A6 A5 A4 A3 A2 A1 A0		5  D	Dim all units in Group 1 (rel. to    						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 5D)

A7 A6 A5 A4 A3 A2 A1 A0		5  E	Dim all units in Group 2 (rel. to    						to Group Ref. in Unit Code nibble)
                                 	(HC EXT GRPREF ADDR 5E)

A7 A6 A5 A4 A3 A2 A1 A0		5  F	Dim all units in Group 3 (rel. to    						to Group Ref. in Unit Code nibble)
                                  	(HC EXT GRPREF ADDR 5F)

NOTE ON GROUP BRIGHT/DIM FOR Leviton 6400 CONTROLLERS IN SECURE ADDRESS MODE

The Command 58 - 5F is derived from the last Group Execute key that was pressed. The Group Reference is, in fact, the Unit Code of the Controller.

LIFESTYLE CODES

    	L4 L2 L1
	0  0  0  Wake
	0  0  1  Leave
	0  1  0  Return
	0  1  1  Sleep
	1  0  0  Evening
	1  0  1  Vacation
	1  1  0  Special 1 
	1  1  1  Special 2

AMBIENT LIGHT DATA

  I2 I1 P32 P16 P8 P4 P2 P1
  0  0   D  D  D  D  D  D  Range 0-630 in steps of 10
  0  1   D  D  D  D  D  D  Range 0-6300 in steps of 100
  1  0   D  D  D  D  D  D  Range 0-63000 in steps of 1000
  1  1   D  D  D  D  D  D  Range 0-630000 in steps of 10000

If the Data is divided by two it will approximate to LUX values.

TEMPERATURE DATA

(+/-)T64 T32 T16 T8 T4 T2 T1 	Range 0 - 127 in integer values.
					(+/-) = '1' for negative integers.	
					Units are Deg. Celsius.	

NOTE: The Ambient Light/Temperature Sensor is capable of reading from -28 to +50 deg. Celsius.

ACCESS PROTOCOL

With Extended Code systems, the amount and nature of the messages that are being used requires that Transmitters avoid message collisions where possible, and that, when a collision does occur, it can be detected and the conflict resolved. In order to do this, the following access protocol should be adopted. All messages are assumed to have equal priority.

When a transmitter has a message it wishes to transmit, it must wait for access to the power line for either 8, 9, or 10 half power line cycles - during which the line must have been continuously clear of data '1' bits. If a '1' bit is detected, it must restart its access timing and wait for another 8, 9, or 10 cycles. After line access has been achieved, the transmitter must check the line during the transmission of a '0' bit (no carrier) to see that no other transmitter is transmitting. If a collision occurs, the transmitter must abort its transmission immediately and again go though the line access procedure. The choice of 8, 9, or 10 half cycles is chosen randomly for each line access attempt.

NOTES

1. Messages with a TYPE = 0010 are reserved for Security