An introduction to the Z-Wave protocol

December 8th, 2009 by Henrik Leidecker Jørgensen | Edit this entry Leave a reply »

In the first article about Z-Wave programming in C# the program was able to either switch on or switch off a Z-Wave device. In this article some of the basic principles of the Z-Wave protocol will be explored. This will provide the basic understanding for a modification to the code that will be done in a later article. With the modification to the code it will be able to switch the device on and then switch it off . This does not sound like much but it requires the C# program to follow the Z-Wave protocol.

The Z-Wave protocol is based on the following principle.Messaging1

Each message (request/response) is followed by a confirmation (‘acknowledge’). The entire message sequence then looks like this.

Messaging2

The program from the first article only sent out the first request, to turn on the device, and then closed the serial port. Had the program then tried to issue a second request to turn the device off the request would have been rejected by the Z-Wave controller – sending a new request at that point would break the rules of the protocol as no ‘acknowledge’ (ACK) had been sent.

The following is a correct message sequence for switching on node ‘6′.

/*
    Message sent: 01 09 00 13 06 03 20 01 FF 05 3B
    Message received: 06
    Message received: 01 04 01 13 01 E8
    Message sent: 06
*/

The purpose of each of the messages is described below.

  1. The C# client sends a request to the Z-Wave controlleren – switch on node ‘6′
  2. The Z-Wave controller sends an ACK to the C# client- confirmation for the request
  3. The Z-Wave controller sends a response to the C# client- the controller has send the message to the Z-Wave node
  4. The C# client sends an ACK to the Z-Wave controller – confirmation for the request

In the follow-up article this knowledge will be utilize to create a C# program that switches on and the switches off a Z-Wave device.

Advertisement

2 comments

  1. Wim says:

    Hi hendrik,

    I got your answer from the forum of Domotica.
    Still I’m lokking for some information the transfering data from one software base to another.
    Have you some info or person who can help on, to do this?

    Thanks a lot.
    BR Wim

  2. Henrik Leidecker Jørgensen says:

    Hi,

    As I understand the problem then the key presses on the Merten does not show up on the serial port for the Aeon-Labs USB stick? And that it works with the Merten stick?

    I know that battery operated Z-Wave remotes originally only supported operating other Z-Wave nodes – they did not send anything over the serial port as the protocol didn’t support it.
    Products like the Innovus SmoothRemote has a ‘non-standardized’ feature to support sending key presses to a master. As I understand it then this has now been standardized with the ACC command class – new remotes that do support this command class now has a way to provide the key press information to the master.

    I have been told that Merten has some ‘non-standardized’ features. The ability to register key presses from battery operated devices might be one of them and it might require the Merten USB stick. But I ‘m just speculating.

    I hope that this might explain, why you are having these problems, but I know that it isn’t a solution.

    BR,
    Henrik