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

feat: support Security S2 Multicast and sending large commands with Transport Service CC #5475

Merged
merged 18 commits into from
Mar 7, 2023

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Feb 16, 2023

This PR implements support for Security S2 Multicast and the entire machinery that's necessary for it, including the sending half of Transport Service CC.

It also implements the wait-for-nonce transmit verification strategy I mentioned in #5471 (comment), for cases where we send an S2-encrypted, unsupervised, singlecast SET-type command. This will introduce short delays for nodes that support S2, but have flawed Supervision support that had to be disabled.

Furthermore, getBroadcastNode and getMulticastGroup have been deprecated. Instead, two new methods were added, which automatically group the nodes by security class:

getMulticastGroups(nodeIDs: number[]): VirtualNode[]
getBroadcastNodes(): VirtualNode[]

This makes it possible to send multicasts to nodes with mixed security classes (1 multicast per security class). Broadcast may desugar to several multicasts, unless only insecure nodes are in the network.
Nodes using S0 are ignored, because they don't support either.

TODO:

  • bunch of FIXME comments
  • actually sending
  • automatically choosing Supervision
  • waiting after S2 singlecast without Supervision
  • SPAN+MPAN extension requires Transport Service :)

fixes: #3270
fixes: #4835
fixes: #5490
fixes: #1119

@AlCalzone AlCalzone changed the title feat: Security S2 Multicast feat: support Security S2 Multicast Feb 16, 2023
@AlCalzone AlCalzone changed the title feat: support Security S2 Multicast feat: support Security S2 Multicast and sending large commands with Transport Service CC Feb 27, 2023
@AlCalzone AlCalzone marked this pull request as ready for review February 27, 2023 14:21
@AlCalzone
Copy link
Member Author

3f34d9d broke the tests

@AlCalzone AlCalzone merged commit cd0d230 into master Mar 7, 2023
@AlCalzone AlCalzone deleted the s2-multicast branch March 7, 2023 11:47
AlCalzone added a commit that referenced this pull request Mar 7, 2023
### Features
* Add `stateful` and `secret` flags to `ValueMetadata` (#5467)
* Added support for `Security S2` Multicast (#5475)
* Large commands are now automatically fragmented using `Transport Service CC`. If this is not possible, the attempt will throw instead of relying on the stick's response (#5475)

### Bugfixes
* Queries for invalid enum members are skipped during the interview. This could happen for some CCs when the device incorrectly encoded a support bitmask (#5465)
* Correctly handle the response when requesting Indicator ID 0 (#5470)
* Only configure timezone for `Schedule Entry Lock CC` if supported (#5484)
* `invokeCCAPI` now officially accepts both the CC name and ID, e.g. `"Basic"` and `0x20`. At some point this was accidentally supported and later broken. (#5500)
* The `currentMode` property for `Door Lock CC` is readonly (#5507)
* Always return `false` for `canSleep` on the controller node, even if the controller claims otherwise (#5522)

### Config file changes
* Force-add Basic CC as supported for HeatIt Z-Smoke 230V (#5436)
* Add fingerprints for Long-Range capable ZEN51/52 variants (#5524)
* Add wiDom C7 Energy Driven Switch (#5180)
* Add Sunricher SR-SV9080A-A (#5486)
* Add Namron SR-ZV9032A-EU (#5474)
* Correct Minoston MR40Z parameters to match device (#5503)
* Add params, metadata, associations to Merten 507801 (#5478)
* Update Dome Wireless Siren (#5488)
* Add Nexa ZPR-111 metered plug-in switch (#5512)
* Update device config files for some HomeSeer products (#5515)
* Preserve root endpoint with master switch and total consumption for Aeotec DSC11 (#5499)
* Correct warm and cold white config parameter for Aeotec ZWA001 (#5487)
* Override setpoint precision for Airzone Aidoo Control HVAC unit (#5483)
* Correct LED Indicator param for Honeywell 39337 / 39444 / ZW4103 (#5461)

### Changes under the hood
* All remaining packages now use `ava` for testing instead of `jest` (#5460, #5459, #5454, #5452, #5447, #5443)
* The mock serialport has been moved to the `@zwave-js/serial/mock` subpath export (#5455)
* `createAndStartDriverWithMockPort` was moved to the `zwave-js/Testing` subpath export (#5458)
* The `watch` tasks used during development are now working again
* Added `test:dirty` and `test:watch` scripts to run/watch only tests that are affected by changed files since the last commit (#5468)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant