This document is the property of Silicon Labs. The data contained herein, in whole or in
part, may not be duplicated, used or disclosed outside the recipient for any purpose. This
restriction does not limit the recipient's right to use information contained in the data if it
is obtained from another source without restriction.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page ii of vi
REVISION RECORD
Doc. Rev
DateByPages
affected
Brief description of changes
1
20190816
20190828
SNA
DCHOW
ALL
- Cloned from 14416, delelgated only API & File formats to 14416
-v9.22
-Control Firmware Update MD CC v7, Battery CC v2, Sound Switch CC v2, Door Lock Logging
CC v1
-Added text to explain Z/IP gateway supports of IPv6 Router Advertisement for IPv6 autoconfiguration and routing in section 4.1.4
-Deprecated BASIC sample app.
-Added section "Controller App"
-Added SDS14223, SDS, Z-Wave Command Class Control Specification in "References"
20191108
DCHOW
ALL
-v10.01
-Changed section "Firmware Update" to "Firmware Update and Backup"
-Removed source code sub-directory "script" as the script file "network_setup.sh" became
obsolete when Z/IP gateway supported IPv6 router advertisement.
-Added section “TYPICAL COMMAND CLASS IMPLEMENTATION”
20191120
KSUNDARAM
ALL
-Added sections on SmartStart, network health, update node, update n/w, door lock CC,
notification CC under “Controller App”
2
20191128
20191206
SNA
ALL
- rewrote Device Database section
- added Saving & Restoring Network subsection
- added CC control for Door Lock Logging, moved CC support for Multi-Cmd to ZIPGW
- upgraded ZIPGW NW MGMT PROXY CC to v3
3
20191226
20200107
SNA
3,
4,
4
CC Control: Updated NWMG_PROXY to v2, removed duplicate SENSOR_ALARM, added
ZIPGW CCs; CC Support: Overhauled table format to show security requirements
CC Support:: corrected Node Provisioning CC details
4
20200110
SNA
V7.13.1 - no change
5
20200325
SNA
Removed Portal support
5
20200416
ADGIELNI
3
Support Battery CC v3
6
20200618
MIKOZIK
v, 4
- Removed old version ”7.13” from table 3 description.
- Updated Required Security class for: FIRMAWRE_UPDATE_MD, NW_MGMT_BASIC,
NW_MGMT_INCLUSION, NW_MGMT_IMA, NW_MGMT_PROXY in table 3
7
20200701
SCBROWNI
All
Tech Pubs review
7
20200702
MIKOZIK
ALL
Changed version to 7.14.x
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
Table 26. Build System Requirements .........................................................................................44
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page vi of vi
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 1 of 47
1Introduction
1.1Purpose
The Z-Ware Library is a Z/IP (Z-Wave for Internet Protocol) Gateway (ZIPGW) client and
abstracts Z-Wave Command Classes (CC) into controllable and monitorable interfaces over a C
API (Application Programming Interface) for easier development and certification of Z-Wave
controller applications. One such Z-Ware Library client is the Z-Ware Web Server.
This document describes the Library usage.
1.2Audience and Prerequisites
This document is for Z-Wave Partners and assumes they are already comfortable with the
Z-Wave protocol and network installation. As such, the document does not go into detail on
these matters. References are also made to the Device and Command Classes and the Z/IP API,
which are what this API is built upon.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 2 of 47
2Features
Node
Power strip
Endpoints
Power point
Power point
Interfaces
Switch
Meter
Switch
Meter
The API deals with Z-Wave through descriptors for networks, nodes, endpoints, and interfaces.
A Z-Wave Home Area Network (HAN) is uniquely identified by a Home ID encapsulated in a
network descriptor. The API views the network through its attached ZIPGW.
Nodes are Z-Wave devices in this HAN uniquely identified by a Node ID encapsulated in a node
descriptor. These nodes can be composite devices having multiple endpoints, for example a
power strip with multiple separately controllable power points. Each power point may have
multiple interfaces allowing for control and/or monitoring, e.g., a switch to set on and off and
perhaps a meter providing power consumption information.
Table 1. Z-Wave Example Device and Descriptors
2.1Role
Z-Ware is a Z-Wave Plus version 2 Security Enabled device in the Static PC Controller class
mainly used in the roles of Static Update Controller (SUC), Identity Server (SIS), and Z-Wave
Plus Central Static Controller (CSC). As a Z/IP client, it works in conjunction with a ZIPGW. ZWare sets itself as the (first) unsolicited IP address of the ZIPGW to which it is connected.
2.2Network Operations
Z-Ware supports Inclusion, Exclusion, Reset (Set Default), Replace/Remove Failed Node, and
Send NIF (Node Information Frame). If it is assigned a primary controller role, it will always
upgrade itself to an SIS unless there is an SUC already present. Hence, it cannot initiate
controller shift as a primary.
Z-Ware supports Set Learn mode, which allows itself to be added to or removed from a
network. Adding to a network will typically make Z-Ware an Inclusion or Secondary Controller,
in which case, some of its facilities will not be available. Set Learn mode will always attempt
classic mode before Network Wide Inclusion (NWI) mode. Controller replication (Copy) is
achieved through Inclusion and Set Learn Mode.
Z-Ware supports Node and Network Update. Z-Ware discovers a Z-Wave node’s capabilities
during inclusion through a series of comprehensive queries. This process may take some time,
especially for a secure Frequently Listening Routing Slave (FLIRs) device. This operation may be
aborted at any time. A Node Update requeries the information obtained during inclusion,
which allows discovering any changes that were not made through Z-Ware. A Network Update
requests topology from an SUC if available and then performs neighbor update if available or
node update to every node it is aware of.
Z-Ware supports SmartStart, through the NODE_PROVISIONING CC, which uses a configurable
provisioning list of devices to allow the Z-Wave network wide inclusion without having to
manually configure a new node into Z-Wave learn mode.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 3 of 47
Z-Ware supports multicast operations with ZIP CC v5.
CC
VerCCVer
APPLICATION_STATUS
1
NW_MGMT_PROXY
3
ASSOCIATION
3
POWERLEVEL
1
ASSOCIATION_CMD_CFG
1
PROTECTION
2
ASSOCIATION_GRP_INFO
3
SECURITY
1
BARRIER_OPERATOR
1
SECURITY_2
1
BASIC
2
SENSOR_ALARM
1
BATTERY
3
SENSOR_BINARY
2
CENTRAL_SCENE
3
SENSOR_MULTILEVEL
11
CLIMATE_CONTROL_SCHEDULE
1
SIMPLE_AV_CONTROL
1
CLOCK
1
SOUND_SWITCH
2
CONFIGURATION
4
SUPERVISION
1
CRC16_ENCAP
1
SWITCH_ALL
1
DEVICE_RESET_LOCALLY
1
SWITCH_BINARY
2
DOOR_LOCK
4
SWITCH_COLOR
3
DOOR_LOCK_LOGGING
1
SWITCH_MULTILEVEL
4
FIRMWARE_UPDATE_MD
7
THERMOSTAT_FAN_MODE
5
INDICATOR
3
THERMOSTAT_FAN_STATE
2
MANUFACTURER_SPECIFIC
2
THERMOSTAT_MODE
3
METER
5
THERMOSTAT_OPERATING_STATE
2
METER_PULSE
1
THERMOSTAT_SETBACK
1
METER_TBL_MONITOR
1
THERMOSTAT_SETPOINT
3
MULTI_CHANNEL
4
TIME
2
MULTI_CHANNEL_ASSOCIATION
4
USER_CODE
2
MULTI_CMD
1
VERSION
3
NO_OPERATION
1
WAKE_UP
2
NODE_NAMING
1
WINDOW_COVERING
1
NODE_PROVISIONING
1
ZIP
5
NOTIFICATION/ALARM
8
ZIP_GATEWAY
1
NW_MGMT_BASIC
2
ZIP_ND
1
NW_MGMT_INCLUSION
3
ZIP_PORTAL
1
NW_MGMT_INSTALLATION_MAINTENAN
CE
2
ZWAVEPLUS_INFO
2
2.3CC Control
Z-Ware can be operated in any Z-Wave network with other Z-Wave certified devices from
other manufacturers. All non-battery-operated nodes within the network will act as repeaters
regardless of vendor to increase reliability of the network.
Z-Ware controls/monitors Z-Wave-certified devices of different categories from various
vendors through their CCs. CCs that are automatically handled are not exposed to the user. ZWare controls the following CCs:
Table 2. Controlled Z-Wave CCs
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 4 of 47
Table 2. Controlled Z-Wave CCs Inherited from ZIPGW
CC
VerCCVer
INCLUSION CONTROLLER
1
TRANSPORT_SERVICE
2
CC
Ver
ASSOCIATION
3
ASSOCIATION_GRP_INFO
3
DEVICE_RESET_LOCALLY
1
MULTICHANNEL_ASSOCIATI
ON
4
CC
Ver
Not
Added
Required Security classes
when added
On Secure
Inclusion
Failure
APPLICATION_STATUS
1
X
None
X
CRC_16_ENCAP
1
X
None
X
FIRMWARE_UPDATE_MD
5
Highest granted security
class - not supported when
included non-securely
INCLUSION_CONTROLLER
1
X
None
X
INDICATOR
3XHighest granted security
class
X
MAILBOX2LAN-side only
MANUFACTURER_SPECIFIC
2XHighest granted security
class
X
MULTI_CMD
1
X
None
X
NODE_PROVISIONING
1
Access Control, only when
SIS
NW_MGMT_BASIC
2
Highest granted security
class - not supported when
included non-securely
NW_MGMT_INCLUSION
3
Highest granted security
class - not supported when
included non-securely
NODE_PROVISIONING CC is only present when Z-Ware is operating as a Z-Wave SIS.
SUPPORT CC is automatically controlled only and only for Post Set Polling – see 2.11
Post-Set
Polling.
2.4CC Support
For easier reference during certification, supported CCs (including those inherited from ZIPGW)
are shown below.
Table 2.: Supported Z-Wave CCs Pushed Down from Z-Ware (No Security Requirements)
Table 3. ZIPGW SDK Supported Z-Wave CCs
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 5 of 47
NW_MGMT_IMA
2
Highest granted security
class - not supported when
included non-securely
NW_MGMT_PROXY
3
Highest granted security
class - not supported when
included non-securely
POWERLEVEL
1XHighest granted security
class
X
SECURITY
1
X
None
SECURITY_2
1
X
None
X
SUPERVISION
1
X
None
X
TRANSPORT_SERVICE
2
X
None
X
TIME1X
None
X
VERSION
3XHighest granted security
class
X
ZIP4LAN-side only
ZIP GATEWAY
1
LAN-side only
ZIP_ND1LAN-side only
ZIP NAMING
1
LAN-side only
ZIP PORTAL
1
LAN-side only
ZWAVEPLUS_INFO
2
X
None
X
Z-Ware does nothing on receiving Basic CC Set or Get, unless Basic Set from any particular node
or endpoint is used as a Scene trigger. Z-Ware supports only 1 Association group supporting 1
node for Lifeline. This node will receive the Device Reset Locally command.
2.5Device Database
A device database in JSON format for easier user editing is used to:
Upgrade functionality of older versions of CCs that do not support capability queries by
pre-configuring the database with the necessary information based on manufacturers’
published data sheets
Pre-configure devices automatically to optimal usage settings when dealing with
ambiguous configuration CC parameters or associations
Fix quirks in devices that are not fully compliant or compatible
Unify notification sensor implementation from Binary Sensor CC, Alarm Sensor CC,
Alarm CC v1-2, Notification CC v3-8 so tht they all look the same for an easier client API
because they essentially serve the same function
2.6Command Class Configuration
Some library clients may want to only implement control for selected CCs of those offered.
However, this leads to Z-Wave certification form failures as the library performs background
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 6 of 47
polling and information caching for CCs not listed in the form. A CC configuration option file,
cmd_class.cfg, list all CCs offered allowing the client developer to comment out undesired CCs.
2.7Network Initialization
The following steps are carried out during network initialization:
1. Get ZIPGW’s Z-Wave Home ID, Node ID, and Home Area Network (HAN) IP address.
2. Get ZIPGW attached controller’s cached node information.
3. Get CC versions present in the ZIPGW cached node information to create corresponding ZWare interfaces.
4. Get ZIPGW’s hardware and firmware versions if VERSION CC is Version 2 or higher.
5. Get ZIPGW’s manufacturer, product type, and product ID, if MANUFACTURER_SPECIFIC CC
presents.
6. Get node list of the HAN.
7. Turn on mailbox for ZIPGW SDK v2.1x and above. This will enable multi-client support and
receive wake-up notification from the device through mailbox ACK message.
8. Get ZIPGW dynamic DSK key for adding new node.
9. Set supported CCs in the ZIPGW attached controller’s NIF.
10. Get unsolicited destination address, and, if its IPv6 address is all zeroes, set it to the Z/IP
client IPv6 address.
11. Resolve all nodes in the node list into corresponding HAN IPv6 addresses.
12. Perform Node Update (see 2.8 Node Update) through HAN network for nodes that are not
loaded with detailed node information from persistent storage.
2.8Node Update
The following steps are carried out to acquire detailed node information based on the CCs
present at the node and endpoint levels:
1. Get cached node information of the node of interest from the ZIPGW.
2. Assign the ZIPGW attached controller’s Z-Wave Return Route to the node.
3. Get CC versions of each CC listed in the node information.
4. Get library, protocol, and application versions.
5. Get node’s hardware and firmware versions if Version CC version is 2 or higher.
6. Get MANUFACTURER_SPECIFIC CC Manufacturer ID, Product Type, and Product ID. Based
on these, get device category from the Device Database. Get Device Serial Number if
supported.
7. If the node has just been added into the network, set the WAKEUP CC notification receiving
Node ID to SIS with/without changing the wakeup interval. The wakeup interval will be
changed if the global setting for the wakeup interval is non-zero in the Device Database.
8. For each endpoint in the node:
a) Get security supported CCs at the endpoint if the node is included securely.
b) Get version of CCs at the endpoint.
c) If the node has just been added into the network, set device-specific configuration
parameters based on the Device Database.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 7 of 47
d) Get Configuration CC parameter number property if CC version is 3 or higher.
CC
CC
VERSION
MANUFACTURER_SPECIFIC
WAKE_UP
CC
CC
ASSOCIATION
SENSOR_BINARY
ASSOCIATION_GRP_INFO
SENSOR_MULTILEVEL
ALARM_SENSOR
SIMPLE_AV
BARRIER_OPERATOR
SOUND_SWITCH
BATTERY
SWITCH_BINARY
CENTRAL_SCENE
SWITCH_COLOR
CLOCK
SWITCH_MULTILEVEL
e) Get Association CC’s maximum supported group. If the node has just been added into
the network and group 1 is “Lifeline”, set the SIS node ID into group 1.
f)Get the Central Scene CC number of supported scenes. If the node has just been added
into the network and Central Scene CC version is 3 or greater, then set it to slow
refresh.
g) Get Z-Wave Plus Information.
h) Get Multilevel Sensor CC supported types, units, and current value.
i)Get Association Group Information CC details.
j)Get Indicator CC supported indicator ID, property ID, and the current property ID’s
value.
k) Get Thermostat Fan Operating Mode CC supported modes, Thermostat Mode CC
supported and current mode, Thermostat Setpoint CC supported and current type and
temperature range, Thermostat Operating State CC current state, and Thermostat Fan
State CC current state.
l)Get Multilevel Switch CC supported types and current values.
m) Get Simple AV CC supported controls.
n) Get Alarm/Notification CC supported types and events.
o) Get Protection CC supported states.
p) Get User Code CC maximum supported codes.
q) Get Meter CC capabilities and descriptors.
r)Get Binary Sensor CC supported types and current values.
s) Get Door Lock CC current state.
t)Get Alarm Sensor CC supported types and current values.
u) Get Barrier Operator CC current state.
v) Get Color Switch CC supported components and current values.
w) Get Sound Switch CC supported tone info and current configuration.
x) Get Window Covering CC supported parameter IDs and current status.
y) Get Binary Switch CC current state.
z) Get Battery CC current level.
aa) Get Node Naming CC current name and location.
Table 4. Node Update get/set CCs
Table 5. Node Update endpoint get/set CCs
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 8 of 47
CONFIGURATION
THERMOSTAT_FAN_MODE
DOOR_LOCK
THERMOSTAT_FAN_STATE
INDICATOR
THERMOSTAT_MODE
METER
THERMOSTAT_OPERATING_ST
ATE
METER_TBL_MONITOR
THERMOSTAT_SETPOINT
MULTI_CHANNEL_ASSOCIATI
ON
USER_CODE
NODE_NAMING
VERSION
NOTIFICATION/ALARM
WINDOW_COVERING
PROTECTION
2.9Network Update
The following steps are carried out to update the network:
1. Repeat steps 1 to 4 of Network Initialization (see 2.7 Network Initialization).
4. Resolve all nodes in the node list into corresponding HAN IPv6 addresses.
5. Request node neighbor update for each of the nodes in the node list. Repeat for up to
three iterations if the request node neighbor update failed for some nodes that may be
out-of-range.
6. Perform Node Update for each node in the network (See
2.8 Node Update).
2.10 Background Polling
Z-Ware Library performs automatic background polling to cache device-supported interface
details (e.g, as supported sensor types and units) and device values (e.g., sensor readings for
each supported type). For always-on devices, polling is carried out for all relevant interfaces in
a device followed by an interval of 10 seconds before the next device is polled. The same
device is never polled twice within an interval of 30 seconds. If the device is down or nonresponding, the next poll time will be 1 minute and double the interval each time the node is
still down or non-responding on polling until maximum of 16 minutes interval is reached. For
FLIRS (Frequently Listening Routing Slave), also known as LSS (Listening sleeping slave) devices,
polling is carried out only every 6 hours per device so as not to exhaust the device’s batteries.
For sleeping devices, polling is carried out on wake up. As sleeping devices will go to sleep
mode when they don’t receive any Z-Wave messages, this type of polling has higher priority
than the other two types of polling. The polling sequences of CCs are the same as those listed
for each endpoint in Section 2.8 Node Update.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 9 of 47
2.11 Post-Set Polling
Some devices take time to reach their target settings. This is especially true for mechanical
devices. Z-Ware Library performs post-set polling for door lock, multi-level switch motor, and
barrier operator interfaces.
For door locks, the polling intervals are 1, 2, 3 seconds, whereas for multi-level switches, the
intervals are 1, 2, 3, 4 seconds before the timeout occurs. For Barrier Operator CC, the intervals
are 1 to 7 seconds incrementally.
If the endpoint supports the Supervision CC, polling is not performed, Supervision Get
encapsulation is automatically used and notification is expected from the device on
completion. This allows the client to be informed if/when the device has reached its target
state.
INS14606-7Z-Ware SDK 7.14.x Library User Guide2020-07-07
silabs.com | Building a more connected world.
Page 10 of 47
3Typical Usage
Action
API
Initiate network scanning for ZIPGW IP addresses. For each
valid network interface IP address, a callback will report the
result of each scanning.
zwnet_gw_discvr_start
zwnet_gw_discvr_cb
To stop the network scanning and free the resources used
in scanning.
zwnet_gw_discvr_stop
Action
API
Initialize the API and get controller node ID, home ID, HAN
address, and node list.
zwnet_init
zwnet_notify_fn
3.1Network
3.1.1Initialization
The first thing a client needs to do is to acquire the ZIPGW IP address either by means of
reading from the configuration file or scanning the IP network using the ZIPGW Discovery
protocol. There are APIs to help the client do the network scanning for ZIPGW IP addresses.
Table 6. Network Scanning APIs
The client initializes itself by querying the ZIPGW attached controller node ID, home ID, HAN
address, and the node list of all the nodes in the HAN.
After that, it loads any persistent network information from any previous sessions. This
includes information on the nodes, endpoints, and interfaces along with their versions. Home
ID is used as a unique identifier into the persistent network storage. This is analogous to the
node information stored on the non-volatile memory (NVM) of the controller.
Table 7. Network Initialization API
Sometimes, a controller that was configured on a different host is introduced to ZIPGW. In this
case, the storage on the host and the ZIPGW attached controller node information in NVM
would not match. This requires migration of the persistent network storage, a facility provided
by the client. If this migration is not performed, the information stored in the controller is used
to request further meta-information and can cause the load operation to be longer, depending
on the number of nodes discovered and their geometries, and sleeping nodes may not be
properly configured.
3.1.2Creation and Tear Down
Typically, the client creates a network with at least two devices, one of which is a controller,
while the other can be any type of node. The user initiates the node for inclusion and uses the
controller to add the device into its network and initiate.
Now, the node can be controlled through the controller, which becomes the primary.
Similarly, more nodes can be added. Removal is identical except that the API parameter is
different. During addition, the node’s endpoints and interfaces are enumerated and populated
as descriptors for control. Security facilities are handled transparently with indications to the
client.
Loading...
+ 37 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.