Zwave Z/IP Gateway Doxygen Documentation

Z/IP Client Programming Guide

"Instant Success - on ZWave"

This section is a super-quick guide to get a switch toggling. It assumes the user can connect to the RPi and can start running a zipgateway and the reference client.

The recommendation here will be to plug the RPi into an ethernet switch. The computer the user will be using to access the RPi must be plugged into the same switch. Hopefully this will simplify the tutorial and mitigate the fallout of bad configurations of zipgateway.

Raspberry Pi SD Image

Working with the Raspberry Pi

"Getting Started"

The Z/IP Client Programming Guide explains the process of correctly building an IP client for a Z/IP Bridge. To help in explaining concepts and managing the network used throughout the examples, Sigma Design's reference implementation of a Z/IP client will be used. This client is freely available for download at ##<GITHUB>##

About Z-Wave

Z-Wave is a wireless communication protocol for residential automation designed to provide reliable, low-latency transmission of small data packets at low data rates. The protocol is stateless, which means that context around the communication needs to be maintained at application level. Z-Wave uses a source-routed mesh network where devices can be either controllers or slaves. Controllers can determine routes to other devices on their own, since they have a complete picture of the network's topology, and have the capability of including or excluding devices. Slaves, on the other hand, must be assigned routes to other devices by a Controller. All devices conform to a particular Device Type and a Role Type which describe their fundamental functionality and their network behavior. ##<SPEC>##

Z-Wave strives to ensure interoperability between all devices that speak Z-Wave. To this purpose, communication in the network is limited to standardized collections of messages for specific use cases referred to as Command Classes. ##<SPEC>## The Command Classes are maintained by the Z-Wave Alliance and their structure is determined and agreed upon by all Z-Wave Alliance members. Devices may support a Command Class, meaning that they can react to commands and reply with information for that particular Command Class. The can also control a Command Class, meaning they are capable of sending commands and parse information for that particular Command Class.

About Z/IP

Z-Wave over IP, or Z/IP for short, standardizes Z-Wave communication over IP. Z/IP is also stateless so it is transported over the network in UDP packets. These packets contain Command Classes wrapped inside a Z/IP Packet - a Command Class that acts like a header for Z/IP messages. These messages are directly addressed to a Z-Wave device's IP address. Z-Wave devices do not natively support IP, so a bridge is needed. This bridge's functionality is completely described by the Z/IP standard. There's even a reference implementation in the form of the zipgateway application. This guide explains how to build a client for a Z/IP Bridge.

Designing Client Architecture

Key traits:

Network Nodes

Command Classes

Network Management

Building a Great Z/IP Client

Command Queue

Groups & Scenes

Mailbox

Explain "sleeping", "FLiRS" vs. "Always On"

Receiving Unsolicited Messages

Network Statistics

Hosting a Z/IP Gateway

This section explains how to do basic configuration of zipgateway and how to run it.

Running the Bundled zipgateway

Configuring the Bundled zipgateway

Using the Reference Client

This section assumes the user is working inside the Raspberry Pi. At first, the client will be buildable only under Linux, and specifically under the RPi.

Client Architecture

Starting the Client

Listing Nodes with mDNS

Avahi is unfortunately not a great tool to showcase this.

Network Management

Building the Client

Coding Specific Tasks

This section does not explain how to use the reference client to do these tasks. It explains how these tasks are to be done, generally, when directly communicating to a zipgateway.

List Network Nodes

mDNS

Query a Node's Capabilities

mDNS & Command Class for VERSION

Controlling with BASIC Command Class

Receiving Meter Measurements with METER Command Class

Creating Associations Between Devices with ASSOCIATION Command Class

Including/Excluding Nodes

Being Included into a Network