zwave-js 15.13.0 → 15.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/build/cjs/lib/_version.d.ts +1 -1
  2. package/build/cjs/lib/_version.js +1 -1
  3. package/build/cjs/lib/_version.js.map +1 -1
  4. package/build/cjs/lib/controller/Controller.d.ts +5 -0
  5. package/build/cjs/lib/controller/Controller.js +27 -13
  6. package/build/cjs/lib/controller/Controller.js.map +2 -2
  7. package/build/cjs/lib/driver/Driver.js +16 -10
  8. package/build/cjs/lib/driver/Driver.js.map +2 -2
  9. package/build/cjs/lib/driver/MessageGenerators.js +0 -3
  10. package/build/cjs/lib/driver/MessageGenerators.js.map +2 -2
  11. package/build/cjs/lib/driver/mDNSDiscovery/node.js +2 -1
  12. package/build/cjs/lib/driver/mDNSDiscovery/node.js.map +2 -2
  13. package/build/cjs/lib/log/Driver.js +13 -0
  14. package/build/cjs/lib/log/Driver.js.map +2 -2
  15. package/build/cjs/lib/node/Node.js +1 -1
  16. package/build/cjs/lib/node/Node.js.map +2 -2
  17. package/build/cjs/lib/node/VirtualEndpoint.js +6 -4
  18. package/build/cjs/lib/node/VirtualEndpoint.js.map +2 -2
  19. package/build/cjs/lib/node/VirtualNode.d.ts +13 -3
  20. package/build/cjs/lib/node/VirtualNode.js +36 -12
  21. package/build/cjs/lib/node/VirtualNode.js.map +3 -3
  22. package/build/cjs/lib/zniffer/MPDU.js +16 -20
  23. package/build/cjs/lib/zniffer/MPDU.js.map +2 -2
  24. package/build/cjs/lib/zniffer/ZLFAttachment.d.ts +77 -0
  25. package/build/cjs/lib/zniffer/ZLFAttachment.js +219 -0
  26. package/build/cjs/lib/zniffer/ZLFAttachment.js.map +7 -0
  27. package/build/cjs/lib/zniffer/ZLFEntry.d.ts +12 -0
  28. package/build/cjs/lib/zniffer/ZLFEntry.js +169 -0
  29. package/build/cjs/lib/zniffer/ZLFEntry.js.map +7 -0
  30. package/build/cjs/lib/zniffer/Zniffer.d.ts +6 -0
  31. package/build/cjs/lib/zniffer/Zniffer.js +27 -117
  32. package/build/cjs/lib/zniffer/Zniffer.js.map +2 -2
  33. package/build/esm/lib/_version.d.ts +1 -1
  34. package/build/esm/lib/_version.js +1 -1
  35. package/build/esm/lib/controller/Controller.d.ts +5 -0
  36. package/build/esm/lib/controller/Controller.d.ts.map +1 -1
  37. package/build/esm/lib/controller/Controller.js +39 -17
  38. package/build/esm/lib/controller/Controller.js.map +1 -1
  39. package/build/esm/lib/driver/Driver.d.ts.map +1 -1
  40. package/build/esm/lib/driver/Driver.js +20 -13
  41. package/build/esm/lib/driver/Driver.js.map +1 -1
  42. package/build/esm/lib/driver/MessageGenerators.d.ts.map +1 -1
  43. package/build/esm/lib/driver/MessageGenerators.js +0 -5
  44. package/build/esm/lib/driver/MessageGenerators.js.map +1 -1
  45. package/build/esm/lib/driver/mDNSDiscovery/node.d.ts.map +1 -1
  46. package/build/esm/lib/driver/mDNSDiscovery/node.js +4 -1
  47. package/build/esm/lib/driver/mDNSDiscovery/node.js.map +1 -1
  48. package/build/esm/lib/log/Driver.d.ts.map +1 -1
  49. package/build/esm/lib/log/Driver.js +20 -1
  50. package/build/esm/lib/log/Driver.js.map +1 -1
  51. package/build/esm/lib/node/Node.d.ts.map +1 -1
  52. package/build/esm/lib/node/Node.js +5 -1
  53. package/build/esm/lib/node/Node.js.map +1 -1
  54. package/build/esm/lib/node/VirtualEndpoint.d.ts.map +1 -1
  55. package/build/esm/lib/node/VirtualEndpoint.js +10 -9
  56. package/build/esm/lib/node/VirtualEndpoint.js.map +1 -1
  57. package/build/esm/lib/node/VirtualNode.d.ts +13 -3
  58. package/build/esm/lib/node/VirtualNode.d.ts.map +1 -1
  59. package/build/esm/lib/node/VirtualNode.js +29 -12
  60. package/build/esm/lib/node/VirtualNode.js.map +1 -1
  61. package/build/esm/lib/zniffer/MPDU.d.ts.map +1 -1
  62. package/build/esm/lib/zniffer/MPDU.js +16 -18
  63. package/build/esm/lib/zniffer/MPDU.js.map +1 -1
  64. package/build/esm/lib/zniffer/ZLFAttachment.d.ts +77 -0
  65. package/build/esm/lib/zniffer/ZLFAttachment.d.ts.map +1 -0
  66. package/build/esm/lib/zniffer/ZLFAttachment.js +183 -0
  67. package/build/esm/lib/zniffer/ZLFAttachment.js.map +1 -0
  68. package/build/esm/lib/zniffer/ZLFEntry.d.ts +12 -0
  69. package/build/esm/lib/zniffer/ZLFEntry.d.ts.map +1 -0
  70. package/build/esm/lib/zniffer/ZLFEntry.js +155 -0
  71. package/build/esm/lib/zniffer/ZLFEntry.js.map +1 -0
  72. package/build/esm/lib/zniffer/Zniffer.d.ts +6 -0
  73. package/build/esm/lib/zniffer/Zniffer.d.ts.map +1 -1
  74. package/build/esm/lib/zniffer/Zniffer.js +37 -130
  75. package/build/esm/lib/zniffer/Zniffer.js.map +1 -1
  76. package/package.json +9 -9
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.13.0";
1
+ export declare const PACKAGE_VERSION = "15.15.0";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  PACKAGE_VERSION: () => PACKAGE_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const PACKAGE_VERSION = "15.13.0";
25
+ const PACKAGE_VERSION = "15.15.0";
26
26
  const PACKAGE_NAME = "zwave-js";
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/_version.ts"],
4
- "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.13.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
4
+ "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.15.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -208,6 +208,11 @@ export declare class ZWaveController extends TypedEventTarget<ControllerEventCal
208
208
  /** Returns whether the SmartStart provisioning list contains active entries that have not been included yet */
