Z-Wave in Z-Uno

Z-Wave is a wireless home automation protocol. Designed for DIY and IoT it is very simple to deploy in your home.

Working on sub-gigahertz frequencies it does not have interference with other wireless systems like WiFi, Bluetooth, LTE and others. In different regions Z-Wave frequencies differs and varies from 860 to 930 MHz. Z-Uno supports all Z-Wave frequencies. You can choose the required frequency in Arduino IDE.

Z-Uno delivers out of the box Z-Wave funtionality. Your sketch will interact with other Z-Wave products in your network via radio protocol according to Z-Wave Plus standards. You don't need to know deep Z-Wave protocol — Z-Uno will hide all Z-Wave internals and provide you simple to use functions.

Channels

To allow multiple functions in one device Z-Wave introduces channels (sometimes called instances). Z-Uno follows this concept allowing you to create very complex devices. Each channel in Z-Uno will have it's own functionality. Each channel hosts only two Command Classes: Basic and one of Switch Binary/Switch Multilevel/Sensor Binary/Sensor Multilevel depending on the channel type. Use ZUNO_SETUP_CHANNELS macro to setup types of channels.

You can also partially control Z-Uno without using channels: first channel of each type is mapped to the corresponding Command Class outside channels.

Example: Z-Uno with channels #1 Switch Multilevel, #2 Switch Binary, #3 Switch Multilevel, #4 Sensor Binary, #5 Sensor Binary will allow to control without channels Switch Multilevel (from channel #1), Switch Binary (from channel #3) and Sennsor Binary (from channel #4).

If no channels are specified, Z-Uno will present Sensor Binary (and Basic mapped to it) to report Service Button state.

If there is only one channel of each type, Z-Uno will not create any channels and will keep only Command Classes outside channels.

All SensorMultilevel of different types are aggregated in one channel. If more than one SensorMultilevel of the same type is defined, a new channel will be created. This will make mostly non-channeled devices in many cases and simplify Z-Uno representation in most controllers. If both Switch Binary and Switch Multilevel are only present outside of channels some controllers (like Fibaro Home Center) will show only Switch Multilevel. To solve this use macro ZUNO_DISABLE(NO_MULTIBINARY_SWITCH0)

You can also partially control Z-Uno without using channels: first is mapped to the corresponding Command Class outside channels.

Example: Z-Uno with channels #1 Switch Multilevel, #2 Switch Binary, #3 Switch Multilevel, #4 Sensor Binary, #5 Sensor Binary will allow to control without channels Switch Multilevel (from channel #1).

If no channels are specified, Z-Uno will present as remote control.

If there is only one channel Z-Uno will not add Multi Channel Command Classs and will keep only Command Classes outside channels.

Basic interoperability

Z-Wave provides Basic interoperability between different devices from different manufacturers via Basic Command Class. This Command Class is mapped to the corresponding Switch Binary/Switch Multilevel/Sensor Binary/Sensor Multilevel depending on channel type. Basic outside of channel behaves like Basic on channel #1.

Associations

Z-Uno allows to report values from each channel (be it a sensors or switch channel) out of the box. This is know as Life Line.

But it is also important to be able to control other devices in Z-Wave network. For this Z-Wave protocol introduces association groups or shortly associations. Association group is just a list of other devices in the network to whom Z-Uno is supposed to send some commands. This list is managed using standard UI provided by all existing Z-Wave controllers. Each association group is defined to have one of the allowed types depending on commands we want to be sent out. This can be control of switches or control of dimmers or even scenes switching. You can manage association groups using ZUNO_SETUP_ASSOCIATIONS macro.

Z-Uno Associations supports simple and channel (managed by Association and MultiChannel Association Command Classes correspondingly). Each group (control groups and Life Line) can host up to 5 entries.

Power management

Z-Wave was design to allow very low power consumption profile. Hence, many sensors are battery powered and can work more than two years without battery replacement. But as a side effect, such devices have to sleep most of the time to save battery and wake up only for short period to send reports to controller upon environment changes (i.e. temperature has changed or button is pressed). In Z-Wave these devices are called sleeping. Usually all battery powered sensors are sleeping. Wakeup period can be configured via Wakeup Command Class from Z-Wave controller.

