Firstly, I never planned to write up these details of Z-Wave and I'd prefer if there was a really clear guide to Z-Wave elsewhere. However, after trying to resolve a connectivity issue (explained here: Connectivity challenges) I realised there were some fundamental aspects of Z-Wave I needed to understand better. And unfortunately understanding Z-Wave is not straight forward for an end user who doesn't have experience with this protocol. In addition finding clear authoritative technical advice is challenging. The plan for this page is to provide some basic details about Z-Wave and link to resources I've found useful in learning about how the Z-Wave protocol works.
The reason for this page is to try and assist myself and any anyone else who might read this to understand enough about Z-Wave to be able to solve problems they may experience. While there is information on the internet elsewhere about how Z-Wave works, some of that information may be dated or otherwise unclear as to how authoritative the details provided are. This is in part because often things are stated with limited technical supporting explanations. The most authoritative information is published by the Z-Wave alliance within their specification and these are available here:https://z-wavealliance.org/z-wave-specifications/. The most significant of these documents may be the Z-Wave and Z-Wave Long Range Network Layer Specification. These are not the easiest documents to read.
Z-Wave Long Range provides an extended range version of the Z-Wave technology and this is used for instances of for communications over a kilometre. I am not planning to cover this in this document because it has different routing functions and the equipment is not commonly available.
Z-Wave uses a hub to communicate with Z-Wave devices. In my installation I am using an Aeotec USB Z-Stick (shown here) plugged into a Raspberry Pi running Home Assistant. The article here: https://linkdhome.com/articles/best-zwave-hub indicates a Z-wave hub is officially called a Z-Wave Controller. Details here: https://www.smarthome.com.au/support/z-wave/home-automation-gateway-controllers.html indicate that a Z-Wave hub may be called a "Gateway Controller". We might think of Z-Wave hub, Z-Wave controller and Z-Wave gateway as being synonymous terms. In effect it's this device which will be paired with all the Z-Wave slaves (see below) on a network. See here: https://linkdhome.com/articles/What-is-z-wave for more details.
A Z-Wave network will consist of a hub and the Z-Wave devices connected to the hub. "Each Z-Wave network has a unique ID (32 bits) which ensures devices on different networks cannot talk to each other. Within that network each device is also given a unique node ID (8 bits) which allows up to 232 individuals devices. Devices are added to the Z-Wave network in a process called ‘inclusion’ which not only allocates them a network ID, but adds encryption keys and maps the signal strength to nearby devices for message routing." (https://linkdhome.com/articles/What-is-z-wave).
A Z-Wave network allows communication between nodes (typically between a controller node and device node). The data can be routed between intervening nodes to get from the source to the destination. The Z-Wave protocol stack can be compared to the OSI reference model (see: Z-Wave and Z-Wave Long Range Network Layer Specification). For anyone with a background in TCP/IP (that includes me) it is instructive to compare between the way TCP/IP works and a description of TCP/IP and compare these aspects to the way Z-Wave operates.
While TCP/IP encapsulates IP packets (typically) into ethernet frames and it is the packets which are routed, Z-Wave refers to frames as being routed and doesn't appear to utilise the term packets.
The term Z-Wave "node" and Z-Wave "device" appear to be relatively interchangeable. As stated here: http://www.openzwave.com/dev/ "each Z-Wave device is known as "Node" in the network". Or from the actual specifications a node is "any device that contains a transceiver in compliance with this recommendation". According to this definition the Aeotec USB Z-Stick (shown above) and Aeotec Z-Wave Smart Switch 6 (shown below) could be referred to as either a Z-Wave device or a Z-Wave node.
As stated here: http://www.openzwave.com/dev/: "Z-Wave nodes can be divided into two types: Controllers and Slaves." As stated here: https://stevessmarthomeguide.com/z-wave-basics/ "there are two main components: -Controllers -Slaves" on Z-Wave network. It also states: "All Z-Wave networks require a controller. The first controller on the network is the primary controller." As indicated above the Aeotec USB Z-Stick (also shown above) is a controller. This article: https://linkdhome.com/articles/What-is-z-wave indicates that there is a third type of device called "Routers". While this variation is possibly not significant it is an aspect I find frustrating with Z-Wave in that it's difficult to know which author is most correct, and in this instance is there two or three types of nodes. Adding to the lack of clarity, the article here: https://www.vesternet.com/pages/understanding-z-wave-networks-nodes-devices indicates there are 3 node types and the third type is "Routing Slave", and "Routers" are not listed. And if that's not confusing enough the specifications state: "The Z-Wave network layer defines two networking node types: controller and end."
Devices like Aeotec Z-Wave Smart Switch 6 can be included (or joined to a Z-Wave network) by following an inclusion process. Devices can be removed from the network by performing an exclusion process. I have detailed this process when using "Home Assistant" with "Z-Wave JS", "ZWaveJS2MQTT" and Aeotec devices here: InclusionExclusion.
To the best of my knowledge when devices on a network are paired with a hub then the hub has retains the data about devices on it's network. So in my case when using Aeotec USB Z-Stick when devices are included or paired with the hub details of that pairing are stored on the stick. With my setup which has the USB stick plugged into a Raspberry Pi running Home Assistant, there is some metadata stored elsewhere. See here: https://www.home-assistant.io/integrations/zwave_js/ for more details. The webpage doesn't provide details about the metadata. However, when using zwavejs and zwavejs2mqtt it's possible to give devices names and other details and I gather these details are not stored on the stick, but rather within HA/zwavejs.