Z-wave First, we use Command_class_basic-basic_set to control the intelligent switch. But there are two actuators on the smart switch and we can only control one of them, so how do we control the other switch. In Z-wave the second chapter, we analyzed the intelligent switch two buttons sent the message, found that the use of command_class_multi_channel-multi_channel_cmd_encap.
node) 2 ">
node) 2 ">
View <<sds12657-5-Z-wave Command Class specification,a-m.pdf>> this document.
As you can see, there are actually multiple channels that can be controlled when there are multiple actuators on a z-wave node.
The COMMAND_CLASS_MULTI_CHANNEL-MULTI_CHANNEL_CMD_ENCAP is then encapsulated with real control instructions. such as Command_class_basic-basic_set, as shown below.
node) 2 ">
Next, let's verify the matter.
1. Select the paired smart switch in the Z-wave PC controller software.
node) 2 ">
As you can see from the image above, the node ID of our smart switch is 11, which is 0x0b.
2. Send the light's opening and closing data to the smart switch.
node) 2 ">
Analyzed as follows
Command Classes |
Command_class_multi_channel |
60 |
Command Name |
Multi_channel_cmd_encap |
0D |
Source End Point |
The controller's node number, which you can see from the diagram in the first section |
01 |
Destination End Point |
Tested, two channels on the smart switch |
01 or 02 |
Command Class |
Encapsulates the actual command class Command_class_basic |
20 |
Commands |
Encapsulates the actual command Basic_set |
01 |
Parameter |
Switch data |
FF or 00 |
3. From the log area of the Z-wave PC controller software, you can see the following information
node) 2 ">
You can see that the series API number for this frame of data is 0x13.
From <<ins12308-6-Z-wave Series appl.prg. Guide v6.51.03.pdf>> This manual to find 0x13 This protocol, you can see the overall format of this serial port protocol.
node) 2 ">
And the data in pdata[] is all the data analyzed in section 2nd.
NodeID |
Z-wave Node ID |
0B |
Datalength |
|
07 |
Pdata[] |
|
0D 01 01 or 00 FF |
Txoptions |
|
25 |
Funcid |
|
03, this number is required to increment, does not increment and does not affect the function |
4. In the <<ins12350-4-Serial API Host Appl. prg.guide.pdf>> The following figure is found in this manual, which is an overall structure of the Z-wave serial protocol.
node) 2 ">
The description of each field can be found in this document, including how the checksum is calculated.
5. At this point, we can form a complete serial message.
Channel 1
0E 0B (0D), 01FF, 7B
0E 0B, 0D 01 01 20 0100 25 03 84 off
Channel 2
0E 0B (0D) 25 03 78 Open
0E 0B, 0D 01 02 20 0100 25 03 87 off
6. Let's analyze the feedback from the Z-wave node.
The feedback information of the above 4 agreements is the same.
ACK
E8
E8
E8
E8
The EA of the XX
The EA of the XX
The EA of the XX
The EA of the XX
The above Red character 03 is matched to the funcid of the sending end, and is incremented in turn.
node) 2 ">
node) 2 ">
01 |
SOF |
04 |
length, see length from the above figure should not include checksum???????????? |
01 |
Res |
13 |
Series API number |
01 |
RetVal |
E8 |
Checksum |
01 |
SOF |
05 |
length, see length from the above figure should not include checksum???????????? |
00 |
REQ |
13 |
Series API number |
03 |
Funcid |
00 |
Txstatus |
E8 |
Checksum |
If you use Z-wave PC controller to send, you will see the following information in the log window
node) 2 ">
That is, z-wave node feedback of two data, we need to reply with an ACK, otherwise z-wave node will be re-issued 4 times. And in the process of re-transmission, we can not send information to the Z-wave node.