To solve this reachability problems of battery devices Z-Wave allows another type of power management mode called frequently listening or FLiRS. These devices wake up every second to check if there is something for them in the ether and goes immediately back into sleep. In this mode initial communication to such device will take a bit more than one second and during this second the ether will be jammed. But after this the device will react very fast. The battery in this mode will last for only about one year. Usual applications of frequently listening is a battery operated switch, alarm or door lock.

All mains powered devices such as dimmers, switches and other actors are always listening. This means they are always reachable instantly, they always listen for ether and can act as repeaters for other devices forming mesh network.

Z-Uno supports all three types of power management modes. You can define it using ZUNO_SETUP_SLEEPING_MODE macro in your sketch.

Configuration parameters

Beside defining Z-Uno behavior in the user sketch, there are also few configuration parameters. Some parameters can be defined only during sketch upload (via Arduino IDE menu), others can be changed wirelessly via Z-Wave Configuration. Get more details on supported parameters.

Include/exclude, wake up and sending NIF

To become part of Z-Wave network Z-Uno need to be included (added) to the network using Z-Wave controller. Read more about inclusion and exclusion processes. Inclusion and exclusion (the process of removing a node from the network) are confirmed on Z-Uno by three press on the Service button. This sequence will also tell Z-Uno to send Node Information Frame (NIF).

You are able to use special non-secure inclusion using this sequence: hold the Service button until you'll see that the red LED is blinking, release the Service button and then short press it.

Once sleeping power mode is used, Z-Uno will remain in deep sleep most of the time. Single press on Service button will wake up Z-Uno.

Security

Z-Wave protocol allows secure commands transmission to bring more privacy to your IoT network. To enable Security in Z-Uno use Arduino IDE menu item. Once Security is turned on Z-Uno will follow the rules below:

  • All control commands to Z-Uno must be secure.
  • All control commands to Z-Uno must be secure and use the highest avaliable for Z-Uno node S2-key.
  • All commands sent by Z-Uno (based on Association groups) follow rules:
    • First time Z-Uno tries to speak securelly.
    • If success, Z-Uno will memorize that this device must always be spoken securelly.
    • If fails, Z-Uno will remember this and send unsecure commands to such a device.
  • This approach allows to mix secure and unsecure devices in the same Association group.
    • LifeLine group always uses the highest avaliable level. You have to add to lifeline group only the nodes with highest securiry level (the highest S2 key of this Z-Uno).
    • All other "control" groups uses dynamic-detection strategy:

      • Z-Uno setups the highest avaliable S2-key
      • (2) Z-Uno sends special command to node using current key and Z-Uno waits for report.
      • If node answers, Z-Uno will memorize detected S2-level and uses it for futher communication with node.
      • If node doesn't answer Z-Uno reduces the security level and goes to (2).
      • If node doesn't answer on any level (included unsecure) Z-Uno marks node as failed.
  • Only descriptive Command Classes are accessible without of Security: Battery, Device Reset Locally, Firmware Update, Manufacturer Specific, Power Level, Version, Wakeup, Z-Wave Plus Info.
  • Only these Command Classes are accessible without of Security when device was included securely: Z-Wave Plus Info, Transport Service, Security, Security2, Supervision

Note that Z-Uno supports Z-Wave Security S2 or Security S0. Your controller has to be S0/S2-enabled to achieve this. Note that Z-Uno supports Z-Wave Security S2/S0. Your controller has to be S2-enabled to achieve this. You are able to switch off security by means of ArduinoIDE menu or by means of parameter #7.

User is able to get DSK/PIN using zme_make utility manually or by means of ArduinoIDE. You have to select "verbose output" in preferences of IDE. DSK/PIN are listed in "Z-Uno board information" section.

Manually you are able to do it using the command: zme_make boardInfo -d <COM/tty of ZUno>

SmartStart technology

