These are my personal notes on Z-Wave that I made while trying to understand how Z-Wave networks work. They may be helpful if you are new to the protocol.
What is Z-Wave? -Z-Wave is a low power wireless communications protocol using low-energy radio waves.
It is used primarily for home automation for wireless control of home appliances e.g. lighting , security systems, thermostats, garage door openers etc .. wiki
Z-Wave uses a mesh networking topology and has a range of around 30 metres. between nodes.
There are two main components
Controllers – All Z-Wave networks require a controller. The first controller on the network is the primary controller and is responsible for including and excluding nodes, assigning node IDs to nodes and maintaining a network routing table.
A controller is assigned a factory Network Id which it assign to all nodes that are included on the network.
A USB controller stick that you plug into a computer is a common type of controller.
Slaves- These are nodes like lights,switches etc. Nodes can be mains powered or battery. Mains powered nodes (always on) can be used as repeaters.
A mesh topology allows any node to connect to any other node and allows multiple connections.
The diagram below compares a Wi-Fi network with a Z-Wave network
In a Wi-Fi network all nodes must be in wireless range of the Wireless Access point, and they can only communicate through the access point.
In Z-Wave a node must be in range of another node and can communicate with adjacent nodes. A packet can hop over 4 nodes which means effectively limits the distance between a controller and the farthest node.
Forwarding Nodes or Repeaters
A node can forward packets to adjacent node as shown in the diagram above.
However to act as a forwarding node the node must be mains powered.
Battery powered nodes cannot forward packets.
Sending Messages and Responses
Messages follow a command response format.
The node acknowledges the message.
Slave nodes cannot initiate messages i.e. then can only respond. However forwarding nodes can send predetermined messages to assigned (associated) nodes.
This type of behaviour is useful with devices like motion sensors,light switches etc which need to send motion data immediately to a controlling device.
Polling is used between the controller and slave nodes to request updated status information and for sending control commands.
Th controller will at a predetermined interval send commands and request data to each node.
Adding Nodes to a Network
To become part of a Z-Wave network a node needs to be included into the network.
This can only be done on the primary controller. Before inclusion a slave node has a network ID of 0 and Node ID of 0.
After inclusion the node has network ID of the controller and a unique Node ID between 2 and 232.
Note 8 bits are used for the node ID and the primary controller has the node ID of 1. Some IDs are reserved
Some nodes are always
Removing Nodes from a Network
Any Controller can remove a node from a network. When a node is removed it’s network ID and node ID are set to zero.
Each node maintains a list of adjacent nodes that it can communicate with.
They communicate this list back to the controller when requested and the controller uses it to build a routing table.
The primary controller creates and maintains the router table. The controller uses this table to route packets across the network using source routing.
A Z-Wave network requires at east one controller. This controller is the primary controller.
Other controllers can be added to the network and can be used for issuing commands to nodes.
Controllers are divided into two types:
Static Controller are mains powered and should not be moved.
Portable controllers are usually battery powered and as such cannot route messages. A portable controller can be the primary controller and that is often the case in very small networks.
All controllers have a copy of the routing table.
- Zwave technical Basics pdf
- Introduction to Zwave
- Seven Habits of Highly Effective Z-Wave Networks for Consumers
- Z-Wave official FAQ
- Z-Wave Instant status vs Polling
Popularity ZigBee vs Z-Wave