Node Provisioning QR Code Format
Node Provisioning QR Code Format
Description: Format for representing S2 DSK as well as various product properties in QR codes
Date: 2021.03.18
Restrictions: Public
Approved by:
THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR,
ANY WARRANTY OF NON-INFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION
SHALL BE MADE ENTIRELY AT THE IMPLEMENTER'S OWN RISK, AND NEITHER THE ALLIANCE, NOR ANY
OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR
THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING
FROM THE USE OF THIS SPECIFICATION.
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally
Node Provisioning QR Code Format (S2, Smart Start)
REVISION RECORD
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally. Page ii of 10
Node Provisioning QR Code Format (S2, Smart Start)
Table of Contents
1 ABBREVIATIONS.................................................................................................................... 4
2 INTRODUCTION ...................................................................................................................... 4
3 REQUIREMENTS .................................................................................................................... 5
3.1 QR code format................................................................................................................................5
3.1.1 QR Code TLV representation ..............................................................................................7
3.2 S2 QR code presentation requirements.......................................................................................8
3.3 QR code examples ..........................................................................................................................9
3.3.1 Acme Light Dimmer ..............................................................................................................9
3.3.2 Oscorp Door Lock w. UUID ...............................................................................................10
3.3.3 Acme Light Dimmer (S2 only – not SmartStart) .............................................................11
REFERENCES ............................................................................................................................. 13
Table of Tables
6
8
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally. Page iii of 10
Node Provisioning QR Code Format (S2, Smart Start)
1 ABBREVIATIONS
Abbreviation Explanation
2 INTRODUCTION
The S2 specification defines a human-readable DSK string format and requires that a QR code
representation is also provided. This document presents the QR code format for S2 and Smart Start
devices.
The QR code format supports basic S2 devices as well as Smart Start enabled devices applications;
allowing for efficient warehouse logistics and portal-centric commissioning via connected gateways as
well as production bundled kits.
The Z-Wave QR code format is an improved variant of the format originally presented in the Z-Wave
Security 2 specification. The format allows for more compact QR codes.
The table below shows the original S2 QR code and a Smart Start QR code using the improved format of
this specification. The first-generation S2 code only holds the DSK. The Smart Start code further holds
information for device provisioning.
Gen 1 Gen 2
(S2) (S2 & Smart Start)
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 4 of 10
Node Provisioning QR Code Format (S2, Smart Start)
3 REQUIREMENTS
This chapter presents requirements to the format of the Z-Wave S2 and Smart Start QR code.
The QR code MUST NOT contain other characters than the decimal digits 0..9.
The QR code MUST contain the all fields until and including the DSK.
The QR code MUST contain TLV types 0 and 1. Refer to [2].
The QR code MAY contain additional TLV blocks. Refer to [2].
The QR code MUST comply with Table 1.
The QR code MUST be encoded as QR Code Type “Text”.
The QR code SHOULD be encoded with QR Code Error Correction Level “L”.
The Version field defined in Table 1 should not be confused with the QR Version referenced in Table 2.
The QR Version primarily defines the number of pixels in the QR code.
The mandatory TLV types ensure that S2 devices produced prior to the official release of the Smart Start
technology can be firmware upgraded to perform as native Smart Start devices.
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 5 of 10
Node Provisioning QR Code Format (S2, Smart Start)
Example: If the string "0123456789" follows after the Checksum field, the
first two bytes of the SHA-1 value are "87AC". The Checksum value
0x87AC in decimal representation is 34732.
Requested 3 This field carries an 8 bit value as 3 decimal digits.
Keys The value MUST reflect the Requested Keys byte as defined by the S2
specification.
DSK 5 This field MUST carry a full 16 byte DSK as defined by the S2
(8 blocks) specification. The field MUST be organized as 8 groups of 5 decimal
digits without any delimiter characters.
If any data follows the DSK, it MUST be a TypeCritical field.
TypeCritical 2 This field advertises the type of data carried in this TLV block and the
(T) criticality of this information. The Type MUST be encoded in bits 7..1.
The Critical flag MUST be encoded in bit 0.
Refer to section 3.1.1 and [2]. A Length field MUST follow this field.
Len (L) 2 This field MUST advertise the number of decimal digits carried in the
Value field of this TLV block. Refer to 3.1.1 and [2].
A Value field MUST follow this field.
Value (V) (depends Data complying with the advertised type and length. Refer to 3.1.1 and
on type) [2].
Another TLV block MAY follow this field.
If any data follows the Value field, it MUST be a TypeCritical field
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 6 of 10
Node Provisioning QR Code Format (S2, Smart Start)
The TLV fields indicated in [2] MUST be mapped into the QR Code format described below.
When carried in a QR code, the Critical flag and the Type field MUST be combined into one 8-bit value,
where the Type is mapped to bits 7..1 and the Critical flag is mapped to bit 0.
That combined value MUST be in the range 0..99.
In QR Codes, the length MUST indicate the number of decimal digits used to represent the Value field.
In QR Codes, 8 bits value fields with allowed values in the range 0..99 MUST be represented using
decimal representation with 2 decimal digits.
In QR Codes, 8 bits value fields with allowed values higher than 99 MUST be represented using decimal
representation with 3 decimal digits.
In QR Codes, 16 bits value fields MUST be represented using decimal representation with 5 decimal
digits.
In QR Codes, multiple of 16 bits value fields MUST be represented using decimal representation with N
blocks of 5 decimal digits each representing 16 bits.
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 7 of 10
Node Provisioning QR Code Format (S2, Smart Start)
Guidelines for formatting QR Codes are given in [3], it is RECOMMENDED that QR codes are at least
10x10mm.
Printing technology may be the constraining factor when printing on plastics, e.g. a light bulb, causing
QR code edges to be slightly blurred. In that case, the QR code SHOULD be made slightly bigger.
The combination of different TLV blocks may cause the information density to grow. A QR code grows in
significant steps. Assuming that a low level of data correction and that numeric text encoding is used, the
following applies.
Table 2, QR Code block sizes
4 33x33 128..187 A Smart Start code with UUID16 occupies 134 digits
Most Smart Start devices will fit into a QR Version 3 QR code while the addition of significant amounts of
data, such as a UUID16 field, may necessitate QR Version 4.
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 8 of 10
Node Provisioning QR Code Format (S2, Smart Start)
Dec digit
Field name Decimal block Comment
size
Lead-in 90 2 ASCII character “Z”
Version 01 2 Version 1: SmartStart device
Checksum 32782 5 First 16 bits of SHA-1; covering all following bytes.
16 bit decimal representation.
Requested 003 3 Requesting [S2 Unauthenticated] + [S2 Authenticated] keys.
Keys 8 bit decimal representation.
DSK 51525 5 S2 DSK.
35455 (8 blocks) 16 bit decimal block representation.
41424
34445
31323
33435
21222
32425
TypeCritical 00 2 ProductType, 16 bit decimal representation.
Len 10 2 Number of digits in ProductType
ProductType 04353 5 QRProductType:
01537 (2 blocks) Z-Wave Device Type =
[Light Dimmer Switch]
0x11.0x01 = 04353
Z-Wave Installer Icon Type =
LIGHT_DIMMER_SWITCH_PLUGIN =
0x0601 = 01537
16 bit decimal block representation.
TypeCritical 02 2 ProductID, 16 bit decimal representation.
Len 20 2 Number of digits in ProductID
ProductID 65520 5 QRProductID:
00100 (4 blocks) Z-Wave Manufacturer ID =
00003 Acme Corp = 0xFFF0 = 65520
00578 Z-Wave Product Type = 00100 (0x0064)
Z-Wave Product ID = 00003
Z-Wave Application Version =
0x02.0x42 = 00578
16 bit decimal block representation.
The checksum is calculated over all fields following the checksum field, according to section 3.1.
String to be encoded in QR code:
900132782003515253545541424344453132333435212223242500100435301537022065520001000000300578
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 9 of 10
Node Provisioning QR Code Format (S2, Smart Start)
In addition to basic Smart Start QR code fields, this QR code also carries a 16 byte UUID field.
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 10 of 10
Node Provisioning QR Code Format (S2, Smart Start)
Dec digit
Field name Decimal block Comment
size
Lead-in 90 2 ASCII character “Z”
Version 00 2 Version 0: S2 device
Checksum 32782 5 First 16 bits of SHA-1; covering all following bytes.
16 bit decimal representation.
Requested 003 3 Requesting [S2 Unauthenticated] + [S2 Authenticated] keys.
Keys 8 bit decimal representation.
DSK 51525 5 S2 DSK.
35455 (8 blocks) 16 bit decimal block representation.
41424
34445
31323
33435
21222
32425
TypeCritical 00 2 ProductType, 16 bit decimal representation.
Len 10 2 Number of digits in ProductType
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 11 of 10
Node Provisioning QR Code Format (S2, Smart Start)
The checksum is calculated over all fields following the checksum field, according to section 3.1.
String to be encoded in QR code:
900032782003515253545541424344453132333435212223242500100435301537022065520001000000300578
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 12 of 10
Node Provisioning QR Code Format (S2, Smart Start)
REFERENCES
© 2021 Z-Wave Alliance, Inc. All Rights Reserved. This document may only be copied and distributed internally Page 13 of 10