Introduction to Z-Wave
Z-Wave is a wireless communications protocol ubiquitously found in modern smart devices. It is primarily used in home automation technology. It has become a communications standard for the Internet of Things (IoT). Zensys (later acquired by Sigma Designs) created the Z-Wave protocol, including its encryption. Open-zwave, an open-source version of the Z-Wave protocol stack, is also available, although it does not support the security layer.

Z-Wave is a low-energy radio wave-based wireless technology that allows smart devices and appliances to communicate with one another. Devices that use Z-Wave technology operate in the ISM band. It was created for data communication applications that require low bandwidth. As specific regions have different constraints on commercial bandwidths, Z-Wave is a region-specific protocol. Thus various locations have different legally permitted frequencies.

Source
Z-Wave has higher performance since it runs at low frequencies. The Z-Wave's longer wavelength and lower frequency allow it to permeate objects and barriers easily, allowing for more reliable and quicker communication between linked Z-Wave devices.
How do Z-Waves work?
Controllers (one primary controller and several secondary controllers) and slaves make up the Z-Wave network. The controller devices in a Z-Wave network are the nodes that begin control commands. It also broadcasts commands to other nodes. The slave devices are the nodes that respond to orders and carry out the directives. The commands are also sent to other nodes in the network by slave nodes. This allows the controller to communicate with nodes that are not in the same radio frequency band as it is.
Z-Wave Devices
Controllers
This mesh network's routing table will be stored and hosted on a controller device. As a result, the controller can communicate with all Z-Wave network nodes. The two types of controllers possible are: primary and secondary.
The controller that initially starts a new Z-Wave network becomes the primary controller. This primary controller is the network's master controller, and each Z-Wave network will have just one. The primary controller will have the power to include and omit network nodes. As a result, the primary controller always has the most up-to-date network topology. The primary controller is also in charge of node ID allocation.
Secondary controllers are controllers that are added to the Z-Wave network utilising the primary controller. They have no way of including or excluding any nodes. Their routing tables will be copied from the primary controller.
Each controller has a unique 32-bit identifier preprogrammed into the device called the Home ID. It is used to separate the networks from each other. Controllers assign this to slave devices so that they may communicate in the network.
Slaves
The slave devices/nodes in a Z-Wave network receive orders and carry out the commands' instructions. Unless specifically directed in the orders, these slave nodes are unable to send data directly to other slave nodes or controllers. Slave nodes do not compute routing tables. They are only capable of storing routing tables. They usually serve as a repeater.
The controller assigns slave devices an additional Node ID. Node IDs are 8-bit values unique within the network used to identify individual slave devices.

Source
Z-Wave Protocol Stack
The primary role of the Z-Wave protocol layers is to send very brief messages of a few bytes from a control unit to one or more Z-Wave nodes. It is a half-duplex, low-bandwidth protocol used to establish stable wireless communication. The Z-Wave protocol stack consists of the following five layers:

Physical Layer
In Z-Wave, the physical layer serves a variety of purposes. Modulation and coding are vital, as is the insertion of a known pattern, called a preamble, for synchronisation at the receiver.
MAC Layer
As the name implies, the MAC layer controls media access between slave nodes using collision avoidance and backoff techniques. It manages network operations using the Z-Wave frame's HomeID, NodeID, and other information.
Transport Layer
Retransmission, packet acknowledgement, waking up low-power network nodes, and packet origin authentication are all handled by the Z-Wave transport layer. It is used to communicate commands across the network.
Network Layer
The Z-Wave network layer controls the frame routing from one node to another.
Application Layer
In a Z-Wave network, the application layer is in charge of decoding and executing orders.



