View Source Grizzly.ZWave.QRCode (grizzly v3.0.0)
Z-Wave QR code This module handles Z-Wave QR codes that follow Silicon Labs Software Design Specification SDS13937 and SDS13944.
Link to this section Summary
Functions
Encode device information into Z-Wave QR Code format The output of this is either a 90 byte or 136 byte string that should be put into a QR Code. Z-Wave specifies that the 90-byte code (no UUID16) is made into a 29x29 pixel QR Code. The 136-byte* code (w/ UUID16) should be put into a 33x33 pixel QR Code. QR Codes should be encoded as type "text" with error correction "L". NOTE: SDS13937 has a mistake with the code length. It says 134 bytes, but the UUID16 encode has 2 extra bytes for presentation, so it should be 136.
Link to this section Types
@type t() :: %Grizzly.ZWave.QRCode{ application_version: 0..65535, dsk: Grizzly.ZWave.DSK.t(), manufacturer_id: 0..65535, product_id: 0..65535, product_type: 0..65535, requested_keys: [Grizzly.ZWave.Security.key()], uuid16: nil | Grizzly.ZWave.SmartStart.MetaExtension.UUID16.t(), version: version(), zwave_device_type: {atom(), atom()} | 0..65535, zwave_installer_icon: Grizzly.ZWave.IconType.name() | Grizzly.ZWave.IconType.value() }
Device information
:zwave_device_type
- either {generic_device_type, specific_device_type} or a number
@type version() :: :s2 | :smart_start
QR Code version (S2-only or Smart Start-enabled)
Link to this section Functions
Encode device information into Z-Wave QR Code format The output of this is either a 90 byte or 136 byte string that should be put into a QR Code. Z-Wave specifies that the 90-byte code (no UUID16) is made into a 29x29 pixel QR Code. The 136-byte* code (w/ UUID16) should be put into a 33x33 pixel QR Code. QR Codes should be encoded as type "text" with error correction "L". NOTE: SDS13937 has a mistake with the code length. It says 134 bytes, but the UUID16 encode has 2 extra bytes for presentation, so it should be 136.