zigbee-herdsman 0.36.1 → 0.36.2

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.36.1"
2
+ ".": "0.36.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.36.2](https://github.com/Koenkk/zigbee-herdsman/compare/v0.36.1...v0.36.2) (2024-03-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Ember: Reworked multicast registration on coordinator ([#959](https://github.com/Koenkk/zigbee-herdsman/issues/959)) ([1f9ada9](https://github.com/Koenkk/zigbee-herdsman/commit/1f9ada9ba7a45417118a27140434ceb6c8feef6e))
9
+
3
10
  ## [0.36.1](https://github.com/Koenkk/zigbee-herdsman/compare/v0.36.0...v0.36.1) (2024-03-07)
4
11
 
5
12
 
@@ -52,11 +52,6 @@ export declare class EmberAdapter extends Adapter {
52
52
  */
53
53
  private networkCache;
54
54
  private defaultApsOptions;
55
- /**
56
- * Mirrors the NCP multicast table. null === not in use.
57
- * Index 0 is Green Power and must always remain there.
58
- */
59
- private multicastTable;
60
55
  constructor(networkOptions: TsType.NetworkOptions, serialPortOptions: TsType.SerialPortOptions, backupPath: string, adapterOptions: TsType.AdapterOptions, logger?: LoggerStub);
61
56
  /**
62
57
  * Emitted from @see Ezsp.ezspStackStatusHandler
@@ -217,16 +212,6 @@ export declare class EmberAdapter extends Adapter {
217
212
  * Called right after a NCP reset, right before the creation of endpoints.
218
213
  */
219
214
  private onNCPPostReset;
220
- /**
221
- * Handle changes in groups that needs to be propagated to the NCP multicast table.
222
- *
223
- * XXX: Since Z2M doesn't explicitly check-in downstream when groups are created/removed, we look at outgoing genGroups commands.
224
- * If the NCP doesn't know about groups, it can miss messages from some devices (remotes for example), so we add it...
225
- *
226
- * @param commandId
227
- * @param groupId
228
- */
229
- private onGroupChange;
230
215
  /**
231
216
  * Clear the cached network values (set to invalid values).
232
217
  */
@@ -1 +1 @@
1
- {"version":3,"file":"emberAdapter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/ember/adapter/emberAdapter.ts"],"names":[],"mappings":";AAOA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAC,MAAM,EAAuB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAa,MAAM,cAAc,CAAC;AAExE,OAAO,EAMH,cAAc,EACjB,MAAM,cAAc,CAAC;AAkBtB,OAAO,EASH,kBAAkB,EAgBrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAGH,UAAU,EACV,kBAAkB,EAElB,YAAY,EAIZ,sBAAsB,EACtB,WAAW,EACX,UAAU,EAKb,MAAM,UAAU,CAAC;AAiFlB,MAAM,MAAM,YAAY,GAAG;IAEvB,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,sBAAsB,CAAC;IACnC,MAAM,EAAE,kBAAkB,CAAC;CAE9B,CAAC;AAuCF;;;;;GAKG;AACH,KAAK,iBAAiB,GAAG;IACrB,WAAW,EAAE,UAAU,CAAC;IACxB,GAAG,EAAE,YAAY,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;CAChC,CAAC;AAyLF;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,OAAO;IACrC,2BAA2B;IAC3B,SAAgB,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC;IACnD,iEAAiE;IACjE,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAC5B,OAAO,CAAC,OAAO,CAAkD;IAEjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IACjD,OAAO,CAAC,QAAQ,CAAC,W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,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BlD,8BAA8B,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwCtF,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAmE3F,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BpD,OAAO,CAAC,iBAAiB;CAS5B"}
@@ -160,7 +160,7 @@ const STACK_CONFIGS = {
160
160
  /** <0-255> (Default: 0) @see EzspConfigId.SOURCE_ROUTE_TABLE_SIZE */
161
161
  SOURCE_ROUTE_TABLE_SIZE: 200, // Z3GatewayGPCombo: 100, darkxst: 200
162
162
  /** <1-250> (Default: 8) @see EzspConfigId.MULTICAST_TABLE_SIZE */
163
- MULTICAST_TABLE_SIZE: 16, // darkxst: 16
163
+ MULTICAST_TABLE_SIZE: 16, // darkxst: 16, NOTE: should always be at least enough to register FIXED_ENDPOINTS multicastIds
164
164
  },
