http://wiki.linuxmce.org/api.php?action=feedcontributions&user=Dbarnett&feedformat=atom
LinuxMCE - User contributions [en]
2024-03-29T07:07:08Z
User contributions
MediaWiki 1.24.1
http://wiki.linuxmce.org/index.php?title=ZWave_API&diff=24317
ZWave API
2010-07-08T14:31:32Z
<p>Dbarnett: /* References */ flagged dead link</p>
<hr />
<div>[[Category: Automation| ]]<br />
[[Category: RF Control]]<br />
[[Category: ZWave]]<br />
[[Category: Programmer's Guide]]<br />
[[Category: Documentation]]<br />
{{versioninfo}}<br />
= Introduction =<br />
The ZWave API is not available for free. You have to get the Zensys SDK for command specifications and device class definitions. This page tries to collect all the freely available information about ZWave. The final goal is to provide a header file with all necessary definitions for basic operation with open source software.<br />
<br />
IMPORTANT: all information added to this page _must_ have a reference to the source where it came from.<br />
<br />
= API =<br />
== Frame specification ==<br />
Karl Denninger implemented basic ZWave support in his software "HomeDaemon". He advised that basic frame specification can be derived from his source code (http://www.denninger.net/homedaemon.htm).<br />
<br />
== Basic Classes ==<br />
From the Leviton Z-Wave RS232 ASCII Interface Programming Guide (RZC0P-1LW, 10/9/2007):<br />
Controller 1<br />
Static controller 2<br />
Slave 3<br />
Routing Slave 4<br />
that leads us to some definitions:<br />
#define OZA_BASIC_CLASS_CONTROLLER 0x01<br />
#define OZA_BASIC_CLASS_STATIC_CONTROLLER 0x02<br />
#define OZA_BASIC_CLASS_SLAVE 0x03<br />
#define OZA_BASIC_CLASS_ROUTING_SLAVE 0x04<br />
<br />
== Device Types ==<br />
From the Z-Wave Configuration Information-1.pdf:<br />
CONTROLLER 0x01 (like the ZTH200, Classes: )<br />
SWITCH/APPLIANCE 0x10 (ZRP200, Classes: 25, 27, 75)<br />
DIMMER 0x11 (ZDP200, ZDW230, .., Classes: 26, 27, 75, ...)<br />
TRANSMITTER 0x12<br />
THERMOSTAT 0x08<br />
SHUTTER 0x09<br />
<br />
== Command and Device classes ==<br />
From the Electronic Solutions, Inc. DBMZ Advanced User manual:<br />
<br />
=== Command/Device Classes ===<br />
==== Basic Slave Device ====<br />
==== All ====<br />
==== Multilevel Switch ====<br />
* COMMAND_CLASS_SWITCH_MULTILEVEL<br />
MULTILEVEL_SWITCH_GET<br />
MULTILEVEL_SWITCH_SET<br />
MULTILEVEL_SWITCH_START_LEVEL_CHANGE<br />
MULTILEVEL_SWITCH_STOP_LEVEL_CHANGE<br />
<br />
additional information from http://zwaveworld.com/forum/index.php?showtopic=237:<br />
>?FI003,017,000 //basic class 3 (slave), generic class 0x11 (multlevel switch), specific class 0<br />
<br />
==== All the known classes ====<br />
COMMAND_CLASS_BASIC 0x20 <BR><br />
COMMAND_CLASS_BATTERY 0x80 <BR><br />
COMMAND_CLASS_WAKE_UP 0x84 <BR><br />
COMMAND_CLASS_CONTROLLER_REPLICATION 0x21 <BR><br />
COMMAND_CLASS_SWITCH_MULTILEVEL 0x26 <BR><br />
COMMAND_CLASS_SWITCH_ALL 0x27 <BR><br />
COMMAND_CLASS_SENSOR_BINARY 0x30 <BR><br />
COMMAND_CLASS_ALARM 0x71 <BR><br />
COMMAND_CLASS_MULTI_CMD 0x8F <BR><br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE 0x46 <BR><br />
COMMAND_CLASS_CLOCK 0x81 <BR><br />
COMMAND_CLASS_ASSOCIATION 0x85 <BR><br />
COMMAND_CLASS_CONFIGURATION 0x70 <BR><br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC 0x72 <BR><br />
-<BR><br />
COMMAND_CLASS_SCENE_ACTIVATION 0x2B <BR><br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF 0x2C <BR><br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC 0x72 <BR><br />
COMMAND_CLASS_VERSION 0x86 <BR><br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY 0x91 <BR><br />
COMMAND_CLASS_NODE_NAMING 0x77 <BR><br />
COMMAND_CLASS_POWERLEVEL 0x73 <BR><br />
COMMAND_CLASS_MARK 0xEF <BR><br />
COMMAND_CLASS_HAIL 0x82 <BR><br />
COMMAND_CLASS_MULTI_INSTANCE 0x60 <BR><br />
COMMAND_CLASS_SENSOR_MULTILEVEL 0x31 <BR><br />
COMMAND_CLASS_SWITCH_BINARY 0x25 <BR><br />
<br />
==== Basic ====<br />
* COMMAND_CLASS_BASIC<br />
BASIC_GET<br />
BASIC_SET<br />
<br />
==== Mandatory ====<br />
==== Multilevel Sensor ====<br />
(from the Vizia RF Application Note)<br />
* COMMAND_CLASS_SENSOR_MULTILEVEL<br />
example get:<br />
>N4SE49,4 (RZC0P Syntax)<br />
sensor report:<br />
<N004:049,005,001,009,075<br />
049: device class<br />
005: command report<br />
001: value send is a temperature value<br />
009: value represented with 1 byte in degrees fahrenheit <br />
075: 75° F<br />
==== Setback schedule thermostat ====<br />
from http://www.innovus.dk/fileadmin/user_upload/manual/VD2_standard_01_RA-PLUS.pdf<br />
<br />
Supported:<br />
COMMAND_CLASS_ASSOCIATION<br />
COMMAND_CLASS_BATTERY<br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC<br />
COMMAND_CLASS_MULTI_CMD<br />
COMMAND_CLASS_VERSION<br />
COMMAND_CLASS_WAKE_UP<br />
Controlled:<br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE<br />
COMMAND_CLASS_CLOCK<br />
COMMAND_CLASS_MULTI_CMD<br />
<br />
==== HSM100 (battery, temperature, motion, light) ====<br />
The HSM100 is a motion sensor (probably the best as for now) (2008)<br />
<br />
Device supports classes: 60, 31, 70, 84, 85, 80, 72, 77, 86<br />
Manufacturer ID: 1E (HomeSeer) Type: 02 ID: 01<br />
Lib: 2.31 App: 1.4 Also know with Lib: 2.40 App: 1.6 or App: 1.7<br />
COMMAND_CLASS_MULTI_INSTANCE, 60<br />
COMMAND_CLASS_SENSOR_MULTILEVEL, 31<br />
COMMAND_CLASS_CONFIGURATION, 70<br />
COMMAND_CLASS_WAKE_UP, 84<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_BATTERY, 80<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_VERSION 86<br />
<br />
<br />
<br />
The following frame from personal observations is described below<BR><br />
<br />
0030.354<01 05 00 13 03 00 EA <BR><br />
0030.344<06 01 04 01 13 01 E8 <BR> <br />
0030.244<01 09 00 04 00 0A 03 80 03 <B>64</B> 1C <I>BATTERY 100%</I> <BR><br />
0030.233<01 05 00 13 03 00 EA <BR><br />
0030.223<01 04 01 13 01 E8 <BR><br />
0030.223<06 <BR><br />
0030.193<06 02 31 05 03 <B>01</B> 00 A5 <I>LIGHT 1%</I> <BR> <br />
0030.193<01 0E 00 04 00 0A 08 60 <BR><br />
0030.183<01 05 00 13 03 00 EA <BR><br />
0030.173<01 04 01 13 01 E8 <BR><br />
0030.163<06 <BR><br />
0030.063<06 03 31 05 01 2A 02 D5 5A <I>TEMPERATURE 72.5F</I> <BR> <br />
0030.063<01 0F 00 04 00 0A 09 60 <BR><br />
0029.743<01 05 00 13 03 00 EA <BR><br />
0029.733<01 04 01 13 01 E8 <BR><br />
0029.733<06 <BR><br />
0029.593<01 08 00 04 00 0A 02 84 07 78 <BR><br />
<BR><br />
<BR><br />
<br />
<br />
The HSM100 when awake send a frame and stay awake for about 2.5 seconds to answer to request.<br />
01 08 00 UU 00 03 02 84 07 CR <br />
when this frame is received if we need to get the temperature we have to send<br />
01 0C 00 13 UU 05 60 06 03 31 04 05 03<br />
...and to get the light %<br />
01 0C 00 13 UU 05 60 06 02 31 04 05 03<br />
if there is a change in light level or temperature a frame will be answered by the HSM100 <br />
to indicate the temperature or / and the light level<br />
<br />
Light % level<br />
Let's take the frame<br />
<br />
06 02 31 05 03 01 02 A7<br />
<br />
'VB express 2008 sample code to get the light level in %<br />
If InStr(temp, "06 02 31 05 03") Then<br />
j = InStr(temp, "06 02 31 05 03")<br />
carac = Mid(temp, j + 18, 5)<br />
resultat = carac & "-" & HexToDec(Mid(temp, j + 18, 2)) & "%"<br />
End If<br />
<br />
<br />
<br />
Temperature measure<br />
<br />
06 03 31 05 01 2A 02 E2 6D <br />
<br />
<br />
<br />
<br />
j = InStr(temp, "06 03 31 05 01")<br />
carac = Mid(temp, j + 18, 5)<br />
If carac <> "" Then<br />
temperature1 = HexToDec(Mid(temp, j + 21, 2))<br />
If HexToDec(Mid(temp, j + 18, 2)) = 3 Then<br />
temperature1 = ((temperature1 - 25) / 10) + 79.3<br />
End If<br />
<br />
If HexToDec(Mid(temp, j + 18, 2)) = 2 Then<br />
temperature1 = ((temperature1 - 170) / 10) + 68.2<br />
End If<br />
<br />
If HexToDec(Mid(temp, j + 18, 2)) = 1 Then<br />
temperature1 = ((temperature1 - 170) / 10) + 41.1<br />
End If<br />
' in case °celsius are requested instead of °F<br />
tc = Format((5 / 9) * (temperature1 - 32), "##.#")<br />
temp = temperature1<br />
calculate_temperature = temp<br />
End If<br />
<br />
Motion detection for module with address 7 <BR><br />
<BR><br />
01 09 00 04 00 07 03 20 01 <U>00</U> no move <BR><br />
01 09 00 04 00 07 03 20 01 <U>FF</U> move <BR><br />
<BR><br />
<BR><br />
C O N F I G U R A T I O N HSM100<BR><br />
SET Unit 0Ch to report no move delay after 1 minute<br />
01 0C 00 13 0C 05 70 04 02 01 <U>01</U> 05 03 99 <br />
set unit 0Ch to wake up every 6 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>01</U> 68 01 05 03 05<br />
set unit 0Ch to wake up every 12 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>02</U> D0 01 05 03 BE<br />
set unit 12 to wake up every 18 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>04</U> 38 01 05 03 50<br />
Set unit 0Ch led off<br />
01 0C 00 13 0C 05 70 04 03 01 <U>00</U> 05 03 99 <br />
Set unit 0Ch led ON<br />
01 0C 00 13 0C 05 70 04 03 01 <U>FF</U> 05 03 66<br />
<br />
Get sofware association for unit 0Ch<br />
Write 01 0A 00 13 0C 03 85 02 01 05 03 69 <br />
Read 01 0C 00 04 00 0C 06 85 03 01 04 00 01 7F // YES associated<br />
OR<br />
Read 01 0B 00 04 00 0C 05 85 03 01 04 00 7A // NOT associated<br />
Remove software association Unit 0Ch<br />
01 0B 00 13 0C 04 85 04 01 01 05 03 68<br />
Set software association Unit 0ch<br />
01 0B 00 13 0C 04 85 01 01 01 05 03 6D<br />
Force to optimize Unit 0Ch<br />
01 05 00 48 0C 03 BD <br />
01 04 00 4A 05 B4<br />
<br />
==== RZP15 Vizia Leviton Appliance Module switch 908.42Mhz ====<br />
<br />
supports classes: 25, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82 <br />
manufacturer ID: 00 1D (Leviton) <br />
Type: 101 ID: 206<br />
version: Lib: 2.6 App: 0.3<br />
COMMAND_CLASS_SWITCH_BINARY, 25<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL, 82<br />
<br />
Frame to send ON<br />
01 0A 00 13 UU 03 20 01 63 05 03 CR<br />
<br />
Frame to send OFF<br />
01 0A 00 13 UU 03 20 01 00 05 03 CR<br />
<br />
Request supported classes<br />
01 04 00 41 UU CR <br />
<br />
Supported classes response<br />
01 09 01 41 C9 0C 00 04 10 03 CR<br />
<br />
Request: 01 04 00 41 UU CR<br />
Answer:<br />
<B>C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12</B><br />
01 09 01 41 C9 0C 00 04 11 04 62<br />
<br />
C2= Start<br />
C3= length<br />
C4=<br />
C5=<br />
C6=<br />
C7=<br />
C8=<br />
C9= Basic class (1=controller, 2= static controller, 3=slave, 4=routing slave)<br />
C10= Device type (1=controller, 10=switch, 11=Dimmer, 12=transmitter, 8=Thermostat, 9=shutter,21=?)<br />
C11=<br />
C12= CRC<br />
<br />
<br />
<br />
Where UU is the unit number to switch ON - OFF and CR is the XORING AND checksum for the frame<br />
<br />
==== RZS15 Vizia Leviton Wall switch 908.42Mhz ====<br />
<br />
Supports classes: 25, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82<br />
Manufacturer ID: 0 1D (Leviton) <br />
Type: 301 ID: 206<br />
Version: Lib: 2.6 App: 0.3<br />
COMMAND_CLASS_SWITCH_BINARY, 25 <br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL, 82<br />
<br />
==== RZP03 Vizia Leviton Appliance Module dimmer 908.42Mhz ====<br />
Device supports classes: 26, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82<br />
Manufacturer ID: 00 1D(Leviton) Type: 201 ID: 206<br />
Lib: 2.6 App: 0.3<br />
The difference between a switch and a dimmer is the class <B>26</B> for dimmer and 25 for switch<br />
COMMAND_CLASS_SWITCH_MULTILEVEL, 26<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C <br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72 <br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91 <br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL 82<br />
<br />
<B> Frame to send: to light ON with 9% </B><br />
01 0A 00 13 UU 03 20 01 09 05 03 CR<br />
<br />
<B> Frame to send: to light ON with 95% </B><br />
01 0A 00 13 UU 03 20 01 5F 05 03 CR<br />
<br />
<B> Frame to switch off </B><br />
01 0A 00 13 UU 03 20 01 00 05 03 CR<br />
<br />
Request supported classes unit 02<br />
01 04 00 41 02 B8 <br />
Supported classes response<br />
06 01 09 01 41 C9 0C 00 04 11 04 62<br />
<br />
<B>With UU is equal to the unit ID and CR is the checksum (XORING)</B><br />
<br />
==== VRE06 Vizia Leviton Wallplate VRE06 908.40Mhz ====<br />
<br />
==== Intermatic HA04C Outdoor Lighting Module switch 908.42Mhz ====<br />
Device supports classes: 20, 25, 27, 86, 72<br />
Brand 00 05 type 00 04 ID 00 03<br />
version: Lib: 1.28 App: 2.0<br />
COMMAND_CLASS_BASIC, 20<br />
COMMAND_CLASS_SWITCH_BINARY, 25<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
<br />
==== Electronic Solutions Inc DBMZ DC motor controler ====<br />
Device supports classes: 26, 72, 86, 27, 70, 73<br />
Manufacturer ID: 00 33(Electronic Solutions Inc) Type: 5250 ID: 3032<br />
Lib: 2.24 App: 1.1<br />
The difference between a switch and a dimmer is the class 26 for dimmer and 25 for switch<br />
COMMAND_CLASS_SWITCH_MULTILEVEL, 26<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_CONFIGURATION, 70<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
<br />
==== Removing device 05h from the Z-TROLLER ====<br />
<br />
029178: 14.07.2008 17:48:28.899 +0.0 W 01 04 00 4B 01 B1 Waiting a unit button get pressed<br />
029181: 14.07.2008 17:48:28.914 +0.0 R 06 01 07 00 4B 02 01 00 00 B0<br />
029182: 14.07.2008 17:48:28.914 +0.0 W 06 <br />
029461: 14.07.2008 17:48:33.242 +0.0 R 01 07 00 4B 02 02 00 00 B3 <br />
029464: 14.07.2008 17:48:33.257 +0.0 W 06 <br />
029491: 14.07.2008 17:48:33.648 +0.0 R 01 16 00 4B 02 03 05 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 32 <br />
029494: 14.07.2008 17:48:33.663 +0.0 W 06 <br />
029501: 14.07.2008 17:48:33.741 +0.0 R 01 07 00 4B 02 06 00 00 B7<br />
029504: 14.07.2008 17:48:33.757 +0.0 W 06 <br />
029590: 14.07.2008 17:48:35.069 +0.0 W 01 04 00 4A 05 B4 Confirm unit 5 has been removed<br />
<br />
==== Adding device 12h to the Z-TROLLER (vizia switch) ====<br />
<br />
104436: 14.07.2008 18:07:46.521 +0.0 W 01 04 00 4A 01 B0 ...J.°<br />
104439: 14.07.2008 18:07:46.536 +0.0 R 06 01 07 00 4A 02 01 00 00 B1 ....J....±<br />
104440: 14.07.2008 18:07:46.536 +0.0 W 06 <br />
104589: 14.07.2008 18:07:48.833 +0.0 R 01 .<br />
104591: 14.07.2008 18:07:48.848 +0.0 R 07 00 4A 02 02 00 00 B2 ..J....²<br />
104592: 14.07.2008 18:07:48.848 +0.0 W 06<br />
104601: 14.07.2008 18:07:48.958 +0.0 R 01 .<br />
104603: 14.07.2008 18:07:48.973 +0.0 R 16 00 4A 02 03 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 24 &#134;&#145;wsï&#130;$<br />
104604: 14.07.2008 18:07:48.973 +0.0 W 06 <br />
104647: 14.07.2008 18:07:49.614 +0.0 R 01 07 00 4A 02 06 12 00 A4 ...J....¤<br />
104648: 14.07.2008 18:07:49.614 +0.0 W 06 <br />
104714: 14.07.2008 18:07:50.614 +0.0 W 01 04 00 4A 05 B4 ...J.´<br />
104717: 14.07.2008 18:07:50.629 +0.0 R 06 <br />
104914: 14.07.2008 18:07:53.691 +0.0 W 01 03 00 02 FE <br />
104917: 14.07.2008 18:07:53.707 +0.0 R 06 .<br />
104919: 14.07.2008 18:07:53.722 +0.0 R 01 .<br />
104921: 14.07.2008 18:07:53.738 +0.0 R 25 01 02 04 00 1D 6F BB 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
104923: 14.07.2008 18:07:53.754 +0.0 R 00 00 00 00 00 00 00 00 00 00 02 01 15<br />
104924: 14.07.2008 18:07:53.754 +0.0 W 06 .<br />
104928: 14.07.2008 18:07:53.785 +0.0 W 01 04 00 41 01 BB ...A.»<br />
104931: 14.07.2008 18:07:53.801 +0.0 R 06 01 09 01 41 92 06 00 02 02 00 22 <br />
104932: 14.07.2008 18:07:53.801 +0.0 W 06 .<br />
104936: 14.07.2008 18:07:53.832 +0.0 W 01 04 00 41 02 B8 ...A.¸<br />
104939: 14.07.2008 18:07:53.847 +0.0 R 06 01 09 01 41 C9 0C 00 04 11 04 62 <br />
104940: 14.07.2008 18:07:53.847 +0.0 W 06 .<br />
104944: 14.07.2008 18:07:53.879 +0.0 W 01 04 00 41 03 B9 ...A.¹<br />
104947: 14.07.2008 18:07:53.894 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64<br />
104948: 14.07.2008 18:07:53.894 +0.0 W 06 .<br />
104952: 14.07.2008 18:07:53.926 +0.0 W 01 04 00 41 04 BE ...A.¾<br />
104955: 14.07.2008 18:07:53.941 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64<br />
104956: 14.07.2008 18:07:53.941 +0.0 W 06 .<br />
104960: 14.07.2008 18:07:53.972 +0.0 W 01 04 00 41 06 BC ...A.¼<br />
104963: 14.07.2008 18:07:53.988 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
104964: 14.07.2008 18:07:53.988 +0.0 W 06 .<br />
104968: 14.07.2008 18:07:54.019 +0.0 W 01 04 00 41 07 BD ...A.½<br />
104971: 14.07.2008 18:07:54.035 +0.0 R 06 01 09 01 41 49 0C 00 04 21 01 D7 ....AI...!.×<br />
104972: 14.07.2008 18:07:54.035 +0.0 W 06 .<br />
104976: 14.07.2008 18:07:54.066 +0.0 W 01 04 00 41 09 B3 ...A.³<br />
104979: 14.07.2008 18:07:54.082 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104980: 14.07.2008 18:07:54.082 +0.0 W 06 .<br />
104984: 14.07.2008 18:07:54.113 +0.0 W 01 04 00 41 0A B0 ...A.°<br />
104987: 14.07.2008 18:07:54.129 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104988: 14.07.2008 18:07:54.129 +0.0 w 06 .<br />
104992: 14.07.2008 18:07:54.160 +0.0 W 01 04 00 41 0C B6 ...A.¶<br />
104995: 14.07.2008 18:07:54.176 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104996: 14.07.2008 18:07:54.176 +0.0 W 06 .<br />
105000: 14.07.2008 18:07:54.207 +0.0 W 01 04 00 41 0D B7 ...A.·<br />
105003: 14.07.2008 18:07:54.222 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
105004: 14.07.2008 18:07:54.222 +0.0 W 06 .<br />
105008: 14.07.2008 18:07:54.254 +0.0 W 01 04 00 41 0E B4 ...A.´<br />
105011: 14.07.2008 18:07:54.269 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
105012: 14.07.2008 18:07:54.269 +0.0 W 06 .<br />
105016: 14.07.2008 18:07:54.301 +0.0 W 01 04 00 41 10 AA ...A.ª<br />
105019: 14.07.2008 18:07:54.316 +0.0 R 06 01 09 01 41 49 0C 00 04 21 01 D7 ....AI...!.×<br />
105020: 14.07.2008 18:07:54.316 +0.0 W 06 .<br />
105024: 14.07.2008 18:07:54.347 +0.0 W 01 04 00 41 12 A8 ...A.¨<br />
105027: 14.07.2008 18:07:54.363 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
105028: 14.07.2008 18:07:54.363 +0.0 W 06 .<br />
105032: 14.07.2008 18:07:54.394 +0.0 W 01 07 00 03 01 02 00 00 F8 ........ø<br />
105035: 14.07.2008 18:07:54.410 +0.0 R 06 .<br />
105038: 14.07.2008 18:07:54.441 +0.0 W 01 03 00 20 DC ... Ü<br />
105041: 14.07.2008 18:07:54.457 +0.0 R 06 01 08 01 20 00 3D 0C 9E 01 78 .... .=.&#158;.x<br />
105042: 14.07.2008 18:07:54.457 +0.0 W 06 .<br />
105046: 14.07.2008 18:07:54.488 +0.0 W 01 04 00 60 12 89 ...`.&#137;<br />
105049: 14.07.2008 18:07:54.504 +0.0 R 06 01 04 01 60 01 9B ....`.&#155;<br />
105050: 14.07.2008 18:07:54.504 +0.0 W 06 .<br />
105057: 14.07.2008 18:07:54.582 +0.0 R 01 15 00 49 84 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 A1 &#134;&#145;wsï&#130;¡<br />
105058: 14.07.2008 18:07:54.582 +0.0 W 06 .<br />
105062: 14.07.2008 18:07:54.613 +0.0 W 01 09 00 13 12 02 72 04 05 03 85 ......r...&#133;<br />
105065: 14.07.2008 18:07:54.629 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105066: 14.07.2008 18:07:54.629 +0.0 W 06 .<br />
105071: 14.07.2008 18:07:54.675 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105072: 14.07.2008 18:07:54.675 +0.0 W 06 .<br />
105075: 14.07.2008 18:07:54.691 +0.0 R 01 0E 00 04 00 12 08 72 05 00 1D 01 01 02 06 81 .......r.......<br />
105076: 14.07.2008 18:07:54.691 +0.0 W 06 .<br />
105080: 14.07.2008 18:07:54.722 +0.0 W 01 09 00 13 12 02 86 11 05 03 64 ......&#134;...d<br />
105083: 14.07.2008 18:07:54.738 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105084: 14.07.2008 18:07:54.738 +0.0 W 06 .<br />
105089: 14.07.2008 18:07:54.785 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105090: 14.07.2008 18:07:54.785 +0.0 W 06 .<br />
105093: 14.07.2008 18:07:54.800 +0.0 R 01 0D 00 04 00 12 07 86 12 03 02 06 00 03 73 .......&#134;......s<br />
105094: 14.07.2008 18:07:54.800 +0.0 W 06 .<br />
105098: 14.07.2008 18:07:54.832 +0.0 W 01 09 00 13 12 02 85 05 05 03 73 ......&#133;...s<br />
105101: 14.07.2008 18:07:54.847 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105102: 14.07.2008 18:07:54.847 +0.0 W 06 .<br />
105107: 14.07.2008 18:07:54.894 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105108: 14.07.2008 18:07:54.894 +0.0 W 06 .<br />
105111: 14.07.2008 18:07:54.910 +0.0 R 01 09 00 04 00 12 03 85 06 01 61 .......&#133;..a<br />
105112: 14.07.2008 18:07:54.910 +0.0 W 06 .<br />
105116: 14.07.2008 18:07:54.941 +0.0 W 01 0B 00 13 12 04 85 01 01 01 05 03 73 ......&#133;.....s<br />
105119: 14.07.2008 18:07:54.957 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105120: 14.07.2008 18:07:54.957 +0.0 W 06 .<br />
105125: 14.07.2008 18:07:55.004 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105126: 14.07.2008 18:07:55.004 +0.0 W 06 .<br />
105130: 14.07.2008 18:07:55.035 +0.0 W 01 04 00 47 12 AE ...G.®<br />
105133: 14.07.2008 18:07:55.050 +0.0 R 06 01 04 01 47 01 BC ....G.¼<br />
105134: 14.07.2008 18:07:55.050 +0.0 W 06 .<br />
105147: 14.07.2008 18:07:55.222 +0.0 R 01 .<br />
105149: 14.07.2008 18:07:55.238 +0.0 R 05 00 47 04 00 B9 ..G..¹<br />
105150: 14.07.2008 18:07:55.238 +0.0 W 06 .<br />
105154: 14.07.2008 18:07:55.269 +0.0 W 01 05 00 46 12 01 AF ...F..¯<br />
105157: 14.07.2008 18:07:55.285 +0.0 R 06 01 04 01 46 01 BD ....F.½<br />
105158: 14.07.2008 18:07:55.285 +0.0 W 06 .<br />
105173: 14.07.2008 18:07:55.488 +0.0 R 01 05 00 46 85 00 39 ...F&#133;.9<br />
105174: 14.07.2008 18:07:55.488 +0.0 W 06 .<br />
105178: 14.07.2008 18:07:55.519 +0.0 W 01 09 00 13 12 02 77 05 05 03 81 ......w...<br />
105181: 14.07.2008 18:07:55.535 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105182: 14.07.2008 18:07:55.535 +0.0 W 06 .<br />
105187: 14.07.2008 18:07:55.582 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105188: 14.07.2008 18:07:55.582 +0.0 W 06 .<br />
105191: 14.07.2008 18:07:55.597 +0.0 R 01 08 00 04 00 12 02 77 06 92 .......w.&#146;<br />
105192: 14.07.2008 18:07:55.597 +0.0 W 06 .<br />
105196: 14.07.2008 18:07:55.628 +0.0 W 01 09 00 13 12 02 77 02 05 03 86 ......w...&#134;<br />
105199: 14.07.2008 18:07:55.644 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105200: 14.07.2008 18:07:55.644 +0.0 W 06 .<br />
105205: 14.07.2008 18:07:55.691 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105206: 14.07.2008 18:07:55.691 +0.0 W 06 .<br />
105209: 14.07.2008 18:07:55.707 +0.0 R 01 08 00 04 00 12 02 77 03 97 .......w.&#151;<br />
105210: 14.07.2008 18:07:55.707 +0.0 W 06 .<br />
<br />
Simple steps to add a device<br />
S 01 04 00 4A 01 B0 Request the z-trolle to START adding a device<br />
R 06 01 07 00 4A 02 01 00 00 B1 <br />
S 06<br />
R 01 07 00 4A 02 02 00 00 B2 <br />
S 06 <br />
R 01 16 00 4A 02 03 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 24 The button was pushed <br />
S 06<br />
R 01 07 00 4A 02 06 12 00 A4 The device 12h was added<br />
S 06<br />
S 01 04 00 4A 05 B4 Send the z-troller a adding device completion<br />
------------------- <br />
Simple steps to remove device 10h<br />
S 01 04 00 4B 01 B1 Send to the z-troller a START to remove a device<br />
R 06 01 07 00 4B 03 01 00 00 B1 <br />
S 06<br />
R 01 07 00 4B 03 02 00 00 B2 <br />
S 06<br />
R 01 16 00 4B 03 03 10 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 26 The button on the device was pushed<br />
S 06<br />
R 01 07 00 4B 03 06 00 00 B6 <br />
S 06<br />
S 01 04 00 4A 05 B4 Send the z-troller a END remove device <br />
R 06<br />
<br />
==== Getting neighborhood info for a unit (z-troller) ====<br />
<br />
01 07 00 80 UU 00 01 03 CR<br />
<br />
==== Restart the z-troller ==== <br />
01 03 00 08 F4<br />
<br />
==== Manufacturer Specific ====<br />
* COMMAND_CLASS_MANUFACTURER_SPECIFIC<br />
Show the ESI product data:<br />
MANUFACTURER_SPECIFIC_GET<br />
Example return message:<br />
0x00 0x33 0x52 0x50 0x30 0x32<br />
0x00: maunfacturer id high byte<br />
0x33: manufacturer id low byte, ID: 0x0033<br />
Product type ID "RP"<br />
Product ID "02"<br />
<br />
==== Version ====<br />
* COMMAND_CLASS_VERSION<br />
VERSION_GET<br />
Example return message:<br />
0x04 0x02 0x06 0x01 0x01 0x5a<br />
0x04: Library type 4 for basic slave device<br />
0x02: Protocol version 2<br />
0x06: Protocol sub version 6<br />
0x01: Application version 1<br />
0x01: Application sub version 1<br />
0x5a: ?<br />
<br />
==== All Switch ====<br />
* COMMAND_CLASS_SWITCH_ALL<br />
SWITCH_ALL_GET<br />
SWITCH_ALL_ON<br />
SWITCH_ALL_OFF<br />
==== Configuration ====<br />
* COMMAND_CLASS_CONFIGURATION<br />
Each parameter is a single byte ("0" or "1")<br />
CONFIGURATION_GET<br />
CONFIGURATION_SET<br />
==== Power Level ====<br />
* COMMAND_CLASS_POWERLEVEL<br />
POWERLEVEL_TEST_NODE_SET<br />
POWERLEVEL_TEST_NODE_GET<br />
POWERLEVEL_TEST_NODE_REPORT<br />
Example: POWERLEVEL_SET, 5, 60<br />
set the ZWave node's power level to 5 for the length of 60 seconds<br />
<br />
== Device configuration data ==<br />
= Traces =<br />
Starting the ZWave device:<br />
<pre><br />
40 03/28/08 15:53:34.590 0x1 0x3 0x0 0x15 0xe9 (#####) <0xb698bb90><br />
41 03/28/08 15:53:34.741 0x6 0x1 0x10 0x1 0x15 0x5a 0x2d 0x57 0x61 0x76 0x65 0x20 0x32 0x2e 0x33 0x31 0x0 0x1 0x96 (#####Z-Wave 2.31###) <0xb718cb90><br />
40 03/28/08 15:53:34.792 0x1 0x3 0x0 0x20 0xdc (### #) <0xb698bb90><br />
41 03/28/08 15:53:35.042 0x6 0x1 0x8 0x1 0x20 0x0 0x0 0x55 0x28 0x2 0xa9 (#### ##U(##) <0xb718cb90><br />
40 03/28/08 15:53:35.092 0x1 0x3 0x0 0x2 0xfe (#####) <0xb698bb90><br />
41 03/28/08 15:53:35.342 0x6 0x1 0x25 0x1 0x2 0x4 0x4 0x1d 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0xc4 (##%#) <0xb718cb90><br />
40 03/28/08 15:53:35.393 0x1 0x4 0x0 0x52 0x1 0xa8 (###R##) <0xb698bb90><br />
41 03/28/08 15:53:35.643 0x6 0x1 0x4 0x1 0x52 0x1 0xa9 (####R##) <0xb718cb90><br />
40 03/28/08 15:53:35.694 0x1 0x3 0x0 0x56 0xaa (###V#) <0xb698bb90><br />
41 03/28/08 15:53:35.944 0x6 0x1 0x4 0x1 0x56 0x0 0xac (####V##) <0xb718cb90><br />
40 03/28/08 15:53:35.995 0x1 0x4 0x0 0x41 0x1 0xbb (###A##) <0xb698bb90><br />
41 03/28/08 15:53:36.245 0x6 0x1 0x9 0x1 0x41 0xc9 0x0 0x0 0x3 0x11 0x0 0x6d (####A######m) <0xb718cb90><br />
40 03/28/08 15:53:36.296 0x1 0x4 0x0 0x41 0x2 0xb8 (###A##) <0xb698bb90><br />
41 03/28/08 15:53:36.545 0x6 0x1 0x9 0x1 0x41 0xd2 0x6 0x0 0x2 0x2 0x0 0x62 (####A######b) <0xb718cb90><br />
</pre><br />
Interesting string: <br />
0x1 0x2 0x4 0x4 0x1d 0x3 0x0 0x0 0x0 ...<br />
0x1 means it is a response<br />
0x2 means it is initialization data<br />
0x4 is the version<br />
0x4 is the capabilities<br />
LMCE will look for the next 4 bytes to get the list of devices. It seems to be a bit map. In this case, the first byte is 0x3 or in binary 00000011 so devices ID 1 and 2 are present. It is unclear to me why we only look at 4 bytes (32 zwave devices) while the protocol supports 232<br />
<br />
NOTE: this is a (already fixed) bug in the old version of the closed pluto Z-Wave driver. The actual closed driver and the new open source driver (http://svn.linuxmce.org/svn/trunk/src/ZWave) of course honor all 232 devices (29*8)<br />
<br />
<br />
Switching on a ZDP200 lamp plug from the Orbiter:<br />
<pre><br />
40 03/28/08 15:49:20.707 0x1 0xa 0x0 0x13 0x1 0x3 0x26 0x1 0x63 0x5 0x6 0xa3 (#\n####&#c###) <0xb68f3b90><br />
41 03/28/08 15:49:21.007 0x6 0x1 0x4 0x1 0x13 0x1 0xe8 (#######) <0xb70f4b90><br />
41 03/28/08 15:49:21.307 0x1 0x5 0x0 0x13 0x6 0x0 0xef (#######) <0xb70f4b90><br />
</pre><br />
<br />
Pressing "all units on" on the ZTH200:<br />
<pre><br />
41 03/28/08 15:50:58.553 0x1 0x8 0x0 0x4 0x4 0xef 0x2 0x27 0x4 0x39 (#######'#9) <0xb70f4b90><br />
41 03/28/08 15:50:58.854 0x1 0x8 0x0 0x4 0x0 0xef 0x2 0x27 0x4 0x3d (#######'#=) <0xb70f4b90><br />
</pre><br />
<br />
Pressing "all units off" on the ZTH200:<br />
<pre><br />
41 03/28/08 15:51:43.713 0x1 0x8 0x0 0x4 0x4 0xef 0x2 0x27 0x5 0x38 (#######'#8) <0xb70f4b90><br />
41 03/28/08 15:51:44.014 0x1 0x8 0x0 0x4 0x0 0xef 0x2 0x27 0x5 0x3c (#######'#<) <0xb70f4b90><br />
</pre><br />
<br />
Pressing the local switch on the ZDP200 (toggling from off to on):<br />
<pre><br />
41 03/28/08 15:52:37.284 0x1 0xc 0x0 0x49 0x84 0x1 0x6 0x3 0x11 0x0 0x26 0x27 0x75 0x5f (###I######&'u_) <0xb70f4b90><br />
</pre><br />
== Learn Mode ==<br />
=== Start ===<br />
We send:<br />
<pre><br />
40 04/11/08 18:25:26.852 0x1 0x4 0x0 0x50 0x1 0xaa (###P##) <0xb68d9b90><br />
</pre><br />
response:<br />
<pre><br />
41 04/11/08 18:25:27.052 0x6 (#) <0xb70dab90><br />
41 04/11/08 18:25:29.763 0x1 0x7 0x0 0x50 0x2 0x1 0xef 0x0 0x44 (###P####D) <0xb70dab90><br />
35 04/11/08 18:25:29.763 ZWJobSetLearnMode: len = 6 buf = 0x00 0x50 0x02 0x01 0xef 0x00 <0xb68d9b90><br />
36 04/11/08 18:25:29.763 ZWJobSetLearnMode: start learning <0xb68d9b90><br />
</pre><br />
=== Simple configuration download ===<br />
A ZTH200 with a ZDP Lamp plug (id 2) in group 2 (named "Wohnzimmer" also gives us some group information:<br />
<br />
this seems to be the group membership:<br />
<pre><br />
0x1 0xb 0x0 0x4 0x2 0xef 0x5 0x21 0x31 0x8 0x2 0x2 0x0 (#######!1####)<br />
</pre><br />
<br />
this is the scene information:<br />
<pre><br />
0x1 0x16 0x0 0x4 0x2 0xef 0x10 0x21 0x32 0x9 0x2 0x57 0x4f 0x48 0x4e 0x5a 0x49 0x4d 0x4d 0x45 0x52 0x20 0x20 0x12 (#######!2##WOHNZIMMER #)<br />
</pre><br />
<br />
== Battery Powered devices ==<br />
<br />
unsolicited wake up frame:<br />
<pre><br />
0x1 0x8 0x0 0x4 0x4 0x2 0x2 0x84 0x7 0x74 (#########t)<br />
</pre><br />
<br />
= Pluto Source Code =<br />
The pluto project at one point in time included zwave control classes. The source code for these classes was published for some time at svn.plutohome.com. These classes are no longer published. However, substantial details of framing formats were derivable from that source code. <br />
<br />
Some snippets that explain how to construct some interesting PDUs are the following (all snippets from code that was labelled GPLed at the top. Full interpretation of this code requires access to the z-wave SDK headers, which are labelled proprietary and thus are not included here):<br />
<br />
* JobSwitchChangeLevel<br />
setState(ZWaveJob::RUNNING);<br />
size_t len = 9;<br />
char data[9];<br />
data[0] = REQUEST;<br />
data[1] = FUNC_ID_ZW_SEND_DATA;<br />
data[2] = (char)d->nodeID;<br />
data[3] = DATA_LEN; // 3<br />
data[4] = COMMAND_CLASS_SWITCH_MULTILEVEL;<br />
data[5] = SWITCH_MULTILEVEL_SET;<br />
data[6] = d->level;<br />
data[7] = TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE;<br />
data[8] = 1;<br />
<br />
* JobSwitchBinaryGet<br />
setState(ZWaveJob::RUNNING);<br />
size_t len = 8;<br />
char data[8];<br />
data[0] = REQUEST;<br />
data[1] = FUNC_ID_ZW_SEND_DATA;<br />
data[2] = (char)d->nodeID;<br />
data[3] = DATA_LEN;<br />
data[4] = COMMAND_CLASS_SWITCH_MULTILEVEL;<br />
data[5] = SWITCH_BINARY_GET;<br />
data[6] = TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE;<br />
data[7] = 2;<br />
return handler()->sendData(data, len);<br />
<br />
* JobSetLearnNodeState<br />
char buffer[10];<br />
<br />
buffer[0] = REQUEST;<br />
buffer[1] = FUNC_ID_ZW_SET_LEARN_NODE_STATE;<br />
buffer[2] = mode();<br />
buffer[3] = 1; // Callback FunctionID<br />
buffer[4] = 0;<br />
<br />
setState(ZWaveJob::RUNNING);<br />
<br />
d->failed = false;<br />
<br />
return handler()->sendData(buffer, 3);<br />
<br />
Z-Wave protocol Reset:<br />
<br />
First command: /** */<br />
<br />
01 08 00 03 01 02 01 01 21 D6<br />
<br />
00 = request<br />
03 = FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION<br />
01 = listening /** not moving */<br />
02 = node generic type, GENERIC_TYPE_STATIC_CONTROLLER<br />
01 = node specific type, SPECIFIC_TYPE_PORTABLE_REMOTE_CONTROLLER<br />
01 = param length<br />
21 = COMMAND_CLASS_CONTROLLER_REPLICATION<br />
<br />
// wait for ACK<br />
________________________________________________________________<br />
<br />
Second command: /** Reset to factory default. */<br />
<br />
01 04 00 42 01 B8<br />
<br />
00 = request<br />
42 = FUNC_ID_ZW_SET_DEFAULT<br />
01 = Callback FunctionID<br />
<br />
Answer:<br />
<br />
06<br />
01 04 00 42 01 B8<br />
<br />
06 = ACK<br />
<br />
01 = SOF<br />
04 = Length<br />
00 = Request<br />
42 = FUNC_ID_ZW_SET_DEFAULT<br />
01 = Callback FunctionID<br />
B8 = checksum<br />
<br />
=Framing=<br />
Serial PDUs are framed with a simple framing protocol. Byte value 0x01 is start of frame, or SOF. The second octet is the length in bytes of the frame, excluding the SOF or the length octet. Assume that value was n for this frame. The next n - 1 octets are the framed payload. The last octet is a checksum computed by xoring a 0xff seed with all octets of the payload. The checksum includes the length field, but not the SOF byte or the checksum byte itself.<br />
<br />
Each frame is acknowledged by the remote end with 0x06.<br />
<br />
NOTE: if you look at an ascii table (man ascii) you see the following:<br />
0x01 SOH (start of heading) <br />
0x06 ACK (acknowledge)<br />
0x15 NAK (negative ack.)<br />
0x18 CAN (cancel)<br />
<br />
This information is derived from the pluto source code, along with observation of the serial protocol from existing commercial software.<br />
<br />
<BR><br />
<B>Truth Table XOR A ⊕ B </B> <BR><br />
<B><br />
A &nbsp; B Result </B> <BR><br />
0 &nbsp; 0 <B>0</B> <BR><br />
0 &nbsp; 1 <B>1</B> <BR><br />
1 &nbsp; 0 <B>1</B> <BR><br />
1 &nbsp; 1 <B>0</B> <BR><br />
<BR><br />
<br />
XORING description for the zwave (z-wave) checksum calculation<br />
let s say you have the frame 01 08 00 04 00 0A 02 84 07 <B>78</B> <br />
You will have to take <br />
08 XOR 00 XOR 04 XOR 00 XOR 0A XOR 02 XOR 84 XOR 07= 87 <br />
NOT 87 => 78 So in that case your checksum will be <b>78</B><br />
<br />
<br />
'Checksum code for c/c++<br />
char checksum(char *buf, int len) {<br />
int ret = 0xff;<br />
for (int i=0;i<len;i++) ret ^= buf[i];<br />
return ret;<br />
}<br />
<br />
<br />
<br />
'Checksum (XORING NOT) code for visual basic 2008 express<br />
Public Function checksumZ(ByVal chaine As String) As String<br />
Dim result As Integer<br />
Dim resultS As String<br />
Dim result2 As Integer<br />
Dim result2s As String<br />
resultS = Replace(chaine, " ", "")<br />
chaine = resultS<br />
resultS = Mid(chaine, 3, 2)<br />
result = Val("&H" & resultS)<br />
For i = 5 To (Len(chaine)) Step 2<br />
result2s = (Mid(chaine, i, 2))<br />
result2 = Val("&H" & result2s)<br />
result = result Xor result2<br />
Next<br />
result = Not (result)<br />
resultS = Hex(result)<br />
checksumZ = Mid(resultS, Len(resultS) - 1, 2)<br />
End Function<br />
<br />
=Capturing your own sample transactions=<br />
These notes are for Microsoft Windows. Linux should be easier.<br />
<br />
Get a copy of Device Monitoring Studio. These instructions were written with version 5.11. Use an HA22 device or other serial or usb-to-serial Z-wave dongle. Monitor the serial port for an event. Add the "Request" view in DMS. Do your operations in the software that will interact with the HA22. No click on the "complete" tab in the request view. Right click and choose "export". Save the .htm file that results.<br />
<br />
The resulting HTML is pretty verbose. Some simple regexps can pull out interesting details. That results in transcriptions like the ones you see below.<br />
<br />
Here's a session with an established Homeseer installation starting up:<br />
<br />
<pre><br />
W: 01 03 00 02 fe <br />
R: 06 <br />
R: 01 25 01 02 04 04 1d ff 00 <br />
R: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 38 <br />
</pre><br />
the 29 bytes after 1d (length, thats 29 in decimal) represent a node bitmask (29*8 = 232 devices).<br />
<pre><br />
W: 06 <br />
W: 01 04 00 41 01 bb <br />
</pre><br />
now it's iterating over the nodes and asking for supported classes<br />
<pre><br />
R: 06 01 09 01 41 12 06 00 01 01 01 a3 <br />
W: 06 <br />
W: 01 04 00 41 02 b8 <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 03 b9 <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 04 be <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 05 bf <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 06 bc <br />
R: 06 01 09 01 41 c9 0c 00 04 10 03 64 <br />
W: 06 <br />
W: 01 04 00 41 07 bd <br />
R: 06 01 09 01 41 c9 0c 00 04 10 03 64 <br />
W: 06 <br />
W: 01 04 00 41 08 b2 <br />
R: 06 01 09 01 41 ca 06 00 02 02 00 7a <br />
W: 06 <br />
W: 01 07 00 03 01 02 00 00 f8 <br />
R: 06 <br />
W: 01 03 00 20 dc <br />
R: 06 01 08 01 20 00 98 a2 94 08 70 <br />
</pre><br />
00 98 a2 94 == home id<br />
08 == node id<br />
<pre><br />
W: 06 <br />
W: 01 03 00 07 fb <br />
R: 06 01 20 01 07 02 2d 00 00 00 01 00 01 7f 80 fe 00 8f 00 00 00 7b 9f ff 00 87 00 00 00 00 00 80 00 00 64 <br />
W: 06<br />
</pre> <br />
<br />
Here's the first bits of what HomeZiX did when started:<br />
<br />
<pre><br />
W: 01 03 00 15 e9 <br />
R: 06 01 10 01 15 5a 2d 57 61 76 65 20 32 2e 30 39 00 01 9d <br />
W: 06 <br />
W: 01 05 00 06 0f 0a f9 <br />
R: 06 01 05 01 06 96 0f 64 <br />
W: 06 <br />
W: 01 04 00 17 00 ec <br />
R: 06 01 04 01 17 00 ed <br />
W: 06 <br />
W: 01 03 00 07 fb <br />
R: 06 01 20 01 07 02 2d 00 00 00 01 00 01 7f 80 fe 00 8f 00 00 00 7b 9f ff 00 87 00 00 00 00 00 80 00 00 <br />
R: 64 <br />
W: 06 <br />
W: 01 03 00 20 dc <br />
R: 06 01 08 01 20 00 7a 7a af 02 7b <br />
W: 06 <br />
W: 01 03 00 02 fe <br />
R: 06 <br />
R: 01 25 01 02 04 04 1d 87 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />
R: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 40 <br />
W: 06 <br />
W: 01 03 00 56 aa <br />
R: 06 01 04 01 56 00 ac <br />
W: 06 <br />
W: 01 04 00 41 01 bb <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 04 00 41 02 b8 <br />
R: 06 01 09 01 41 ca 06 00 02 02 01 7b <br />
W: 06 <br />
W: 01 04 00 41 03 b9 <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 04 00 41 08 b2 <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 05 00 21 00 00 db <br />
R: 06 01 04 01 21 42 99 <br />
W: 06 <br />
W: 01 05 00 21 00 01 da <br />
R: 06 01 04 01 21 06 dd <br />
W: 06 <br />
W: 01 06 00 23 00 02 06 de <br />
R: 06 01 09 01 23 21 72 86 82 2b 87 2f <br />
W: 06 <br />
W: 01 08 00 13 ff 01 00 00 01 1b <br />
R: 06 01 04 01 13 01 e8 <br />
W: 06 <br />
R: 01 05 00 13 01 00 e8 <br />
W: 06 <br />
W: 01 05 00 50 ff 01 54 <br />
R: 06 <br />
R: 01 07 00 50 01 01 ef 00 47 <br />
W: 06 <br />
</pre><br />
<br />
= References =<br />
http://www.basshome.com/leviton_z-wave_documentation_1970_ctg.htm (dead link, redirects to home page)<br />
<br />
http://zwaveworld.com/forum/index.php?showtopic=237<br />
<br />
http://www.eilhk.com/en/product/Datasheet/Zensys/SDS10243-2%20-%20Z-Wave%20Protocol%20Overview.pdf<br />
<br />
or<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Protocol%20Overview.pdf<br />
<br />
<br />
http://www.eilhk.com/en/product/Datasheet/Zensys/INS10244-3%20-%20Z-Wave%20Node%20Type%20Overview%20and%20Network%20Installation%20Guide.pdf<br />
<br />
or<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Node%20Type%20Overview%20and%20Network.pdf<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Configuration%20Information.pdf<br />
<br />
<br />
http://www.ddj.com/embedded/193104353<br />
<br />
http://www.elec-solutions.com/docs/motor_controls/abmhz/ABMHZ_v1+1_Advanced_User_Manual.pdf<br />
(since pulled, but still visible as of April 26, 2008 in the Google cache)<br />
<br />
= Tools used =<br />
http://sourceforge.net/projects/slsnif/<br />
<br />
= Links =<br />
<br />
http://www.intouchcontrolsforum.com/forums/showthread.php?t=41&page=2<br />
<br />
http://www.elec-solutions.com/docs/motor_controls/dbmz/DBMZ_v1+1_Advanced_User_Manual.pdf<br />
<br />
http://zwaveworld.com/forum/index.php?showtopic=227&st=20<br />
<br />
http://www.denninger.net/homedaemon.htm<br />
<br />
http://forums.controlthink.com/</div>
Dbarnett
http://wiki.linuxmce.org/index.php?title=ZWave_API&diff=24316
ZWave API
2010-07-08T14:27:36Z
<p>Dbarnett: /* Frame specification */ replace dead forum link w/ link to HomeDaemon home, correct Karl Denninger's name</p>
<hr />
<div>[[Category: Automation| ]]<br />
[[Category: RF Control]]<br />
[[Category: ZWave]]<br />
[[Category: Programmer's Guide]]<br />
[[Category: Documentation]]<br />
{{versioninfo}}<br />
= Introduction =<br />
The ZWave API is not available for free. You have to get the Zensys SDK for command specifications and device class definitions. This page tries to collect all the freely available information about ZWave. The final goal is to provide a header file with all necessary definitions for basic operation with open source software.<br />
<br />
IMPORTANT: all information added to this page _must_ have a reference to the source where it came from.<br />
<br />
= API =<br />
== Frame specification ==<br />
Karl Denninger implemented basic ZWave support in his software "HomeDaemon". He advised that basic frame specification can be derived from his source code (http://www.denninger.net/homedaemon.htm).<br />
<br />
== Basic Classes ==<br />
From the Leviton Z-Wave RS232 ASCII Interface Programming Guide (RZC0P-1LW, 10/9/2007):<br />
Controller 1<br />
Static controller 2<br />
Slave 3<br />
Routing Slave 4<br />
that leads us to some definitions:<br />
#define OZA_BASIC_CLASS_CONTROLLER 0x01<br />
#define OZA_BASIC_CLASS_STATIC_CONTROLLER 0x02<br />
#define OZA_BASIC_CLASS_SLAVE 0x03<br />
#define OZA_BASIC_CLASS_ROUTING_SLAVE 0x04<br />
<br />
== Device Types ==<br />
From the Z-Wave Configuration Information-1.pdf:<br />
CONTROLLER 0x01 (like the ZTH200, Classes: )<br />
SWITCH/APPLIANCE 0x10 (ZRP200, Classes: 25, 27, 75)<br />
DIMMER 0x11 (ZDP200, ZDW230, .., Classes: 26, 27, 75, ...)<br />
TRANSMITTER 0x12<br />
THERMOSTAT 0x08<br />
SHUTTER 0x09<br />
<br />
== Command and Device classes ==<br />
From the Electronic Solutions, Inc. DBMZ Advanced User manual:<br />
<br />
=== Command/Device Classes ===<br />
==== Basic Slave Device ====<br />
==== All ====<br />
==== Multilevel Switch ====<br />
* COMMAND_CLASS_SWITCH_MULTILEVEL<br />
MULTILEVEL_SWITCH_GET<br />
MULTILEVEL_SWITCH_SET<br />
MULTILEVEL_SWITCH_START_LEVEL_CHANGE<br />
MULTILEVEL_SWITCH_STOP_LEVEL_CHANGE<br />
<br />
additional information from http://zwaveworld.com/forum/index.php?showtopic=237:<br />
>?FI003,017,000 //basic class 3 (slave), generic class 0x11 (multlevel switch), specific class 0<br />
<br />
==== All the known classes ====<br />
COMMAND_CLASS_BASIC 0x20 <BR><br />
COMMAND_CLASS_BATTERY 0x80 <BR><br />
COMMAND_CLASS_WAKE_UP 0x84 <BR><br />
COMMAND_CLASS_CONTROLLER_REPLICATION 0x21 <BR><br />
COMMAND_CLASS_SWITCH_MULTILEVEL 0x26 <BR><br />
COMMAND_CLASS_SWITCH_ALL 0x27 <BR><br />
COMMAND_CLASS_SENSOR_BINARY 0x30 <BR><br />
COMMAND_CLASS_ALARM 0x71 <BR><br />
COMMAND_CLASS_MULTI_CMD 0x8F <BR><br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE 0x46 <BR><br />
COMMAND_CLASS_CLOCK 0x81 <BR><br />
COMMAND_CLASS_ASSOCIATION 0x85 <BR><br />
COMMAND_CLASS_CONFIGURATION 0x70 <BR><br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC 0x72 <BR><br />
-<BR><br />
COMMAND_CLASS_SCENE_ACTIVATION 0x2B <BR><br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF 0x2C <BR><br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC 0x72 <BR><br />
COMMAND_CLASS_VERSION 0x86 <BR><br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY 0x91 <BR><br />
COMMAND_CLASS_NODE_NAMING 0x77 <BR><br />
COMMAND_CLASS_POWERLEVEL 0x73 <BR><br />
COMMAND_CLASS_MARK 0xEF <BR><br />
COMMAND_CLASS_HAIL 0x82 <BR><br />
COMMAND_CLASS_MULTI_INSTANCE 0x60 <BR><br />
COMMAND_CLASS_SENSOR_MULTILEVEL 0x31 <BR><br />
COMMAND_CLASS_SWITCH_BINARY 0x25 <BR><br />
<br />
==== Basic ====<br />
* COMMAND_CLASS_BASIC<br />
BASIC_GET<br />
BASIC_SET<br />
<br />
==== Mandatory ====<br />
==== Multilevel Sensor ====<br />
(from the Vizia RF Application Note)<br />
* COMMAND_CLASS_SENSOR_MULTILEVEL<br />
example get:<br />
>N4SE49,4 (RZC0P Syntax)<br />
sensor report:<br />
<N004:049,005,001,009,075<br />
049: device class<br />
005: command report<br />
001: value send is a temperature value<br />
009: value represented with 1 byte in degrees fahrenheit <br />
075: 75° F<br />
==== Setback schedule thermostat ====<br />
from http://www.innovus.dk/fileadmin/user_upload/manual/VD2_standard_01_RA-PLUS.pdf<br />
<br />
Supported:<br />
COMMAND_CLASS_ASSOCIATION<br />
COMMAND_CLASS_BATTERY<br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC<br />
COMMAND_CLASS_MULTI_CMD<br />
COMMAND_CLASS_VERSION<br />
COMMAND_CLASS_WAKE_UP<br />
Controlled:<br />
COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE<br />
COMMAND_CLASS_CLOCK<br />
COMMAND_CLASS_MULTI_CMD<br />
<br />
==== HSM100 (battery, temperature, motion, light) ====<br />
The HSM100 is a motion sensor (probably the best as for now) (2008)<br />
<br />
Device supports classes: 60, 31, 70, 84, 85, 80, 72, 77, 86<br />
Manufacturer ID: 1E (HomeSeer) Type: 02 ID: 01<br />
Lib: 2.31 App: 1.4 Also know with Lib: 2.40 App: 1.6 or App: 1.7<br />
COMMAND_CLASS_MULTI_INSTANCE, 60<br />
COMMAND_CLASS_SENSOR_MULTILEVEL, 31<br />
COMMAND_CLASS_CONFIGURATION, 70<br />
COMMAND_CLASS_WAKE_UP, 84<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_BATTERY, 80<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_VERSION 86<br />
<br />
<br />
<br />
The following frame from personal observations is described below<BR><br />
<br />
0030.354<01 05 00 13 03 00 EA <BR><br />
0030.344<06 01 04 01 13 01 E8 <BR> <br />
0030.244<01 09 00 04 00 0A 03 80 03 <B>64</B> 1C <I>BATTERY 100%</I> <BR><br />
0030.233<01 05 00 13 03 00 EA <BR><br />
0030.223<01 04 01 13 01 E8 <BR><br />
0030.223<06 <BR><br />
0030.193<06 02 31 05 03 <B>01</B> 00 A5 <I>LIGHT 1%</I> <BR> <br />
0030.193<01 0E 00 04 00 0A 08 60 <BR><br />
0030.183<01 05 00 13 03 00 EA <BR><br />
0030.173<01 04 01 13 01 E8 <BR><br />
0030.163<06 <BR><br />
0030.063<06 03 31 05 01 2A 02 D5 5A <I>TEMPERATURE 72.5F</I> <BR> <br />
0030.063<01 0F 00 04 00 0A 09 60 <BR><br />
0029.743<01 05 00 13 03 00 EA <BR><br />
0029.733<01 04 01 13 01 E8 <BR><br />
0029.733<06 <BR><br />
0029.593<01 08 00 04 00 0A 02 84 07 78 <BR><br />
<BR><br />
<BR><br />
<br />
<br />
The HSM100 when awake send a frame and stay awake for about 2.5 seconds to answer to request.<br />
01 08 00 UU 00 03 02 84 07 CR <br />
when this frame is received if we need to get the temperature we have to send<br />
01 0C 00 13 UU 05 60 06 03 31 04 05 03<br />
...and to get the light %<br />
01 0C 00 13 UU 05 60 06 02 31 04 05 03<br />
if there is a change in light level or temperature a frame will be answered by the HSM100 <br />
to indicate the temperature or / and the light level<br />
<br />
Light % level<br />
Let's take the frame<br />
<br />
06 02 31 05 03 01 02 A7<br />
<br />
'VB express 2008 sample code to get the light level in %<br />
If InStr(temp, "06 02 31 05 03") Then<br />
j = InStr(temp, "06 02 31 05 03")<br />
carac = Mid(temp, j + 18, 5)<br />
resultat = carac & "-" & HexToDec(Mid(temp, j + 18, 2)) & "%"<br />
End If<br />
<br />
<br />
<br />
Temperature measure<br />
<br />
06 03 31 05 01 2A 02 E2 6D <br />
<br />
<br />
<br />
<br />
j = InStr(temp, "06 03 31 05 01")<br />
carac = Mid(temp, j + 18, 5)<br />
If carac <> "" Then<br />
temperature1 = HexToDec(Mid(temp, j + 21, 2))<br />
If HexToDec(Mid(temp, j + 18, 2)) = 3 Then<br />
temperature1 = ((temperature1 - 25) / 10) + 79.3<br />
End If<br />
<br />
If HexToDec(Mid(temp, j + 18, 2)) = 2 Then<br />
temperature1 = ((temperature1 - 170) / 10) + 68.2<br />
End If<br />
<br />
If HexToDec(Mid(temp, j + 18, 2)) = 1 Then<br />
temperature1 = ((temperature1 - 170) / 10) + 41.1<br />
End If<br />
' in case °celsius are requested instead of °F<br />
tc = Format((5 / 9) * (temperature1 - 32), "##.#")<br />
temp = temperature1<br />
calculate_temperature = temp<br />
End If<br />
<br />
Motion detection for module with address 7 <BR><br />
<BR><br />
01 09 00 04 00 07 03 20 01 <U>00</U> no move <BR><br />
01 09 00 04 00 07 03 20 01 <U>FF</U> move <BR><br />
<BR><br />
<BR><br />
C O N F I G U R A T I O N HSM100<BR><br />
SET Unit 0Ch to report no move delay after 1 minute<br />
01 0C 00 13 0C 05 70 04 02 01 <U>01</U> 05 03 99 <br />
set unit 0Ch to wake up every 6 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>01</U> 68 01 05 03 05<br />
set unit 0Ch to wake up every 12 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>02</U> D0 01 05 03 BE<br />
set unit 12 to wake up every 18 minutes<br />
01 0D 00 13 0C 06 84 04 00 <U>04</U> 38 01 05 03 50<br />
Set unit 0Ch led off<br />
01 0C 00 13 0C 05 70 04 03 01 <U>00</U> 05 03 99 <br />
Set unit 0Ch led ON<br />
01 0C 00 13 0C 05 70 04 03 01 <U>FF</U> 05 03 66<br />
<br />
Get sofware association for unit 0Ch<br />
Write 01 0A 00 13 0C 03 85 02 01 05 03 69 <br />
Read 01 0C 00 04 00 0C 06 85 03 01 04 00 01 7F // YES associated<br />
OR<br />
Read 01 0B 00 04 00 0C 05 85 03 01 04 00 7A // NOT associated<br />
Remove software association Unit 0Ch<br />
01 0B 00 13 0C 04 85 04 01 01 05 03 68<br />
Set software association Unit 0ch<br />
01 0B 00 13 0C 04 85 01 01 01 05 03 6D<br />
Force to optimize Unit 0Ch<br />
01 05 00 48 0C 03 BD <br />
01 04 00 4A 05 B4<br />
<br />
==== RZP15 Vizia Leviton Appliance Module switch 908.42Mhz ====<br />
<br />
supports classes: 25, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82 <br />
manufacturer ID: 00 1D (Leviton) <br />
Type: 101 ID: 206<br />
version: Lib: 2.6 App: 0.3<br />
COMMAND_CLASS_SWITCH_BINARY, 25<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL, 82<br />
<br />
Frame to send ON<br />
01 0A 00 13 UU 03 20 01 63 05 03 CR<br />
<br />
Frame to send OFF<br />
01 0A 00 13 UU 03 20 01 00 05 03 CR<br />
<br />
Request supported classes<br />
01 04 00 41 UU CR <br />
<br />
Supported classes response<br />
01 09 01 41 C9 0C 00 04 10 03 CR<br />
<br />
Request: 01 04 00 41 UU CR<br />
Answer:<br />
<B>C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12</B><br />
01 09 01 41 C9 0C 00 04 11 04 62<br />
<br />
C2= Start<br />
C3= length<br />
C4=<br />
C5=<br />
C6=<br />
C7=<br />
C8=<br />
C9= Basic class (1=controller, 2= static controller, 3=slave, 4=routing slave)<br />
C10= Device type (1=controller, 10=switch, 11=Dimmer, 12=transmitter, 8=Thermostat, 9=shutter,21=?)<br />
C11=<br />
C12= CRC<br />
<br />
<br />
<br />
Where UU is the unit number to switch ON - OFF and CR is the XORING AND checksum for the frame<br />
<br />
==== RZS15 Vizia Leviton Wall switch 908.42Mhz ====<br />
<br />
Supports classes: 25, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82<br />
Manufacturer ID: 0 1D (Leviton) <br />
Type: 301 ID: 206<br />
Version: Lib: 2.6 App: 0.3<br />
COMMAND_CLASS_SWITCH_BINARY, 25 <br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C<br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91<br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL, 82<br />
<br />
==== RZP03 Vizia Leviton Appliance Module dimmer 908.42Mhz ====<br />
Device supports classes: 26, 27, 2B, 2C, 85, 72, 86, 91, 77, 73, EF, 82<br />
Manufacturer ID: 00 1D(Leviton) Type: 201 ID: 206<br />
Lib: 2.6 App: 0.3<br />
The difference between a switch and a dimmer is the class <B>26</B> for dimmer and 25 for switch<br />
COMMAND_CLASS_SWITCH_MULTILEVEL, 26<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_SCENE_ACTIVATION, 2B<br />
COMMAND_CLASS_SCENE_ACTUATOR_CONF, 2C <br />
COMMAND_CLASS_ASSOCIATION, 85<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72 <br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_PROPRIETARY, 91 <br />
COMMAND_CLASS_NODE_NAMING, 77<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
COMMAND_CLASS_MARK, EF<br />
COMMAND_CLASS_HAIL 82<br />
<br />
<B> Frame to send: to light ON with 9% </B><br />
01 0A 00 13 UU 03 20 01 09 05 03 CR<br />
<br />
<B> Frame to send: to light ON with 95% </B><br />
01 0A 00 13 UU 03 20 01 5F 05 03 CR<br />
<br />
<B> Frame to switch off </B><br />
01 0A 00 13 UU 03 20 01 00 05 03 CR<br />
<br />
Request supported classes unit 02<br />
01 04 00 41 02 B8 <br />
Supported classes response<br />
06 01 09 01 41 C9 0C 00 04 11 04 62<br />
<br />
<B>With UU is equal to the unit ID and CR is the checksum (XORING)</B><br />
<br />
==== VRE06 Vizia Leviton Wallplate VRE06 908.40Mhz ====<br />
<br />
==== Intermatic HA04C Outdoor Lighting Module switch 908.42Mhz ====<br />
Device supports classes: 20, 25, 27, 86, 72<br />
Brand 00 05 type 00 04 ID 00 03<br />
version: Lib: 1.28 App: 2.0<br />
COMMAND_CLASS_BASIC, 20<br />
COMMAND_CLASS_SWITCH_BINARY, 25<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
<br />
==== Electronic Solutions Inc DBMZ DC motor controler ====<br />
Device supports classes: 26, 72, 86, 27, 70, 73<br />
Manufacturer ID: 00 33(Electronic Solutions Inc) Type: 5250 ID: 3032<br />
Lib: 2.24 App: 1.1<br />
The difference between a switch and a dimmer is the class 26 for dimmer and 25 for switch<br />
COMMAND_CLASS_SWITCH_MULTILEVEL, 26<br />
COMMAND_CLASS_MANUFACTURER_SPECIFIC, 72<br />
COMMAND_CLASS_VERSION, 86<br />
COMMAND_CLASS_SWITCH_ALL, 27<br />
COMMAND_CLASS_CONFIGURATION, 70<br />
COMMAND_CLASS_POWERLEVEL, 73<br />
<br />
==== Removing device 05h from the Z-TROLLER ====<br />
<br />
029178: 14.07.2008 17:48:28.899 +0.0 W 01 04 00 4B 01 B1 Waiting a unit button get pressed<br />
029181: 14.07.2008 17:48:28.914 +0.0 R 06 01 07 00 4B 02 01 00 00 B0<br />
029182: 14.07.2008 17:48:28.914 +0.0 W 06 <br />
029461: 14.07.2008 17:48:33.242 +0.0 R 01 07 00 4B 02 02 00 00 B3 <br />
029464: 14.07.2008 17:48:33.257 +0.0 W 06 <br />
029491: 14.07.2008 17:48:33.648 +0.0 R 01 16 00 4B 02 03 05 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 32 <br />
029494: 14.07.2008 17:48:33.663 +0.0 W 06 <br />
029501: 14.07.2008 17:48:33.741 +0.0 R 01 07 00 4B 02 06 00 00 B7<br />
029504: 14.07.2008 17:48:33.757 +0.0 W 06 <br />
029590: 14.07.2008 17:48:35.069 +0.0 W 01 04 00 4A 05 B4 Confirm unit 5 has been removed<br />
<br />
==== Adding device 12h to the Z-TROLLER (vizia switch) ====<br />
<br />
104436: 14.07.2008 18:07:46.521 +0.0 W 01 04 00 4A 01 B0 ...J.°<br />
104439: 14.07.2008 18:07:46.536 +0.0 R 06 01 07 00 4A 02 01 00 00 B1 ....J....±<br />
104440: 14.07.2008 18:07:46.536 +0.0 W 06 <br />
104589: 14.07.2008 18:07:48.833 +0.0 R 01 .<br />
104591: 14.07.2008 18:07:48.848 +0.0 R 07 00 4A 02 02 00 00 B2 ..J....²<br />
104592: 14.07.2008 18:07:48.848 +0.0 W 06<br />
104601: 14.07.2008 18:07:48.958 +0.0 R 01 .<br />
104603: 14.07.2008 18:07:48.973 +0.0 R 16 00 4A 02 03 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 24 &#134;&#145;wsï&#130;$<br />
104604: 14.07.2008 18:07:48.973 +0.0 W 06 <br />
104647: 14.07.2008 18:07:49.614 +0.0 R 01 07 00 4A 02 06 12 00 A4 ...J....¤<br />
104648: 14.07.2008 18:07:49.614 +0.0 W 06 <br />
104714: 14.07.2008 18:07:50.614 +0.0 W 01 04 00 4A 05 B4 ...J.´<br />
104717: 14.07.2008 18:07:50.629 +0.0 R 06 <br />
104914: 14.07.2008 18:07:53.691 +0.0 W 01 03 00 02 FE <br />
104917: 14.07.2008 18:07:53.707 +0.0 R 06 .<br />
104919: 14.07.2008 18:07:53.722 +0.0 R 01 .<br />
104921: 14.07.2008 18:07:53.738 +0.0 R 25 01 02 04 00 1D 6F BB 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
104923: 14.07.2008 18:07:53.754 +0.0 R 00 00 00 00 00 00 00 00 00 00 02 01 15<br />
104924: 14.07.2008 18:07:53.754 +0.0 W 06 .<br />
104928: 14.07.2008 18:07:53.785 +0.0 W 01 04 00 41 01 BB ...A.»<br />
104931: 14.07.2008 18:07:53.801 +0.0 R 06 01 09 01 41 92 06 00 02 02 00 22 <br />
104932: 14.07.2008 18:07:53.801 +0.0 W 06 .<br />
104936: 14.07.2008 18:07:53.832 +0.0 W 01 04 00 41 02 B8 ...A.¸<br />
104939: 14.07.2008 18:07:53.847 +0.0 R 06 01 09 01 41 C9 0C 00 04 11 04 62 <br />
104940: 14.07.2008 18:07:53.847 +0.0 W 06 .<br />
104944: 14.07.2008 18:07:53.879 +0.0 W 01 04 00 41 03 B9 ...A.¹<br />
104947: 14.07.2008 18:07:53.894 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64<br />
104948: 14.07.2008 18:07:53.894 +0.0 W 06 .<br />
104952: 14.07.2008 18:07:53.926 +0.0 W 01 04 00 41 04 BE ...A.¾<br />
104955: 14.07.2008 18:07:53.941 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64<br />
104956: 14.07.2008 18:07:53.941 +0.0 W 06 .<br />
104960: 14.07.2008 18:07:53.972 +0.0 W 01 04 00 41 06 BC ...A.¼<br />
104963: 14.07.2008 18:07:53.988 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
104964: 14.07.2008 18:07:53.988 +0.0 W 06 .<br />
104968: 14.07.2008 18:07:54.019 +0.0 W 01 04 00 41 07 BD ...A.½<br />
104971: 14.07.2008 18:07:54.035 +0.0 R 06 01 09 01 41 49 0C 00 04 21 01 D7 ....AI...!.×<br />
104972: 14.07.2008 18:07:54.035 +0.0 W 06 .<br />
104976: 14.07.2008 18:07:54.066 +0.0 W 01 04 00 41 09 B3 ...A.³<br />
104979: 14.07.2008 18:07:54.082 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104980: 14.07.2008 18:07:54.082 +0.0 W 06 .<br />
104984: 14.07.2008 18:07:54.113 +0.0 W 01 04 00 41 0A B0 ...A.°<br />
104987: 14.07.2008 18:07:54.129 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104988: 14.07.2008 18:07:54.129 +0.0 w 06 .<br />
104992: 14.07.2008 18:07:54.160 +0.0 W 01 04 00 41 0C B6 ...A.¶<br />
104995: 14.07.2008 18:07:54.176 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
104996: 14.07.2008 18:07:54.176 +0.0 W 06 .<br />
105000: 14.07.2008 18:07:54.207 +0.0 W 01 04 00 41 0D B7 ...A.·<br />
105003: 14.07.2008 18:07:54.222 +0.0 R 06 01 09 01 41 51 0C 00 04 21 01 CF ....AQ...!.Ï<br />
105004: 14.07.2008 18:07:54.222 +0.0 W 06 .<br />
105008: 14.07.2008 18:07:54.254 +0.0 W 01 04 00 41 0E B4 ...A.´<br />
105011: 14.07.2008 18:07:54.269 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
105012: 14.07.2008 18:07:54.269 +0.0 W 06 .<br />
105016: 14.07.2008 18:07:54.301 +0.0 W 01 04 00 41 10 AA ...A.ª<br />
105019: 14.07.2008 18:07:54.316 +0.0 R 06 01 09 01 41 49 0C 00 04 21 01 D7 ....AI...!.×<br />
105020: 14.07.2008 18:07:54.316 +0.0 W 06 .<br />
105024: 14.07.2008 18:07:54.347 +0.0 W 01 04 00 41 12 A8 ...A.¨<br />
105027: 14.07.2008 18:07:54.363 +0.0 R 06 01 09 01 41 C9 0C 00 04 10 03 64 ....AÉ.....d<br />
105028: 14.07.2008 18:07:54.363 +0.0 W 06 .<br />
105032: 14.07.2008 18:07:54.394 +0.0 W 01 07 00 03 01 02 00 00 F8 ........ø<br />
105035: 14.07.2008 18:07:54.410 +0.0 R 06 .<br />
105038: 14.07.2008 18:07:54.441 +0.0 W 01 03 00 20 DC ... Ü<br />
105041: 14.07.2008 18:07:54.457 +0.0 R 06 01 08 01 20 00 3D 0C 9E 01 78 .... .=.&#158;.x<br />
105042: 14.07.2008 18:07:54.457 +0.0 W 06 .<br />
105046: 14.07.2008 18:07:54.488 +0.0 W 01 04 00 60 12 89 ...`.&#137;<br />
105049: 14.07.2008 18:07:54.504 +0.0 R 06 01 04 01 60 01 9B ....`.&#155;<br />
105050: 14.07.2008 18:07:54.504 +0.0 W 06 .<br />
105057: 14.07.2008 18:07:54.582 +0.0 R 01 15 00 49 84 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 A1 &#134;&#145;wsï&#130;¡<br />
105058: 14.07.2008 18:07:54.582 +0.0 W 06 .<br />
105062: 14.07.2008 18:07:54.613 +0.0 W 01 09 00 13 12 02 72 04 05 03 85 ......r...&#133;<br />
105065: 14.07.2008 18:07:54.629 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105066: 14.07.2008 18:07:54.629 +0.0 W 06 .<br />
105071: 14.07.2008 18:07:54.675 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105072: 14.07.2008 18:07:54.675 +0.0 W 06 .<br />
105075: 14.07.2008 18:07:54.691 +0.0 R 01 0E 00 04 00 12 08 72 05 00 1D 01 01 02 06 81 .......r.......<br />
105076: 14.07.2008 18:07:54.691 +0.0 W 06 .<br />
105080: 14.07.2008 18:07:54.722 +0.0 W 01 09 00 13 12 02 86 11 05 03 64 ......&#134;...d<br />
105083: 14.07.2008 18:07:54.738 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105084: 14.07.2008 18:07:54.738 +0.0 W 06 .<br />
105089: 14.07.2008 18:07:54.785 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105090: 14.07.2008 18:07:54.785 +0.0 W 06 .<br />
105093: 14.07.2008 18:07:54.800 +0.0 R 01 0D 00 04 00 12 07 86 12 03 02 06 00 03 73 .......&#134;......s<br />
105094: 14.07.2008 18:07:54.800 +0.0 W 06 .<br />
105098: 14.07.2008 18:07:54.832 +0.0 W 01 09 00 13 12 02 85 05 05 03 73 ......&#133;...s<br />
105101: 14.07.2008 18:07:54.847 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105102: 14.07.2008 18:07:54.847 +0.0 W 06 .<br />
105107: 14.07.2008 18:07:54.894 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105108: 14.07.2008 18:07:54.894 +0.0 W 06 .<br />
105111: 14.07.2008 18:07:54.910 +0.0 R 01 09 00 04 00 12 03 85 06 01 61 .......&#133;..a<br />
105112: 14.07.2008 18:07:54.910 +0.0 W 06 .<br />
105116: 14.07.2008 18:07:54.941 +0.0 W 01 0B 00 13 12 04 85 01 01 01 05 03 73 ......&#133;.....s<br />
105119: 14.07.2008 18:07:54.957 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105120: 14.07.2008 18:07:54.957 +0.0 W 06 .<br />
105125: 14.07.2008 18:07:55.004 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105126: 14.07.2008 18:07:55.004 +0.0 W 06 .<br />
105130: 14.07.2008 18:07:55.035 +0.0 W 01 04 00 47 12 AE ...G.®<br />
105133: 14.07.2008 18:07:55.050 +0.0 R 06 01 04 01 47 01 BC ....G.¼<br />
105134: 14.07.2008 18:07:55.050 +0.0 W 06 .<br />
105147: 14.07.2008 18:07:55.222 +0.0 R 01 .<br />
105149: 14.07.2008 18:07:55.238 +0.0 R 05 00 47 04 00 B9 ..G..¹<br />
105150: 14.07.2008 18:07:55.238 +0.0 W 06 .<br />
105154: 14.07.2008 18:07:55.269 +0.0 W 01 05 00 46 12 01 AF ...F..¯<br />
105157: 14.07.2008 18:07:55.285 +0.0 R 06 01 04 01 46 01 BD ....F.½<br />
105158: 14.07.2008 18:07:55.285 +0.0 W 06 .<br />
105173: 14.07.2008 18:07:55.488 +0.0 R 01 05 00 46 85 00 39 ...F&#133;.9<br />
105174: 14.07.2008 18:07:55.488 +0.0 W 06 .<br />
105178: 14.07.2008 18:07:55.519 +0.0 W 01 09 00 13 12 02 77 05 05 03 81 ......w...<br />
105181: 14.07.2008 18:07:55.535 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105182: 14.07.2008 18:07:55.535 +0.0 W 06 .<br />
105187: 14.07.2008 18:07:55.582 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105188: 14.07.2008 18:07:55.582 +0.0 W 06 .<br />
105191: 14.07.2008 18:07:55.597 +0.0 R 01 08 00 04 00 12 02 77 06 92 .......w.&#146;<br />
105192: 14.07.2008 18:07:55.597 +0.0 W 06 .<br />
105196: 14.07.2008 18:07:55.628 +0.0 W 01 09 00 13 12 02 77 02 05 03 86 ......w...&#134;<br />
105199: 14.07.2008 18:07:55.644 +0.0 R 06 01 04 01 13 01 E8 ......è<br />
105200: 14.07.2008 18:07:55.644 +0.0 W 06 .<br />
105205: 14.07.2008 18:07:55.691 +0.0 R 01 05 00 13 03 00 EA ......ê<br />
105206: 14.07.2008 18:07:55.691 +0.0 W 06 .<br />
105209: 14.07.2008 18:07:55.707 +0.0 R 01 08 00 04 00 12 02 77 03 97 .......w.&#151;<br />
105210: 14.07.2008 18:07:55.707 +0.0 W 06 .<br />
<br />
Simple steps to add a device<br />
S 01 04 00 4A 01 B0 Request the z-trolle to START adding a device<br />
R 06 01 07 00 4A 02 01 00 00 B1 <br />
S 06<br />
R 01 07 00 4A 02 02 00 00 B2 <br />
S 06 <br />
R 01 16 00 4A 02 03 12 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 24 The button was pushed <br />
S 06<br />
R 01 07 00 4A 02 06 12 00 A4 The device 12h was added<br />
S 06<br />
S 01 04 00 4A 05 B4 Send the z-troller a adding device completion<br />
------------------- <br />
Simple steps to remove device 10h<br />
S 01 04 00 4B 01 B1 Send to the z-troller a START to remove a device<br />
R 06 01 07 00 4B 03 01 00 00 B1 <br />
S 06<br />
R 01 07 00 4B 03 02 00 00 B2 <br />
S 06<br />
R 01 16 00 4B 03 03 10 0F 04 10 03 25 27 2B 2C 85 72 86 91 77 73 EF 82 26 The button on the device was pushed<br />
S 06<br />
R 01 07 00 4B 03 06 00 00 B6 <br />
S 06<br />
S 01 04 00 4A 05 B4 Send the z-troller a END remove device <br />
R 06<br />
<br />
==== Getting neighborhood info for a unit (z-troller) ====<br />
<br />
01 07 00 80 UU 00 01 03 CR<br />
<br />
==== Restart the z-troller ==== <br />
01 03 00 08 F4<br />
<br />
==== Manufacturer Specific ====<br />
* COMMAND_CLASS_MANUFACTURER_SPECIFIC<br />
Show the ESI product data:<br />
MANUFACTURER_SPECIFIC_GET<br />
Example return message:<br />
0x00 0x33 0x52 0x50 0x30 0x32<br />
0x00: maunfacturer id high byte<br />
0x33: manufacturer id low byte, ID: 0x0033<br />
Product type ID "RP"<br />
Product ID "02"<br />
<br />
==== Version ====<br />
* COMMAND_CLASS_VERSION<br />
VERSION_GET<br />
Example return message:<br />
0x04 0x02 0x06 0x01 0x01 0x5a<br />
0x04: Library type 4 for basic slave device<br />
0x02: Protocol version 2<br />
0x06: Protocol sub version 6<br />
0x01: Application version 1<br />
0x01: Application sub version 1<br />
0x5a: ?<br />
<br />
==== All Switch ====<br />
* COMMAND_CLASS_SWITCH_ALL<br />
SWITCH_ALL_GET<br />
SWITCH_ALL_ON<br />
SWITCH_ALL_OFF<br />
==== Configuration ====<br />
* COMMAND_CLASS_CONFIGURATION<br />
Each parameter is a single byte ("0" or "1")<br />
CONFIGURATION_GET<br />
CONFIGURATION_SET<br />
==== Power Level ====<br />
* COMMAND_CLASS_POWERLEVEL<br />
POWERLEVEL_TEST_NODE_SET<br />
POWERLEVEL_TEST_NODE_GET<br />
POWERLEVEL_TEST_NODE_REPORT<br />
Example: POWERLEVEL_SET, 5, 60<br />
set the ZWave node's power level to 5 for the length of 60 seconds<br />
<br />
== Device configuration data ==<br />
= Traces =<br />
Starting the ZWave device:<br />
<pre><br />
40 03/28/08 15:53:34.590 0x1 0x3 0x0 0x15 0xe9 (#####) <0xb698bb90><br />
41 03/28/08 15:53:34.741 0x6 0x1 0x10 0x1 0x15 0x5a 0x2d 0x57 0x61 0x76 0x65 0x20 0x32 0x2e 0x33 0x31 0x0 0x1 0x96 (#####Z-Wave 2.31###) <0xb718cb90><br />
40 03/28/08 15:53:34.792 0x1 0x3 0x0 0x20 0xdc (### #) <0xb698bb90><br />
41 03/28/08 15:53:35.042 0x6 0x1 0x8 0x1 0x20 0x0 0x0 0x55 0x28 0x2 0xa9 (#### ##U(##) <0xb718cb90><br />
40 03/28/08 15:53:35.092 0x1 0x3 0x0 0x2 0xfe (#####) <0xb698bb90><br />
41 03/28/08 15:53:35.342 0x6 0x1 0x25 0x1 0x2 0x4 0x4 0x1d 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0xc4 (##%#) <0xb718cb90><br />
40 03/28/08 15:53:35.393 0x1 0x4 0x0 0x52 0x1 0xa8 (###R##) <0xb698bb90><br />
41 03/28/08 15:53:35.643 0x6 0x1 0x4 0x1 0x52 0x1 0xa9 (####R##) <0xb718cb90><br />
40 03/28/08 15:53:35.694 0x1 0x3 0x0 0x56 0xaa (###V#) <0xb698bb90><br />
41 03/28/08 15:53:35.944 0x6 0x1 0x4 0x1 0x56 0x0 0xac (####V##) <0xb718cb90><br />
40 03/28/08 15:53:35.995 0x1 0x4 0x0 0x41 0x1 0xbb (###A##) <0xb698bb90><br />
41 03/28/08 15:53:36.245 0x6 0x1 0x9 0x1 0x41 0xc9 0x0 0x0 0x3 0x11 0x0 0x6d (####A######m) <0xb718cb90><br />
40 03/28/08 15:53:36.296 0x1 0x4 0x0 0x41 0x2 0xb8 (###A##) <0xb698bb90><br />
41 03/28/08 15:53:36.545 0x6 0x1 0x9 0x1 0x41 0xd2 0x6 0x0 0x2 0x2 0x0 0x62 (####A######b) <0xb718cb90><br />
</pre><br />
Interesting string: <br />
0x1 0x2 0x4 0x4 0x1d 0x3 0x0 0x0 0x0 ...<br />
0x1 means it is a response<br />
0x2 means it is initialization data<br />
0x4 is the version<br />
0x4 is the capabilities<br />
LMCE will look for the next 4 bytes to get the list of devices. It seems to be a bit map. In this case, the first byte is 0x3 or in binary 00000011 so devices ID 1 and 2 are present. It is unclear to me why we only look at 4 bytes (32 zwave devices) while the protocol supports 232<br />
<br />
NOTE: this is a (already fixed) bug in the old version of the closed pluto Z-Wave driver. The actual closed driver and the new open source driver (http://svn.linuxmce.org/svn/trunk/src/ZWave) of course honor all 232 devices (29*8)<br />
<br />
<br />
Switching on a ZDP200 lamp plug from the Orbiter:<br />
<pre><br />
40 03/28/08 15:49:20.707 0x1 0xa 0x0 0x13 0x1 0x3 0x26 0x1 0x63 0x5 0x6 0xa3 (#\n####&#c###) <0xb68f3b90><br />
41 03/28/08 15:49:21.007 0x6 0x1 0x4 0x1 0x13 0x1 0xe8 (#######) <0xb70f4b90><br />
41 03/28/08 15:49:21.307 0x1 0x5 0x0 0x13 0x6 0x0 0xef (#######) <0xb70f4b90><br />
</pre><br />
<br />
Pressing "all units on" on the ZTH200:<br />
<pre><br />
41 03/28/08 15:50:58.553 0x1 0x8 0x0 0x4 0x4 0xef 0x2 0x27 0x4 0x39 (#######'#9) <0xb70f4b90><br />
41 03/28/08 15:50:58.854 0x1 0x8 0x0 0x4 0x0 0xef 0x2 0x27 0x4 0x3d (#######'#=) <0xb70f4b90><br />
</pre><br />
<br />
Pressing "all units off" on the ZTH200:<br />
<pre><br />
41 03/28/08 15:51:43.713 0x1 0x8 0x0 0x4 0x4 0xef 0x2 0x27 0x5 0x38 (#######'#8) <0xb70f4b90><br />
41 03/28/08 15:51:44.014 0x1 0x8 0x0 0x4 0x0 0xef 0x2 0x27 0x5 0x3c (#######'#<) <0xb70f4b90><br />
</pre><br />
<br />
Pressing the local switch on the ZDP200 (toggling from off to on):<br />
<pre><br />
41 03/28/08 15:52:37.284 0x1 0xc 0x0 0x49 0x84 0x1 0x6 0x3 0x11 0x0 0x26 0x27 0x75 0x5f (###I######&'u_) <0xb70f4b90><br />
</pre><br />
== Learn Mode ==<br />
=== Start ===<br />
We send:<br />
<pre><br />
40 04/11/08 18:25:26.852 0x1 0x4 0x0 0x50 0x1 0xaa (###P##) <0xb68d9b90><br />
</pre><br />
response:<br />
<pre><br />
41 04/11/08 18:25:27.052 0x6 (#) <0xb70dab90><br />
41 04/11/08 18:25:29.763 0x1 0x7 0x0 0x50 0x2 0x1 0xef 0x0 0x44 (###P####D) <0xb70dab90><br />
35 04/11/08 18:25:29.763 ZWJobSetLearnMode: len = 6 buf = 0x00 0x50 0x02 0x01 0xef 0x00 <0xb68d9b90><br />
36 04/11/08 18:25:29.763 ZWJobSetLearnMode: start learning <0xb68d9b90><br />
</pre><br />
=== Simple configuration download ===<br />
A ZTH200 with a ZDP Lamp plug (id 2) in group 2 (named "Wohnzimmer" also gives us some group information:<br />
<br />
this seems to be the group membership:<br />
<pre><br />
0x1 0xb 0x0 0x4 0x2 0xef 0x5 0x21 0x31 0x8 0x2 0x2 0x0 (#######!1####)<br />
</pre><br />
<br />
this is the scene information:<br />
<pre><br />
0x1 0x16 0x0 0x4 0x2 0xef 0x10 0x21 0x32 0x9 0x2 0x57 0x4f 0x48 0x4e 0x5a 0x49 0x4d 0x4d 0x45 0x52 0x20 0x20 0x12 (#######!2##WOHNZIMMER #)<br />
</pre><br />
<br />
== Battery Powered devices ==<br />
<br />
unsolicited wake up frame:<br />
<pre><br />
0x1 0x8 0x0 0x4 0x4 0x2 0x2 0x84 0x7 0x74 (#########t)<br />
</pre><br />
<br />
= Pluto Source Code =<br />
The pluto project at one point in time included zwave control classes. The source code for these classes was published for some time at svn.plutohome.com. These classes are no longer published. However, substantial details of framing formats were derivable from that source code. <br />
<br />
Some snippets that explain how to construct some interesting PDUs are the following (all snippets from code that was labelled GPLed at the top. Full interpretation of this code requires access to the z-wave SDK headers, which are labelled proprietary and thus are not included here):<br />
<br />
* JobSwitchChangeLevel<br />
setState(ZWaveJob::RUNNING);<br />
size_t len = 9;<br />
char data[9];<br />
data[0] = REQUEST;<br />
data[1] = FUNC_ID_ZW_SEND_DATA;<br />
data[2] = (char)d->nodeID;<br />
data[3] = DATA_LEN; // 3<br />
data[4] = COMMAND_CLASS_SWITCH_MULTILEVEL;<br />
data[5] = SWITCH_MULTILEVEL_SET;<br />
data[6] = d->level;<br />
data[7] = TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE;<br />
data[8] = 1;<br />
<br />
* JobSwitchBinaryGet<br />
setState(ZWaveJob::RUNNING);<br />
size_t len = 8;<br />
char data[8];<br />
data[0] = REQUEST;<br />
data[1] = FUNC_ID_ZW_SEND_DATA;<br />
data[2] = (char)d->nodeID;<br />
data[3] = DATA_LEN;<br />
data[4] = COMMAND_CLASS_SWITCH_MULTILEVEL;<br />
data[5] = SWITCH_BINARY_GET;<br />
data[6] = TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE;<br />
data[7] = 2;<br />
return handler()->sendData(data, len);<br />
<br />
* JobSetLearnNodeState<br />
char buffer[10];<br />
<br />
buffer[0] = REQUEST;<br />
buffer[1] = FUNC_ID_ZW_SET_LEARN_NODE_STATE;<br />
buffer[2] = mode();<br />
buffer[3] = 1; // Callback FunctionID<br />
buffer[4] = 0;<br />
<br />
setState(ZWaveJob::RUNNING);<br />
<br />
d->failed = false;<br />
<br />
return handler()->sendData(buffer, 3);<br />
<br />
Z-Wave protocol Reset:<br />
<br />
First command: /** */<br />
<br />
01 08 00 03 01 02 01 01 21 D6<br />
<br />
00 = request<br />
03 = FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION<br />
01 = listening /** not moving */<br />
02 = node generic type, GENERIC_TYPE_STATIC_CONTROLLER<br />
01 = node specific type, SPECIFIC_TYPE_PORTABLE_REMOTE_CONTROLLER<br />
01 = param length<br />
21 = COMMAND_CLASS_CONTROLLER_REPLICATION<br />
<br />
// wait for ACK<br />
________________________________________________________________<br />
<br />
Second command: /** Reset to factory default. */<br />
<br />
01 04 00 42 01 B8<br />
<br />
00 = request<br />
42 = FUNC_ID_ZW_SET_DEFAULT<br />
01 = Callback FunctionID<br />
<br />
Answer:<br />
<br />
06<br />
01 04 00 42 01 B8<br />
<br />
06 = ACK<br />
<br />
01 = SOF<br />
04 = Length<br />
00 = Request<br />
42 = FUNC_ID_ZW_SET_DEFAULT<br />
01 = Callback FunctionID<br />
B8 = checksum<br />
<br />
=Framing=<br />
Serial PDUs are framed with a simple framing protocol. Byte value 0x01 is start of frame, or SOF. The second octet is the length in bytes of the frame, excluding the SOF or the length octet. Assume that value was n for this frame. The next n - 1 octets are the framed payload. The last octet is a checksum computed by xoring a 0xff seed with all octets of the payload. The checksum includes the length field, but not the SOF byte or the checksum byte itself.<br />
<br />
Each frame is acknowledged by the remote end with 0x06.<br />
<br />
NOTE: if you look at an ascii table (man ascii) you see the following:<br />
0x01 SOH (start of heading) <br />
0x06 ACK (acknowledge)<br />
0x15 NAK (negative ack.)<br />
0x18 CAN (cancel)<br />
<br />
This information is derived from the pluto source code, along with observation of the serial protocol from existing commercial software.<br />
<br />
<BR><br />
<B>Truth Table XOR A ⊕ B </B> <BR><br />
<B><br />
A &nbsp; B Result </B> <BR><br />
0 &nbsp; 0 <B>0</B> <BR><br />
0 &nbsp; 1 <B>1</B> <BR><br />
1 &nbsp; 0 <B>1</B> <BR><br />
1 &nbsp; 1 <B>0</B> <BR><br />
<BR><br />
<br />
XORING description for the zwave (z-wave) checksum calculation<br />
let s say you have the frame 01 08 00 04 00 0A 02 84 07 <B>78</B> <br />
You will have to take <br />
08 XOR 00 XOR 04 XOR 00 XOR 0A XOR 02 XOR 84 XOR 07= 87 <br />
NOT 87 => 78 So in that case your checksum will be <b>78</B><br />
<br />
<br />
'Checksum code for c/c++<br />
char checksum(char *buf, int len) {<br />
int ret = 0xff;<br />
for (int i=0;i<len;i++) ret ^= buf[i];<br />
return ret;<br />
}<br />
<br />
<br />
<br />
'Checksum (XORING NOT) code for visual basic 2008 express<br />
Public Function checksumZ(ByVal chaine As String) As String<br />
Dim result As Integer<br />
Dim resultS As String<br />
Dim result2 As Integer<br />
Dim result2s As String<br />
resultS = Replace(chaine, " ", "")<br />
chaine = resultS<br />
resultS = Mid(chaine, 3, 2)<br />
result = Val("&H" & resultS)<br />
For i = 5 To (Len(chaine)) Step 2<br />
result2s = (Mid(chaine, i, 2))<br />
result2 = Val("&H" & result2s)<br />
result = result Xor result2<br />
Next<br />
result = Not (result)<br />
resultS = Hex(result)<br />
checksumZ = Mid(resultS, Len(resultS) - 1, 2)<br />
End Function<br />
<br />
=Capturing your own sample transactions=<br />
These notes are for Microsoft Windows. Linux should be easier.<br />
<br />
Get a copy of Device Monitoring Studio. These instructions were written with version 5.11. Use an HA22 device or other serial or usb-to-serial Z-wave dongle. Monitor the serial port for an event. Add the "Request" view in DMS. Do your operations in the software that will interact with the HA22. No click on the "complete" tab in the request view. Right click and choose "export". Save the .htm file that results.<br />
<br />
The resulting HTML is pretty verbose. Some simple regexps can pull out interesting details. That results in transcriptions like the ones you see below.<br />
<br />
Here's a session with an established Homeseer installation starting up:<br />
<br />
<pre><br />
W: 01 03 00 02 fe <br />
R: 06 <br />
R: 01 25 01 02 04 04 1d ff 00 <br />
R: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 38 <br />
</pre><br />
the 29 bytes after 1d (length, thats 29 in decimal) represent a node bitmask (29*8 = 232 devices).<br />
<pre><br />
W: 06 <br />
W: 01 04 00 41 01 bb <br />
</pre><br />
now it's iterating over the nodes and asking for supported classes<br />
<pre><br />
R: 06 01 09 01 41 12 06 00 01 01 01 a3 <br />
W: 06 <br />
W: 01 04 00 41 02 b8 <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 03 b9 <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 04 be <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 05 bf <br />
R: 06 01 09 01 41 c9 0c 00 04 11 04 62 <br />
W: 06 <br />
W: 01 04 00 41 06 bc <br />
R: 06 01 09 01 41 c9 0c 00 04 10 03 64 <br />
W: 06 <br />
W: 01 04 00 41 07 bd <br />
R: 06 01 09 01 41 c9 0c 00 04 10 03 64 <br />
W: 06 <br />
W: 01 04 00 41 08 b2 <br />
R: 06 01 09 01 41 ca 06 00 02 02 00 7a <br />
W: 06 <br />
W: 01 07 00 03 01 02 00 00 f8 <br />
R: 06 <br />
W: 01 03 00 20 dc <br />
R: 06 01 08 01 20 00 98 a2 94 08 70 <br />
</pre><br />
00 98 a2 94 == home id<br />
08 == node id<br />
<pre><br />
W: 06 <br />
W: 01 03 00 07 fb <br />
R: 06 01 20 01 07 02 2d 00 00 00 01 00 01 7f 80 fe 00 8f 00 00 00 7b 9f ff 00 87 00 00 00 00 00 80 00 00 64 <br />
W: 06<br />
</pre> <br />
<br />
Here's the first bits of what HomeZiX did when started:<br />
<br />
<pre><br />
W: 01 03 00 15 e9 <br />
R: 06 01 10 01 15 5a 2d 57 61 76 65 20 32 2e 30 39 00 01 9d <br />
W: 06 <br />
W: 01 05 00 06 0f 0a f9 <br />
R: 06 01 05 01 06 96 0f 64 <br />
W: 06 <br />
W: 01 04 00 17 00 ec <br />
R: 06 01 04 01 17 00 ed <br />
W: 06 <br />
W: 01 03 00 07 fb <br />
R: 06 01 20 01 07 02 2d 00 00 00 01 00 01 7f 80 fe 00 8f 00 00 00 7b 9f ff 00 87 00 00 00 00 00 80 00 00 <br />
R: 64 <br />
W: 06 <br />
W: 01 03 00 20 dc <br />
R: 06 01 08 01 20 00 7a 7a af 02 7b <br />
W: 06 <br />
W: 01 03 00 02 fe <br />
R: 06 <br />
R: 01 25 01 02 04 04 1d 87 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />
R: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 40 <br />
W: 06 <br />
W: 01 03 00 56 aa <br />
R: 06 01 04 01 56 00 ac <br />
W: 06 <br />
W: 01 04 00 41 01 bb <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 04 00 41 02 b8 <br />
R: 06 01 09 01 41 ca 06 00 02 02 01 7b <br />
W: 06 <br />
W: 01 04 00 41 03 b9 <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 04 00 41 08 b2 <br />
R: 06 01 09 01 41 c9 04 00 03 10 00 68 <br />
W: 06 <br />
W: 01 05 00 21 00 00 db <br />
R: 06 01 04 01 21 42 99 <br />
W: 06 <br />
W: 01 05 00 21 00 01 da <br />
R: 06 01 04 01 21 06 dd <br />
W: 06 <br />
W: 01 06 00 23 00 02 06 de <br />
R: 06 01 09 01 23 21 72 86 82 2b 87 2f <br />
W: 06 <br />
W: 01 08 00 13 ff 01 00 00 01 1b <br />
R: 06 01 04 01 13 01 e8 <br />
W: 06 <br />
R: 01 05 00 13 01 00 e8 <br />
W: 06 <br />
W: 01 05 00 50 ff 01 54 <br />
R: 06 <br />
R: 01 07 00 50 01 01 ef 00 47 <br />
W: 06 <br />
</pre><br />
<br />
= References =<br />
http://www.basshome.com/leviton_z-wave_documentation_1970_ctg.htm<br />
<br />
http://zwaveworld.com/forum/index.php?showtopic=237<br />
<br />
http://www.eilhk.com/en/product/Datasheet/Zensys/SDS10243-2%20-%20Z-Wave%20Protocol%20Overview.pdf<br />
<br />
or<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Protocol%20Overview.pdf<br />
<br />
<br />
http://www.eilhk.com/en/product/Datasheet/Zensys/INS10244-3%20-%20Z-Wave%20Node%20Type%20Overview%20and%20Network%20Installation%20Guide.pdf<br />
<br />
or<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Node%20Type%20Overview%20and%20Network.pdf<br />
<br />
http://www.smarthus.info/support/download/zwave/Z-Wave%20Configuration%20Information.pdf<br />
<br />
<br />
http://www.ddj.com/embedded/193104353<br />
<br />
http://www.elec-solutions.com/docs/motor_controls/abmhz/ABMHZ_v1+1_Advanced_User_Manual.pdf<br />
(since pulled, but still visible as of April 26, 2008 in the Google cache)<br />
<br />
= Tools used =<br />
http://sourceforge.net/projects/slsnif/<br />
<br />
= Links =<br />
<br />
http://www.intouchcontrolsforum.com/forums/showthread.php?t=41&page=2<br />
<br />
http://www.elec-solutions.com/docs/motor_controls/dbmz/DBMZ_v1+1_Advanced_User_Manual.pdf<br />
<br />
http://zwaveworld.com/forum/index.php?showtopic=227&st=20<br />
<br />
http://www.denninger.net/homedaemon.htm<br />
<br />
http://forums.controlthink.com/</div>
Dbarnett