Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use separate S2 keys for ZWLR #6620

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/api/driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,23 @@ interface ZWaveOptions extends ZWaveHostOptions {
};
/**
* Specify the security keys to use for encryption. Each one must be a Buffer of exactly 16 bytes.
* Specify the security keys to use for encryption (Z-Wave Classic). Each one must be a Buffer of exactly 16 bytes.
*/
securityKeys?: {
S2_Unauthenticated?: Buffer;
S2_Authenticated?: Buffer;
S2_AccessControl?: Buffer;
S2_Authenticated?: Buffer;
S2_Unauthenticated?: Buffer;
S0_Legacy?: Buffer;
};
/**
* Specify the security keys to use for encryption (Z-Wave Long Range). Each one must be a Buffer of exactly 16 bytes.
*/
securityKeysLongRange?: {
S2_AccessControl?: Buffer;
S2_Authenticated?: Buffer;
};
/**
* Defines the callbacks that are necessary to trigger user interaction during S2 inclusion.
* If not given, nodes won't be included using S2, unless matching provisioning entries exists.
Expand Down
7 changes: 4 additions & 3 deletions docs/getting-started/long-range.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Z-Wave Long Range (ZWLR) is an addition to Z-Wave, that allows for a massively i
There are a few things applications need to be aware of to support Long Range using Z-Wave JS.

1. ZWLR node IDs start at 256. This can be used to distinguish between ZWLR and classic Z-Wave nodes.
2. ZWLR inclusion works exclusively through [Smart Start](getting-started/security-s2#smartstart).
1. ZWLR has only two security classes, S2 Access Control and S2 Authenticated. Both must use a different security key than their Z-Wave Classic counterparts. To configure them, use the `securityKeysLongRange` property of the [`ZWaveOptions`](../api/driver#zwaveoptions)
1. ZWLR inclusion works exclusively through [Smart Start](../getting-started/security-s2#smartstart).
\
ZWLR nodes advertise support for Long Range in the `supportedProtocols` field of the `QRProvisioningInformation` object (see [here](api/utils#other-qr-codes)). When this field is present, the user **MUST** have the choice between the advertised protocols. Currently this means deciding between including the node via Z-Wave Classic (mesh) or Z-Wave Long Range (no mesh).\
To include a node via ZWLR, set the `protocol` field of the `PlannedProvisioningEntry` to `Protocols.ZWaveLongRange` when [provisioning the node](api/controller#provisionsmartstartnode).
ZWLR nodes advertise support for Long Range in the `supportedProtocols` field of the `QRProvisioningInformation` object (see [here](../api/utils#other-qr-codes)). When this field is present, the user **MUST** have the choice between the advertised protocols. Currently this means deciding between including the node via Z-Wave Classic (mesh) or Z-Wave Long Range (no mesh).\
To include a node via ZWLR, set the `protocol` field of the `PlannedProvisioningEntry` to `Protocols.ZWaveLongRange` when [provisioning the node](../api/controller#provisionsmartstartnode).
Loading