165
165
  "zigbeed": {
166
166
  ADDRESS_TABLE_SIZE: 128,
@@ -239,11 +239,6 @@ class EmberAdapter extends __1.Adapter {
239
239
  */
240
240
  networkCache;
241
241
  defaultApsOptions;
242
- /**
243
- * Mirrors the NCP multicast table. null === not in use.
244
- * Index 0 is Green Power and must always remain there.
245
- */
246
- multicastTable;
247
242
  constructor(networkOptions, serialPortOptions, backupPath, adapterOptions, logger) {
248
243
  super(networkOptions, serialPortOptions, backupPath, adapterOptions, logger);
249
244
  // TODO config, should be fine like this for now?
@@ -512,8 +507,6 @@ class EmberAdapter extends __1.Adapter {
512
507
  this.interpanLock = false;
513
508
  this.networkCache = (0, initters_1.initNetworkCache)();
514
509
  this.defaultApsOptions = (enums_2.EmberApsOption.RETRY | enums_2.EmberApsOption.ENABLE_ROUTE_DISCOVERY | enums_2.EmberApsOption.ENABLE_ADDRESS_DISCOVERY);
515
- // always at least length==1 because of allowed MULTICAST_TABLE_SIZE range
516
- this.multicastTable = new Array(STACK_CONFIGS[this.stackConfig].MULTICAST_TABLE_SIZE).fill(null);
517
510
  this.ezsp.once(ezsp_1.EzspEvents.ncpNeedsResetAndInit, this.onNcpNeedsResetAndInit.bind(this));
518
511
  }
519
512
  /**
@@ -648,6 +641,7 @@ class EmberAdapter extends __1.Adapter {
648
641
  * Register fixed endpoints and set any related multicast entries that need to be.
649
642
  */
650
643
  async registerFixedEndpoints() {
644
+ let mcTableIdx = 0;
651
645
  for (const ep of endpoints_1.FIXED_ENDPOINTS) {
652
646
  if (ep.networkIndex !== 0x00) {
653
647
  debug(`Multi-network not currently supported. Skipping endpoint ${JSON.stringify(ep)}.`);
@@ -658,7 +652,8 @@ class EmberAdapter extends __1.Adapter {
658
652
  if (epStatus !== enums_2.EzspStatus.SUCCESS) {
659
653
  // check to see if ezspAddEndpoint needs to be called
660
654
  // if ezspInit is called without NCP reset, ezspAddEndpoint is not necessary and will return an error
661
- const status = (await this.ezsp.ezspAddEndpoint(ep.endpoint, ep.profileId, ep.deviceId, ep.deviceVersion, ep.inClusterList, ep.outClusterList));
655
+ const status = (await this.ezsp.ezspAddEndpoint(ep.endpoint, ep.profileId, ep.deviceId, ep.deviceVersion, ep.inClusterList.slice(), // copy
656
+ ep.outClusterList.slice()));
662
657
  if (status === enums_2.EzspStatus.SUCCESS) {
663
658
  debug(`Registered endpoint "${ep.endpoint}" with status=${enums_2.EzspStatus[status]}.`);
664
659
  }
@@ -669,19 +664,17 @@ class EmberAdapter extends __1.Adapter {
669
664
  else {
670
665
  debug(`Endpoint "${ep.endpoint}" already registered.`);
671
666
  }
672
- if (ep.endpoint === consts_2.GP_ENDPOINT) {
673
- const gpMulticastEntry = {
674
- multicastId: this.greenPowerGroup,
667
+ for (const multicastId of ep.multicastIds) {
668
+ const multicastEntry = {
669
+ multicastId,
675
670
  endpoint: ep.endpoint,
676
671
  networkIndex: ep.networkIndex,
677
672
  };
678
- const status = (await this.ezsp.ezspSetMulticastTableEntry(0, gpMulticastEntry));
673
+ const status = (await this.ezsp.ezspSetMulticastTableEntry(mcTableIdx++, multicastEntry));
679
674
  if (status !== enums_2.EmberStatus.SUCCESS) {
680
- throw new Error(`Failed to register group "Green Power" in multicast table with status=${enums_2.EmberStatus[status]}.`);
675
+ throw new Error(`Failed to register group "${multicastId}" in multicast table with status=${enums_2.EmberStatus[status]}.`);
681
676
  }
682
- // NOTE: ensure GP is always added first in the table
683
- this.multicastTable[0] = gpMulticastEntry;
684
- debug(`Registered multicast table entry: ${JSON.stringify(gpMulticastEntry)}.`);
677
+ debug(`Registered multicast table entry: ${JSON.stringify(multicastEntry)}.`);
685
678
  }
686
679
  }
687
680
  }
@@ -1060,93 +1053,6 @@ class EmberAdapter extends __1.Adapter {
1060
1053
  this.requestQueue.startDispatching();
1061
1054
  this.watchdogCountersHandle = setInterval(this.watchdogCounters.bind(this), WATCHDOG_COUNTERS_FEED_INTERVAL);
1062
1055
  }
1063
- /**
1064
- * Handle changes in groups that needs to be propagated to the NCP multicast table.
1065
- *
1066
- * XXX: Since Z2M doesn't explicitly check-in downstream when groups are created/removed, we look at outgoing genGroups commands.
1067
- * If the NCP doesn't know about groups, it can miss messages from some devices (remotes for example), so we add it...
1068
- *
1069
- * @param commandId
1070
- * @param groupId
1071
- */
1072
- async onGroupChange(commandId, groupId) {
1073
- switch (commandId) {
1074
- case cluster_1.default.genGroups.commands.add.ID: {
1075
- // check if group already in multicast table, should not happen...
1076
- const existingIndex = this.multicastTable.findIndex((e) => ((e != null) && (e.multicastId === groupId)));
1077
- if (existingIndex == -1) {
1078
- // find first unused index
1079
- const newEntryIndex = this.multicastTable.findIndex((e) => (!e));
1080
- if (newEntryIndex != -1) {
1081
- const newEntry = {
1082
- multicastId: groupId,
1083
- endpoint: endpoints_1.FIXED_ENDPOINTS[0].endpoint,
1084
- networkIndex: endpoints_1.FIXED_ENDPOINTS[0].networkIndex,
1085
- };
1086
- const status = (await this.ezsp.ezspSetMulticastTableEntry(newEntryIndex, newEntry));
1087
- if (status !== enums_2.EmberStatus.SUCCESS) {
1088
- console.error(`Failed to register group "${groupId}" in multicast table at index "${newEntryIndex}" with status=${enums_2.EmberStatus[status]}.`);
1089
- }
1090
- else {
1091
- debug(`Registered multicast table entry: ${JSON.stringify(newEntry)}.`);
1092
- }
1093
- // always assume "it worked" to keep sync with Z2M first, NCP second, otherwise trouble might arise... should always work anyway
1094
- this.multicastTable[newEntryIndex] = newEntry;
1095
- }
1096
- else {
1097
- console.warn(`Coordinator multicast table is full (max: ${STACK_CONFIGS[this.stackConfig].MULTICAST_TABLE_SIZE}). `
1098
- + `Some devices in new groups may not work properly, including in group "${groupId}". `
1099
- + `If that happens, please remove groups to be below the limit. `
1100
- + `Removed groups are only removed from coordinator after a Zigbee2MQTT restart.`);
1101
- }
1102
- }
1103
- else {
1104
- debug(`Added group "${groupId}", but local table says it is already registered at index "${existingIndex}". Skipping.`);
1105
- }
1106
- break;
1107
- }
1108
- // NOTE: Can't remove groups, since we watch from command exec to group members, that would trigger from any removed member,
1109
- // even though the group might still exist...
1110
- // Leaving this here (since it's done...), just in case we get better notifications for groups from upstream.
1111
- // case Cluster.genGroups.commands.remove.ID: {
1112
- // const entryIndex = this.multicastTable.findIndex((e) => ((e != null) && (e.multicastId === groupId)));
1113
- // // just in case, never remove GP at i zero, should never be the case...
1114
- // if (entryIndex > 0) {
1115
- // const entry = this.multicastTable[entryIndex];
1116
- // entry.endpoint = 0;// signals "not in use" in the stack
1117
- // const status = (await this.ezsp.ezspSetMulticastTableEntry(entryIndex, entry));
1118
- // if (status !== EmberStatus.SUCCESS) {
1119
- // console.error(`Failed to remove multicast table entry at index "${entryIndex}" for group "${groupId}".`);
1120
- // } else {
1121
- // debug(`Removed multicast table entry at index "${entryIndex}".`);
1122
- // }
1123
- // // always assume "it worked" to keep sync with Z2M first, NCP second, otherwise trouble might arise... should always work anyway
1124
- // this.multicastTable[entryIndex] = null;
1125
- // } else {
1126
- // debug(`Removed group "${groupId}", but local table did not have a reference to it.`);
1127
- // }
1128
- // break;
1129
- // }
1130
- // case Cluster.genGroups.commands.removeAll.ID: {
1131
- // // this can create quite a few NCP calls, but hopefully shouldn't happen often
1132
- // // always skip green power at i==0
1133
- // for (let i = 1; i < this.multicastTable.length; i++) {
1134
- // const entry = this.multicastTable[i];
1135
- // if (entry != null) {
1136
- // entry.endpoint = 0;// signals "not in use" in the stack
1137
- // const status = (await this.ezsp.ezspSetMulticastTableEntry(i, entry));
1138
- // if (status !== EmberStatus.SUCCESS) {
1139
- // console.error(`Failed to remove multicast entry at index "${i}" with status=${EmberStatus[status]}.`);
1140
- // } else {
1141
- // debug(`Removed multicast table entry at index "${i}".`);
1142
- // }
1143
- // }
1144
- // this.multicastTable[i] = null;
1145
- // }
1146
- // break;
1147
- // }
1148
- }
1149
- }
1150
1056
  //---- START Events
1151
1057
  //---- END Events
1152
1058
  //---- START Cache-enabled EZSP wrappers
@@ -2097,8 +2003,8 @@ class EmberAdapter extends __1.Adapter {
2097
2003
  profileID: ep.profileId,
2098
2004
  ID: ep.endpoint,
2099
2005
  deviceID: ep.deviceId,
2100
- inputClusters: ep.inClusterList,
2101
- outputClusters: ep.outClusterList,
2006
+ inputClusters: ep.inClusterList.slice(), // copy
2007
+ outputClusters: ep.outClusterList.slice(), // copy
2102
2008
  };
2103
2009
  }),
2104
2010
  });
@@ -2733,10 +2639,6 @@ class EmberAdapter extends __1.Adapter {
2733
2639
  return enums_2.EmberStatus.MESSAGE_TOO_LONG; // queue will reject
2734
2640
  }
2735
2641
  }
2736
- // track group changes in NCP multicast table
2737
- if (apsFrame.clusterId === cluster_1.default.genGroups.ID) {
2738
- await this.onGroupChange(command.ID, zclFrame.Payload.groupid);
2739
- }
2740
2642
  debug(`~~~> [ZCL to=${networkAddress} apsFrame=${JSON.stringify(apsFrame)} header=${JSON.stringify(zclFrame.Header)}]`);
2741
2643
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2742
2644
  const [status, messageTag] = (await this.ezsp.send(enums_2.EmberOutgoingMessageType.DIRECT, networkAddress, apsFrame, data, 0, // alias