4. Serial interface to hosts
The very same module that is used to build products such as dimmers or switches is also used to interface with other host computers, e.g. PCs. The main interface used for this is the serial interface of the chip.
Series 400 and the soon to be released Series 500 modules have direct USB support. The Series 300 use can convert the provided Serial port to USB by using any number of common Serial-2-USB chips (ftdi, prolific, etc.). They are well supported in all major operating systems and do not cause extra effort for installing device drivers. Adding the USB device will create a new virtual serial device the operating systems Z-Wave application is using (e.g. COM x in Windows or /dev/tty.usbserial for USB sticks utilizing the prolific USB-2-Serial chip.)
Manufacturers of USB or serial interface devices are free to define their own communication protocol used on this interface. However, since the interfacing to a host computer is a common task the SDK already provides a specification that maps certain functions of the Z-Wave library to a serial interface protocol and defines how to exchange data via the serial interface as well.
The SDK also contains some precompiled firmware that implement this serial interface protocol also referred to as Sigma Designs Serial API. The result is that most of the Z-Wave interface devices such as USB stick etc. just use these pretested and predefined firmware’s implementing the Sigma Designs Serial API. Certain vendors, however, have enhanced and optimized the firmware for the host interface over the serial interface [ZSTICK].
On the host side of the serial communication link a software needs to manage the serial interface provided by the virtual serial device. Because the serial interface as recommended by Sigma Designs is simply mapping library functions to the serial interface this interface protocol is quite complex and not straightforward to deal with. Controller code on the host needs to handle various part of the network control and maintain timings and the message queue from and to the Z-Wave transceiver SoC.
Figure 5: The Z-Wave Logo guarantees interoperability
Sigma again offers sample code how to do this but developers have more options to choose from. In the Internet there are several open source projects implementing the Sigma Designs Serial API, e.g. [OpenZWave]. They have partly reverse engineered the Serial API that is provided as part of the SDK under NDA. However there is no official support of these projects from Sigma Designs. These open source implementations may therefore not completely implement the specification and/or use the latest features of Z-Wave the correct way.
There are certain commercial implementations of Host side Z-Wave stacks available in the market as well that offer professional support for projects that do not want to implement the Z-Wave Serial API support from scratch again [Z-Wave.Me].