-
Notifications
You must be signed in to change notification settings - Fork 11
Message Body
Each message is made up of a sequence of MANDATORY and optional fields.
- The fields always appear in the same order.
- All the fields except payload are fixed length
<HEADER> <addr0> <addr1> <addr2> <param0> <param1> <OPCODE> <LENGTH> <PAYLOAD> <CHECKSUM>
< 1 > < 3 > < 3 > < 3 > < 1 > < 1 > < 2 > < 1 > <length > < 1 >
A Mandatory field.
This single byte field identifies the type of the message and which optional fields are present.
The bits are used as follows <00TTAAPP>
where
-
TT specifies the type of the message
TT
00 RQ
01 I
10 W
11 RP
-
AA specifies which address fields are present
AA
00 addr0 + addr1 + addr2
01 addr2
10 addr0 + addr2
11 addr0 + addr1
-
PP which params are present
PP
1x Param 0 is present
x1 Param 1 is present
Optional fields.
The addresses in each message vary with the message function (Opcode)
Each address is specified by 24 bits in 3 bytes.
The 24 bits specify two parts of the address as <ttttttii iiiiiiii iiiiiiii>
tttttt
specifies the type or class of device being addressed
ii iiiiiiiii iiiiiiii
is the type specific index
These are printed as a pair of decimal values TT:IIIIII
Optional fields.
Each param is a single byte field.
Param 1 is never seen in Evohome messages.
A mandatory field.
This 2 byte field specifies the type of payload in the message.
Details of the different opcode values can be found in The Evohome Protocol wiki
A mandatory field.
This single byte field specifies the number of bytes present in the following Payload field.
A mandatory field.
A variable length field containing a sequence of bytes. The number of bytes is specified by the preceding Length parameter.
The meaning of the bytes is discussed in The Evohome Protocol wiki
A mandatory field
This single byte field is calculated so that the low order 8 bits of the arithmetic sum of all the message bytes, from header to checksum inclusive, is zero.
i.e. the checksum has the value 0x100 - ( (sum of other bytes) & 0xFF )