209
209
  hasPlannedProvisioningEntries(): boolean;
210
210
  private isLongRangeCapable;
211
+ /**
212
+ * Helper function to determine whether the controller is capable of EU Long Range,
213
+ * possibly without advertising it
214
+ */
215
+ private isEULongRangeCapable;
211
216
  /** Tries to determine the LR capable replacement of the given region. If none is found, the given region is returned. */
212
217
  private tryGetLRCapableRegion;
213
218
  private createValueDBForNode;
@@ -477,10 +477,6 @@ let ZWaveController = (() => {
477
477
  if (nodeIDs.length === 0) {
478
478
  throw new import_core.ZWaveError("Cannot create an empty multicast group", import_core.ZWaveErrorCodes.Argument_Invalid);
479
479
  }
480
- const firstNodeIsLR = (0, import_core.isLongRangeNodeId)(nodeIDs[0]);
481
- if (nodeIDs.some((id) => (0, import_core.isLongRangeNodeId)(id) !== firstNodeIsLR)) {
482
- throw new import_core.ZWaveError("Cannot create a multicast group with mixed Z-Wave Classic and Z-Wave Long Range nodes", import_core.ZWaveErrorCodes.Argument_Invalid);
483
- }
484
480
  const nodes = nodeIDs.map((id) => this._nodes.getOrThrow(id));
485
481
  return new import_VirtualNode.VirtualNode(void 0, this.driver, nodes);
486
482
  }
@@ -691,6 +687,13 @@ let ZWaveController = (() => {
691
687
  isLongRangeCapable() {
692
688
  return this.isSerialAPISetupCommandSupported(import_serialapi.SerialAPISetupCommand.SetNodeIDType);
693
689
  }
690
+ /**
691
+ * Helper function to determine whether the controller is capable of EU Long Range,
692
+ * possibly without advertising it
693
+ */
694
+ isEULongRangeCapable() {
695
+ return this.isLongRangeCapable() && typeof this._zwaveChipType === "string" && (0, import_core.getChipTypeAndVersion)(this._zwaveChipType)?.type === 8 && this.sdkVersionGte("7.22");
696
+ }
694
697
  /** Tries to determine the LR capable replacement of the given region. If none is found, the given region is returned. */
695
698
  tryGetLRCapableRegion(region) {
696
699
  if (this._supportedRegions) {
@@ -706,6 +709,9 @@ let ZWaveController = (() => {
706
709
  if (region === import_core.RFRegion.USA && this.isLongRangeCapable()) {
707
710
  return import_core.RFRegion["USA (Long Range)"];
708
711
  }
712
+ if (region === import_core.RFRegion.Europe && this.isEULongRangeCapable()) {
713
+ return import_core.RFRegion["Europe (Long Range)"];
714
+ }
709
715
  return region;
710
716
  }
711
717
  /**
@@ -2866,7 +2872,7 @@ let ZWaveController = (() => {
2866
2872
  try {
2867
2873
  associatedNodes = (0, import_arrays.distinct)([
2868
2874
  ...self.getAssociations({ nodeId: node.id }).values()
2869
- ].flatMap((assocs) => assocs.map((a) => a.nodeId))).filter((id) => id !== self._ownNodeId).filter((id) => id !== node.id).sort();
2875
+ ].flatMap((assocs) => assocs.map((a) => a.nodeId))).filter((id) => id !== self._ownNodeId).filter((id) => id !== node.id).filter((id) => id >= 1 && id <= import_core.MAX_NODES).filter((id) => self.nodes.has(id)).sort();
2870
2876
  } catch {
2871
2877
  }
2872
2878
  if (associatedNodes.length > 0) {
@@ -2887,11 +2893,10 @@ let ZWaveController = (() => {
2887
2893
  }
2888
2894
  if (attempt === maxAttempts) {
2889
2895
  self.driver.controllerLog.logNode(node.id, {
2890
- message: `rebuilding routes failed: failed to assign return route after ${maxAttempts} attempts`,
2896
+ message: `failed to assign return route to node ${destinationNodeId} after ${maxAttempts} attempts, continuing with other targets...`,
2891
2897
  level: "warn",
2892
2898
  direction: "none"
2893
2899
  });
2894
- return false;
2895
2900
  }
2896
2901
  }
2897
2902
  }
@@ -3839,7 +3844,16 @@ let ZWaveController = (() => {
3839
3844
  }
3840
3845
  }
3841
3846
  } else if (strategy === import_Inclusion.InclusionStrategy.Security_S0) {
3842
- bootstrapFailure = await this.secureBootstrapS0(newNode, true);
3847
+ bootstrapFailure = await this.secureBootstrapS0(
3848
+ newNode,
3849
+ // When replacing a node, we don't receive NIF, so we have to make
3850
+ // some assumptions, just like we do for Security S2 above.
3851
+ // We don't know if the node is a controller, so just assume it is not.
3852
+ false,
3853
+ // Also we must assume that the node supports S0, because we
3854
+ // don't know any better at this point.
3855
+ true
3856
+ );
3843
3857
  if (bootstrapFailure == void 0) {
3844
3858
  const actualSecurityClass = newNode.getHighestSecurityClass();
3845
3859
  if (actualSecurityClass == void 0 || actualSecurityClass < import_core.SecurityClass.S0_Legacy) {
@@ -3960,11 +3974,11 @@ let ZWaveController = (() => {
3960
3974
  ret.add(import_core.RFRegion["USA (Long Range)"]);
3961
3975
  if (filterSubsets)
3962
3976
  ret.delete(import_core.RFRegion.USA);
3963
- if (typeof this._zwaveChipType === "string" && (0, import_core.getChipTypeAndVersion)(this._zwaveChipType)?.type === 8 && this.sdkVersionGte("7.22")) {
3964
- ret.add(import_core.RFRegion["Europe (Long Range)"]);
3965
- if (filterSubsets)
3966
- ret.delete(import_core.RFRegion.Europe);
3967
- }
3977
+ }
3978
+ if (this.isEULongRangeCapable()) {
3979
+ ret.add(import_core.RFRegion["Europe (Long Range)"]);
3980
+ if (filterSubsets)
3981
+ ret.delete(import_core.RFRegion.Europe);
3968
3982
  }
3969
3983
  return [...ret].sort((a, b) => a - b);
3970
3984
  }