Z-Uno supports SmartStart technology. You are able to add device to network by means of special QR-code/SmartStart string. Just plug in ZUno to power supply and scan SmartStart label, no other interruction with device is needed.

Note your controller has to be SmartStart-enabled to achieve this. See the user manual for your controller.

User is able to get SmartStart string using zme_make utility manually or by means of ArduinoIDE. You have to select "verbose output" in preferences of IDE. Smart Strart QR-code is listed in "Z-Uno board information" section.

Manually you are able to do it using the command: zme_make boardInfo -q </path/to/qrcode_output_filename.png> -d <COM/tty of ZUno>. It will save qr-code image into "/path/to/qrcode_output_filename.png".

LongRange technology

Engineered to provide significantly extended wireless range and support robust networks, Z-Wave Long Range (LR) extends Z-Wave connectivity beyond the boundaries of the home and accelerates the adoption of Z-Wave in other verticals such as light commercial, hospitality, and multi-dwelling units (MDU). Z-Wave Long Range is an extra 100kbps DSSS OQPSK modulation addition to the Z-Wave protocol. The modulation is treated as a fourth channel – allowing gateways to add LR nodes to the existing Z-Wave channel scanning. At this time, Z-Wave LR is only available for the US market however, the Technical Workgroup is evaluating and testing to ensure compliance and to be able to support Europe and APAC regions in the future.

Z-Uno supports Z-Wave LR for some regions only.To add Z-Uno to the network using LR technology, select this technology on your controller when adding the device and use the same QR code as for SmartStart technology.

Note your network controller has to be LR-enabled to achieve this. See the user manual for your controller.

To exclude a device, use the standard triple-click exclusion algorithm.

Command Classes

Z-Uno supports the following Command Classes:

  • Association
  • Association Group Information
  • Battery (for sleeping and FLiRS modes)
  • Basic
  • Configuration
  • Device Reset Locally
  • Firmware Update
  • Manufacturer Specific
  • MultiChannel
  • MultiChannel Association
  • Power Level
  • Security
  • Version
  • Wakeup (for sleeping mode)
  • Z-Wave Plus Info

Depending on channels types Z-Uno will also support some of these Command Classes:

  • Sensor Binary and Notification
  • Notification
  • Sensor Multilevel
  • Meter
  • Switch Binary
  • Switch Multilevel
  • Switch Color
  • Door Lock
  • Thermostat Mode and Thermostat Setpoit
Command class Version ZUno channel entity Description S2 level
Z-Wave Plus Info 2 Special command class that provides meta-information about device. Any
Transport Service 2 Auxilary transport command class.
Security 1 Support of S0 encryption scheme. Provides backward compatibility with S0-devices/controllers.
Security2 1 Support of S2 encryption scheme.
Supervision 2 Provides session context for "set" commands. It always returns operation status to sender.
Version 3 Metainformation about firmware version and command clasess version Highest
Association 2 Add ability to control another z-wave nodes and send reports to the groups of devices. Highest
MultiChannel Association 3 Extends Association command class to end points. Highest
Association Group Information 3 Provides metainformation about association groups (like names, command types and etc). Highest
Manufacturer Specific 2 Adds some manufacturer specific API to protocol Highest
Device Reset Locally 1 Notifies controller when user resets device using its local controls. Highest
Indicator 3 Visualizes the device at the user's request Highest
Powerlevel 1 Provides diagnostic information about network nodes connectivity. Is similar to "ping" command for Z-Wave. Highest
Configurtion 4 Provides a way to customize settings of device. Highest
Firmware Update 5 Provides firmware upgrade over the air (OTA) process. Highest
Multi channel 4 Combines functionality of many devices in one. Adds end points. It appears only if you have more then one end point (channel) in your sketch Highest
Battery 1 Reports battery level of device. It appears only for the Sleeping and FLIRS devices. Highest
Wake Up 2 Sends special notification when device is ready to communicate with controller. Using this command class user is able to define wakeup interval. It appears only for the Sleeping devices. Highest
Basic 2 Is always mapped to some of actuator channel like Switch Binary, Switch Multilevel, Doorlock and etc. Provides simplified interoperability and backward compatibility besides Z-Wave devices. Highest
Switch Binary 2 Switch Binary, Siren, Flow Stop Provides simple on-off switch functionality to end point. Highest
Switch Multilevel 4 Switch Multilevel, Blinds, Switch Color Provides dimmer functionality to end point. Highest
Notification 8 Sensor Binary Provides binary sensor (event based sensor) functionality to end point. Highest
Multilevel Sensor 8 Sensor Multilevel Provides physical value sensor (like temperature, humidity, pressure and etc.) functionaly to end point. Highest
Meter 5 Meter Adds meter functionality (like energy/water/gas meter) to end point. In Z-Wave meters differ from sensor multilevel. They provide some extra functionality. Highest
Doorlock 5 Doorlock Adds doorlock functionality to end point. S2 Access Control
Thermostat Mode 3 Thermostat Provides interface to select the mode of thermostat (cool, heat and etc) Highest
Thermostat Set Point 3 Thermostat Provides interface to select the target temperature of thermostat Highest
Switch Color 3 Switch Color Provides color selection interface to end point Highest


Depending on Association Groups set up Z-Uno can control:

  • Basic
  • Door Lock
  • Switch Multilevel
  • Scene Activation

Device Classes

Z-Wave also defines so called Device Classes to allow better interoperability. Z-Uno will automatically set corresponding Device Class to each channel depending on channel type. Z-Uno Device Class will be same as Device Class of channel #1. If no channels are defined, Z-Uno will behave like Sensor Binary (see above).

Generic type Specific type
Sensor Binary Sensor Notification Notification Sensor
Sensor Multilevel Sensor Multilevel Routing Sensor Multilevel
Meter Meter Simple Meter
Switch Binary Switch Binary Power Switch Binary
Siren Switch Binary Siren
Flow Stop Switch Binary Valve Open Close
Switch Multilevel Switch Multilevel Power Switch Multilevel
Switch Color Switch Multilevel Color Tunable Multilevel
Blinds Switch Multilevel Motor multiposition
Thermostat Thermostat General Thermostat
Door Lock Entry Control Door Lock

Firmware upgrade

Z-Uno allows Over-The-Air bootloader and user sketch upgrade. So instead of connecting your Z-Uno via USB and upgrading bootloader or user sketch from Arduino IDE, you can also use Z-Wave Controller Firmware Upgrade feature. Firmware upgrade is confirmed by three times press of Service Button or via configuration parameter. Note that your sketch will be deleted during bootloader upgrade process — you will need to upload it again. See OTA process description for more info.

Device reset

Z-Uno can be excluded from network by following Exclusion process via Z-Wave controller or by resetting the device via Service button: hold Service button for 5 seconds and then press three times. Use this procedure only if your controller is missing or inoperable. Note that the sketch is not erased during exclusion or reset process.

You are able to reset Z-Uno using the following sequence: hold the Service button until the service red LED is blinking, release the Service button and then triple click on it. The red LED will confirm the reset process. Use this procedure only if your controller is missing or inoperable. Note that the sketch is not erased during exclusion or reset process.

Node Identification

Z-Uno supports Indicator command class that is used to identify specific node in network. For its identification Z-Uno uses red LED. You have to start identification from your controller (You need Z-Wave Plus 2 certified controller for that.).

Changing Z-Wave settings

Z-Uno sketch defines number of channels, their types, number of association groups and power mode. Arduino IDE also allows to turn on/off security. But Z-Wave do not allow to change these paramenters «on the fly». To remain compatible with Z-Wave Plus, Z-Uno will not adopt these changes until device is excluded or resetted.

RF test mode

For FCC, CE other regulatory tests one might need to turn Z-Uno in emission mode. This is done using RF test mode.

Learn more about Z-Wave

Z-Wave Basics Z-Wave Basics written by Dr. Christian Paetz is the perfect book to continue your dive into Z-Wave world. The book is available at amazon.com or amazon.co.uk in English, in German or in Russian.