@zwave-js/cc 15.24.3 → 15.25.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 (127) hide show
  1. package/build/cjs/cc/AssociationCC.d.ts +1 -1
  2. package/build/cjs/cc/AssociationCC.js +6 -3
  3. package/build/cjs/cc/AssociationCC.js.map +2 -2
  4. package/build/cjs/cc/AssociationGroupInfoCC.js +5 -1
  5. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  6. package/build/cjs/cc/ColorSwitchCC.js +5 -2
  7. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  8. package/build/cjs/cc/ConfigurationCC.d.ts +14 -3
  9. package/build/cjs/cc/ConfigurationCC.js +65 -19
  10. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  11. package/build/cjs/cc/IndicatorCC.js +7 -3
  12. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  13. package/build/cjs/cc/IrrigationCC.js +6 -2
  14. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  15. package/build/cjs/cc/MeterCC.js +6 -1
  16. package/build/cjs/cc/MeterCC.js.map +2 -2
  17. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +1 -1
  18. package/build/cjs/cc/MultiChannelAssociationCC.js +6 -3
  19. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  20. package/build/cjs/cc/MultiChannelCC.d.ts +1 -1
  21. package/build/cjs/cc/MultiChannelCC.js +4 -2
  22. package/build/cjs/cc/MultiChannelCC.js.map +2 -2
  23. package/build/cjs/cc/MultilevelSensorCC.js +7 -3
  24. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  25. package/build/cjs/cc/NotificationCC.js +9 -2
  26. package/build/cjs/cc/NotificationCC.js.map +2 -2
  27. package/build/cjs/cc/SceneControllerConfigurationCC.js +1 -0
  28. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  29. package/build/cjs/cc/SecurityCC.d.ts +2 -2
  30. package/build/cjs/cc/SecurityCC.js +6 -4
  31. package/build/cjs/cc/SecurityCC.js.map +2 -2
  32. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +1 -1
  33. package/build/cjs/cc/ThermostatOperatingStateCC.js +2 -2
  34. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  35. package/build/cjs/cc/ThermostatSetpointCC.js +8 -3
  36. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  37. package/build/cjs/cc/TransportServiceCC.d.ts +0 -14
  38. package/build/cjs/cc/TransportServiceCC.js +0 -41
  39. package/build/cjs/cc/TransportServiceCC.js.map +2 -2
  40. package/build/cjs/cc/UserCodeCC.js +5 -1
  41. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  42. package/build/cjs/cc/UserCredentialCC.d.ts +2 -2
  43. package/build/cjs/cc/UserCredentialCC.js +7 -3
  44. package/build/cjs/cc/UserCredentialCC.js.map +2 -2
  45. package/build/cjs/cc/VersionCC.js +7 -5
  46. package/build/cjs/cc/VersionCC.js.map +2 -2
  47. package/build/cjs/cc/WindowCoveringCC.js +6 -4
  48. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  49. package/build/cjs/lib/CommandClass.d.ts +15 -6
  50. package/build/cjs/lib/CommandClass.js +10 -5
  51. package/build/cjs/lib/CommandClass.js.map +2 -2
  52. package/build/cjs/lib/traits.d.ts +16 -1
  53. package/build/esm/cc/AssociationCC.d.ts +1 -1
  54. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  55. package/build/esm/cc/AssociationCC.js +6 -3
  56. package/build/esm/cc/AssociationCC.js.map +1 -1
  57. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  58. package/build/esm/cc/AssociationGroupInfoCC.js +7 -1
  59. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  60. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  61. package/build/esm/cc/ColorSwitchCC.js +5 -2
  62. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  63. package/build/esm/cc/ConfigurationCC.d.ts +14 -3
  64. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  65. package/build/esm/cc/ConfigurationCC.js +98 -25
  66. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  67. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  68. package/build/esm/cc/IndicatorCC.js +8 -3
  69. package/build/esm/cc/IndicatorCC.js.map +1 -1
  70. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  71. package/build/esm/cc/IrrigationCC.js +6 -2
  72. package/build/esm/cc/IrrigationCC.js.map +1 -1
  73. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  74. package/build/esm/cc/MeterCC.js +6 -1
  75. package/build/esm/cc/MeterCC.js.map +1 -1
  76. package/build/esm/cc/MultiChannelAssociationCC.d.ts +1 -1
  77. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  78. package/build/esm/cc/MultiChannelAssociationCC.js +6 -3
  79. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  80. package/build/esm/cc/MultiChannelCC.d.ts +1 -1
  81. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  82. package/build/esm/cc/MultiChannelCC.js +4 -2
  83. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  84. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  85. package/build/esm/cc/MultilevelSensorCC.js +7 -3
  86. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  87. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  88. package/build/esm/cc/NotificationCC.js +9 -2
  89. package/build/esm/cc/NotificationCC.js.map +1 -1
  90. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  91. package/build/esm/cc/SceneControllerConfigurationCC.js +1 -0
  92. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  93. package/build/esm/cc/SecurityCC.d.ts +2 -2
  94. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  95. package/build/esm/cc/SecurityCC.js +7 -4
  96. package/build/esm/cc/SecurityCC.js.map +1 -1
  97. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +1 -1
  98. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  99. package/build/esm/cc/ThermostatOperatingStateCC.js +2 -2
  100. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  101. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  102. package/build/esm/cc/ThermostatSetpointCC.js +10 -3
  103. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  104. package/build/esm/cc/TransportServiceCC.d.ts +0 -14
  105. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  106. package/build/esm/cc/TransportServiceCC.js +1 -54
  107. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  108. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  109. package/build/esm/cc/UserCodeCC.js +4 -0
  110. package/build/esm/cc/UserCodeCC.js.map +1 -1
  111. package/build/esm/cc/UserCredentialCC.d.ts +2 -2
  112. package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
  113. package/build/esm/cc/UserCredentialCC.js +7 -4
  114. package/build/esm/cc/UserCredentialCC.js.map +1 -1
  115. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  116. package/build/esm/cc/VersionCC.js +12 -6
  117. package/build/esm/cc/VersionCC.js.map +1 -1
  118. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  119. package/build/esm/cc/WindowCoveringCC.js +7 -5
  120. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  121. package/build/esm/lib/CommandClass.d.ts +15 -6
  122. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  123. package/build/esm/lib/CommandClass.js +10 -5
  124. package/build/esm/lib/CommandClass.js.map +1 -1
  125. package/build/esm/lib/traits.d.ts +16 -1
  126. package/build/esm/lib/traits.d.ts.map +1 -1
  127. package/package.json +4 -4
@@ -105,7 +105,7 @@ export declare class AssociationCCReport extends AssociationCC {
105
105
  nodeIds: number[];
106
106
  reportsToFollow: number;
107
107
  getPartialCCSessionId(): Record<string, any> | undefined;
108
- expectMoreMessages(): boolean;
108
+ getRemainingSegments(): number | undefined;
109
109
  mergePartialCCs(partials: AssociationCCReport[], _ctx: CCParsingContext): Promise<void>;
110
110
  serialize(ctx: CCEncodingContext): Promise<Bytes>;
111
111
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
@@ -332,7 +332,9 @@ let AssociationCC = (() => {
332
332
  });
333
333
  return;
334
334
  }
335
- await this.refreshValues(ctx);
335
+ await this.refreshValues(ctx, {
336
+ onProgress: /* @__PURE__ */ __name((completed, total) => node.reportInterviewProgress(completed, total), "onProgress")
337
+ });
336
338
  if (endpoint.supportsCC(import_core.CommandClasses["Multi Channel Association"])) {
337
339
  ctx.logNode(node.id, {
338
340
  endpoint: this.endpointIndex,
@@ -369,6 +371,7 @@ currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
369
371
  direction: "inbound"
370
372
  });
371
373
  }
374
+ options?.onProgress?.(groupId, groupCount);
372
375
  }
373
376
  }
374
377
  };
@@ -542,8 +545,8 @@ let AssociationCCReport = (() => {
542
545
  getPartialCCSessionId() {
543
546
  return { groupId: this.groupId };
544
547
  }
545
- expectMoreMessages() {
546
- return this.reportsToFollow > 0;
548
+ getRemainingSegments() {
549
+ return this.reportsToFollow;
547
550
  }
548
551
  mergePartialCCs(partials, _ctx) {
549
552
  this.nodeIds = [...partials, this].map((report) => report.nodeIds).reduce((prev, cur) => prev.concat(...cur), []);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/AssociationCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./AssociationCC._validateArgs.js\";\nconst { validateArgs_AssociationCCAPI_reportGroupCount, validateArgs_AssociationCCAPI_getGroup, validateArgs_AssociationCCAPI_sendReport, validateArgs_AssociationCCAPI_addNodeIds, validateArgs_AssociationCCAPI_removeNodeIds, validateArgs_AssociationCCAPI_removeNodeIdsFromAllGroups, validateArgs_AssociationCCAPI_getSpecificGroup, validateArgs_AssociationCCAPI_reportSpecificGroup } = __validateArgs;\nimport type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type EndpointId, type GetValueDB, MAX_NODES, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { distinct } from \"alcalzone-shared/arrays\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type AssociationAddress, AssociationCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { AssociationCCValues } from \"./_CCValues.generated.js\";\nexport { AssociationCCValues };\n// @noSetValueAPI\n@API(CommandClasses.Association)\nexport class AssociationCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: AssociationCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case AssociationCommand.Get:\n case AssociationCommand.Set:\n case AssociationCommand.Report:\n case AssociationCommand.Remove:\n case AssociationCommand.SupportedGroupingsGet:\n case AssociationCommand.SupportedGroupingsReport:\n return true;\n case AssociationCommand.SpecificGroupGet:\n case AssociationCommand.SpecificGroupReport:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n /**\n * Returns the number of association groups a node supports.\n * Association groups are consecutive, starting at 1.\n */\n public async getGroupCount(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsGet);\n const cc = new AssociationCCSupportedGroupingsGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<AssociationCCSupportedGroupingsReport>(cc, this.commandOptions);\n if (response)\n return response.groupCount;\n }\n @validateArgs_AssociationCCAPI_reportGroupCount()\n public async reportGroupCount(groupCount: number): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsReport);\n const cc = new AssociationCCSupportedGroupingsReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupCount,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Returns information about an association group.\n */\n @validateArgs_AssociationCCAPI_getGroup()\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getGroup(groupId: number) {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Get);\n const cc = new AssociationCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n });\n const response = await this.host.sendCommand<AssociationCCReport>(cc, this.commandOptions);\n if (response) {\n return {\n maxNodes: response.maxNodes,\n nodeIds: response.nodeIds,\n };\n }\n }\n @validateArgs_AssociationCCAPI_sendReport()\n public async sendReport(options: AssociationCCReportOptions): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Report);\n const cc = new AssociationCCReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Adds new nodes to an association group\n */\n @validateArgs_AssociationCCAPI_addNodeIds()\n public async addNodeIds(groupId: number, ...nodeIds: number[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Set);\n const cc = new AssociationCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n nodeIds,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Removes nodes from an association group\n */\n @validateArgs_AssociationCCAPI_removeNodeIds()\n public async removeNodeIds(options: AssociationCCRemoveOptions): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);\n // Validate options\n if (!options.groupId) {\n if (this.version === 1) {\n throw new ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n else if (options.groupId < 0) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n const cc = new AssociationCCRemove({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Removes nodes from all association groups\n */\n @validateArgs_AssociationCCAPI_removeNodeIdsFromAllGroups()\n public async removeNodeIdsFromAllGroups(nodeIds: number[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);\n if (this.version >= 2) {\n // The node supports bulk removal\n return this.removeNodeIds({ nodeIds, groupId: 0 });\n }\n else {\n // We have to remove the node manually from all groups\n const groupCount = this.tryGetValueDB()?.getValue<number>(AssociationCCValues.groupCount.endpoint(this.endpoint.index)) ?? 0;\n for (let groupId = 1; groupId <= groupCount; groupId++) {\n // TODO: evaluate intermediate supervision results\n await this.removeNodeIds({ nodeIds, groupId });\n }\n }\n }\n /**\n * Request the association group that represents the most recently detected button press\n */\n @validateArgs_AssociationCCAPI_getSpecificGroup()\n public async getSpecificGroup(): Promise<number | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupGet);\n const cc = new AssociationCCSpecificGroupGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<AssociationCCSpecificGroupReport>(cc, this.commandOptions);\n return response?.group;\n }\n /**\n * Report the association group that represents the most recently detected button press\n */\n @validateArgs_AssociationCCAPI_reportSpecificGroup()\n public async reportSpecificGroup(group: number): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupReport);\n const cc = new AssociationCCSpecificGroupReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n group,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Association)\n@implementedVersion(4)\n@ccValues(AssociationCCValues)\nexport class AssociationCC extends CommandClass {\n declare ccCommand: AssociationCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // AssociationCC must be interviewed after Z-Wave+ if that is supported\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses[\"Z-Wave Plus Info\"],\n // We need information about endpoints to correctly configure the lifeline associations\n CommandClasses[\"Multi Channel\"],\n ];\n }\n /**\n * Returns the number of association groups reported by the node/endpoint.\n * This only works AFTER the interview process\n */\n public static getGroupCountCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;\n }\n /**\n * Returns the number of nodes an association group supports.\n * This only works AFTER the interview process\n */\n public static getMaxNodesCached(ctx: GetValueDB & GetDeviceConfig, endpoint: EndpointId, groupId: number): number {\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index))\n // If the information is not available, fall back to the configuration file if possible\n // This can happen on some legacy devices which have \"hidden\" association groups\n ?? ctx\n .getDeviceConfig?.(endpoint.nodeId)\n ?.getAssociationConfigForEndpoint(endpoint.index, groupId)\n ?.maxNodes\n ?? 0);\n }\n /**\n * Returns all the destinations of all association groups reported by the node/endpoint.\n * This only works AFTER the interview process\n */\n public static getAllDestinationsCached(ctx: GetValueDB, endpoint: EndpointId): ReadonlyMap<number, readonly AssociationAddress[]> {\n const ret = new Map<number, AssociationAddress[]>();\n const groupCount = this.getGroupCountCached(ctx, endpoint);\n const valueDB = ctx.getValueDB(endpoint.nodeId);\n for (let i = 1; i <= groupCount; i++) {\n // Add all root destinations\n const nodes = valueDB.getValue<number[]>(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];\n ret.set(i, \n // Filter out duplicates\n distinct(nodes).map((nodeId) => ({ nodeId })));\n }\n return ret;\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Even if Multi Channel Association is supported, we still need to query the number of\n // normal association groups since some devices report more association groups than\n // multi channel association groups\n // Find out how many groups are supported\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying number of association groups...\",\n direction: \"outbound\",\n });\n const groupCount = await api.getGroupCount();\n if (groupCount != undefined) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `supports ${groupCount} association groups`,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying association groups timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n // Query each association group for its members\n await this.refreshValues(ctx);\n // Skip the remaining Association CC interview in favor of Multi Channel Association if possible\n if (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `${this.constructor.name}: delaying configuration of lifeline associations until after Multi Channel Association interview...`,\n direction: \"none\",\n });\n this.setInterviewComplete(ctx, true);\n return;\n }\n // And set up lifeline associations\n await ccUtils.configureLifelineAssociations(ctx, endpoint);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n const groupCount = AssociationCC.getGroupCountCached(ctx, endpoint);\n // Query each association group\n for (let groupId = 1; groupId <= groupCount; groupId++) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying association group #${groupId}...`,\n direction: \"outbound\",\n });\n const group = await api.getGroup(groupId);\n if (group != undefined) {\n const logMessage = `received information for association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface AssociationCCSetOptions {\n groupId: number;\n nodeIds: number[];\n}\n@CCCommand(AssociationCommand.Set)\n@useSupervision()\nexport class AssociationCCSet extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSetOptions>) {\n super(options);\n if (options.groupId < 1) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n if (options.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {\n throw new ZWaveError(`All node IDs must be between 1 and ${MAX_NODES}!`, ZWaveErrorCodes.Argument_Invalid);\n }\n this.groupId = options.groupId;\n this.nodeIds = options.nodeIds;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSet {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const nodeIds = [...raw.payload.subarray(1)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n nodeIds,\n });\n }\n public groupId: number;\n public nodeIds: number[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId, ...this.nodeIds]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"group id\": this.groupId || \"all groups\",\n \"node ids\": this.nodeIds.length\n ? this.nodeIds.join(\", \")\n : \"all nodes\",\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCRemoveOptions {\n /** The group from which to remove the nodes. If none is specified, the nodes will be removed from all nodes. */\n groupId?: number;\n /** The nodes to remove. If none are specified, ALL nodes will be removed. */\n nodeIds?: number[];\n}\n@CCCommand(AssociationCommand.Remove)\n@useSupervision()\nexport class AssociationCCRemove extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCRemoveOptions>) {\n super(options);\n // When removing associations, we allow invalid node IDs.\n // See GH#3606 - it is possible that those exist.\n this.groupId = options.groupId;\n this.nodeIds = options.nodeIds;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCRemove {\n validatePayload(raw.payload.length >= 1);\n let groupId: number | undefined;\n if (raw.payload[0] !== 0) {\n groupId = raw.payload[0];\n }\n const nodeIds = [...raw.payload.subarray(1)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n nodeIds,\n });\n }\n public groupId?: number;\n public nodeIds?: number[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.groupId || 0,\n ...(this.nodeIds || []),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"group id\": this.groupId || \"all groups\",\n \"node ids\": this.nodeIds && this.nodeIds.length\n ? this.nodeIds.join(\", \")\n : \"all nodes\",\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCReportOptions {\n groupId: number;\n maxNodes: number;\n nodeIds: number[];\n reportsToFollow: number;\n}\n@CCCommand(AssociationCommand.Report)\n@ccValueProperty(\"maxNodes\", AssociationCCValues.maxNodes, (self) => [self.groupId])\n@ccValueProperty(\"nodeIds\", AssociationCCValues.nodeIds, (self) => [self.groupId])\nexport class AssociationCCReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.maxNodes = options.maxNodes;\n this.nodeIds = options.nodeIds;\n this.reportsToFollow = options.reportsToFollow;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCReport {\n validatePayload(raw.payload.length >= 3);\n const groupId = raw.payload[0];\n const maxNodes = raw.payload[1];\n const reportsToFollow = raw.payload[2];\n const nodeIds = [...raw.payload.subarray(3)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n maxNodes,\n reportsToFollow,\n nodeIds,\n });\n }\n public groupId: number;\n public maxNodes: number;\n public nodeIds: number[];\n public reportsToFollow: number;\n public getPartialCCSessionId(): Record<string, any> | undefined {\n // Distinguish sessions by the association group ID\n return { groupId: this.groupId };\n }\n public expectMoreMessages(): boolean {\n return this.reportsToFollow > 0;\n }\n public mergePartialCCs(partials: AssociationCCReport[], _ctx: CCParsingContext): Promise<void> {\n // Concat the list of nodes\n this.nodeIds = [...partials, this]\n .map((report) => report.nodeIds)\n .reduce((prev, cur) => prev.concat(...cur), []);\n return Promise.resolve();\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.groupId,\n this.maxNodes,\n this.reportsToFollow,\n ...this.nodeIds,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n \"max # of nodes\": this.maxNodes,\n \"node IDs\": this.nodeIds.join(\", \"),\n \"reports to follow\": this.reportsToFollow,\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCGetOptions {\n groupId: number;\n}\n@CCCommand(AssociationCommand.Get)\n@expectedCCResponse(AssociationCCReport)\nexport class AssociationCCGet extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCGetOptions>) {\n super(options);\n if (options.groupId < 1) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCGet {\n validatePayload(raw.payload.length >= 1);\n const groupId = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n });\n }\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group id\": this.groupId },\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCSupportedGroupingsReportOptions {\n groupCount: number;\n}\n@CCCommand(AssociationCommand.SupportedGroupingsReport)\n@ccValueProperty(\"groupCount\", AssociationCCValues.groupCount)\nexport class AssociationCCSupportedGroupingsReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSupportedGroupingsReportOptions>) {\n super(options);\n this.groupCount = options.groupCount;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSupportedGroupingsReport {\n validatePayload(raw.payload.length >= 1);\n const groupCount = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupCount,\n });\n }\n public groupCount: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupCount]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group count\": this.groupCount },\n };\n }\n}\n@CCCommand(AssociationCommand.SupportedGroupingsGet)\n@expectedCCResponse(AssociationCCSupportedGroupingsReport)\nexport class AssociationCCSupportedGroupingsGet extends AssociationCC {\n}\n// @publicAPI\nexport interface AssociationCCSpecificGroupReportOptions {\n group: number;\n}\n@CCCommand(AssociationCommand.SpecificGroupReport)\nexport class AssociationCCSpecificGroupReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSpecificGroupReportOptions>) {\n super(options);\n this.group = options.group;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSpecificGroupReport {\n validatePayload(raw.payload.length >= 1);\n const group = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n group,\n });\n }\n public group: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.group]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { group: this.group },\n };\n }\n}\n@CCCommand(AssociationCommand.SpecificGroupGet)\n@expectedCCResponse(AssociationCCSpecificGroupReport)\nexport class AssociationCCSpecificGroupGet extends AssociationCC {\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAGhC,kBAAwP;AACxP,oBAAsB;AACtB,oBAAyB;AACzB,iBAAqC;AACrC,0BAAuH;AACvH,oCAAiI;AAEjI,mBAA4D;AAE5D,cAAyB;AACzB,gCAAoC;AAZpC,MAAM,EAAE,gDAAgD,wCAAwC,0CAA0C,0CAA0C,6CAA6C,0DAA0D,gDAAgD,kDAAiD,IAAK;IAgBpX,oBAAgB,MAAA;8BAD5B,mCAAI,2BAAe,WAAW,CAAC;;;;oBACM;;;;;;;;;;wCAAA,YAAa;WAAA;;;;;;;;sCA8B9C,+CAA8C,CAAE;8BAahD,uCAAsC,CAAE;gCAiBxC,yCAAwC,CAAE;gCAa1C,yCAAwC,CAAE;mCAc1C,4CAA2C,CAAE;gDAsB7C,yDAAwD,CAAE;sCAmB1D,+CAA8C,CAAE;yCAahD,kDAAiD,CAAE;AA9GpD,qCAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,sBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,kBAAb,OAA6B,GAAA,UAAA,UAAA,GAAA,MAAA,0BA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;;AAAhE,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import * as __validateArgs from \"./AssociationCC._validateArgs.js\";\nconst { validateArgs_AssociationCCAPI_reportGroupCount, validateArgs_AssociationCCAPI_getGroup, validateArgs_AssociationCCAPI_sendReport, validateArgs_AssociationCCAPI_addNodeIds, validateArgs_AssociationCCAPI_removeNodeIds, validateArgs_AssociationCCAPI_removeNodeIdsFromAllGroups, validateArgs_AssociationCCAPI_getSpecificGroup, validateArgs_AssociationCCAPI_reportSpecificGroup } = __validateArgs;\nimport type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type EndpointId, type GetValueDB, MAX_NODES, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { distinct } from \"alcalzone-shared/arrays\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type AssociationAddress, AssociationCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { AssociationCCValues } from \"./_CCValues.generated.js\";\nexport { AssociationCCValues };\n// @noSetValueAPI\n@API(CommandClasses.Association)\nexport class AssociationCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: AssociationCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case AssociationCommand.Get:\n case AssociationCommand.Set:\n case AssociationCommand.Report:\n case AssociationCommand.Remove:\n case AssociationCommand.SupportedGroupingsGet:\n case AssociationCommand.SupportedGroupingsReport:\n return true;\n case AssociationCommand.SpecificGroupGet:\n case AssociationCommand.SpecificGroupReport:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n /**\n * Returns the number of association groups a node supports.\n * Association groups are consecutive, starting at 1.\n */\n public async getGroupCount(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsGet);\n const cc = new AssociationCCSupportedGroupingsGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<AssociationCCSupportedGroupingsReport>(cc, this.commandOptions);\n if (response)\n return response.groupCount;\n }\n @validateArgs_AssociationCCAPI_reportGroupCount()\n public async reportGroupCount(groupCount: number): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsReport);\n const cc = new AssociationCCSupportedGroupingsReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupCount,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Returns information about an association group.\n */\n @validateArgs_AssociationCCAPI_getGroup()\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getGroup(groupId: number) {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Get);\n const cc = new AssociationCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n });\n const response = await this.host.sendCommand<AssociationCCReport>(cc, this.commandOptions);\n if (response) {\n return {\n maxNodes: response.maxNodes,\n nodeIds: response.nodeIds,\n };\n }\n }\n @validateArgs_AssociationCCAPI_sendReport()\n public async sendReport(options: AssociationCCReportOptions): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Report);\n const cc = new AssociationCCReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Adds new nodes to an association group\n */\n @validateArgs_AssociationCCAPI_addNodeIds()\n public async addNodeIds(groupId: number, ...nodeIds: number[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Set);\n const cc = new AssociationCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n nodeIds,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Removes nodes from an association group\n */\n @validateArgs_AssociationCCAPI_removeNodeIds()\n public async removeNodeIds(options: AssociationCCRemoveOptions): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);\n // Validate options\n if (!options.groupId) {\n if (this.version === 1) {\n throw new ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n else if (options.groupId < 0) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n const cc = new AssociationCCRemove({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n /**\n * Removes nodes from all association groups\n */\n @validateArgs_AssociationCCAPI_removeNodeIdsFromAllGroups()\n public async removeNodeIdsFromAllGroups(nodeIds: number[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);\n if (this.version >= 2) {\n // The node supports bulk removal\n return this.removeNodeIds({ nodeIds, groupId: 0 });\n }\n else {\n // We have to remove the node manually from all groups\n const groupCount = this.tryGetValueDB()?.getValue<number>(AssociationCCValues.groupCount.endpoint(this.endpoint.index)) ?? 0;\n for (let groupId = 1; groupId <= groupCount; groupId++) {\n // TODO: evaluate intermediate supervision results\n await this.removeNodeIds({ nodeIds, groupId });\n }\n }\n }\n /**\n * Request the association group that represents the most recently detected button press\n */\n @validateArgs_AssociationCCAPI_getSpecificGroup()\n public async getSpecificGroup(): Promise<number | undefined> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupGet);\n const cc = new AssociationCCSpecificGroupGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<AssociationCCSpecificGroupReport>(cc, this.commandOptions);\n return response?.group;\n }\n /**\n * Report the association group that represents the most recently detected button press\n */\n @validateArgs_AssociationCCAPI_reportSpecificGroup()\n public async reportSpecificGroup(group: number): Promise<void> {\n this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupReport);\n const cc = new AssociationCCSpecificGroupReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n group,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Association)\n@implementedVersion(4)\n@ccValues(AssociationCCValues)\nexport class AssociationCC extends CommandClass {\n declare ccCommand: AssociationCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // AssociationCC must be interviewed after Z-Wave+ if that is supported\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses[\"Z-Wave Plus Info\"],\n // We need information about endpoints to correctly configure the lifeline associations\n CommandClasses[\"Multi Channel\"],\n ];\n }\n /**\n * Returns the number of association groups reported by the node/endpoint.\n * This only works AFTER the interview process\n */\n public static getGroupCountCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;\n }\n /**\n * Returns the number of nodes an association group supports.\n * This only works AFTER the interview process\n */\n public static getMaxNodesCached(ctx: GetValueDB & GetDeviceConfig, endpoint: EndpointId, groupId: number): number {\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index))\n // If the information is not available, fall back to the configuration file if possible\n // This can happen on some legacy devices which have \"hidden\" association groups\n ?? ctx\n .getDeviceConfig?.(endpoint.nodeId)\n ?.getAssociationConfigForEndpoint(endpoint.index, groupId)\n ?.maxNodes\n ?? 0);\n }\n /**\n * Returns all the destinations of all association groups reported by the node/endpoint.\n * This only works AFTER the interview process\n */\n public static getAllDestinationsCached(ctx: GetValueDB, endpoint: EndpointId): ReadonlyMap<number, readonly AssociationAddress[]> {\n const ret = new Map<number, AssociationAddress[]>();\n const groupCount = this.getGroupCountCached(ctx, endpoint);\n const valueDB = ctx.getValueDB(endpoint.nodeId);\n for (let i = 1; i <= groupCount; i++) {\n // Add all root destinations\n const nodes = valueDB.getValue<number[]>(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];\n ret.set(i, \n // Filter out duplicates\n distinct(nodes).map((nodeId) => ({ nodeId })));\n }\n return ret;\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Even if Multi Channel Association is supported, we still need to query the number of\n // normal association groups since some devices report more association groups than\n // multi channel association groups\n // Find out how many groups are supported\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying number of association groups...\",\n direction: \"outbound\",\n });\n const groupCount = await api.getGroupCount();\n if (groupCount != undefined) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `supports ${groupCount} association groups`,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying association groups timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n // Query each association group for its members\n await this.refreshValues(ctx, {\n onProgress: (completed, total) => node.reportInterviewProgress(completed, total),\n });\n // Skip the remaining Association CC interview in favor of Multi Channel Association if possible\n if (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `${this.constructor.name}: delaying configuration of lifeline associations until after Multi Channel Association interview...`,\n direction: \"none\",\n });\n this.setInterviewComplete(ctx, true);\n return;\n }\n // And set up lifeline associations\n await ccUtils.configureLifelineAssociations(ctx, endpoint);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n const groupCount = AssociationCC.getGroupCountCached(ctx, endpoint);\n // Query each association group\n for (let groupId = 1; groupId <= groupCount; groupId++) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying association group #${groupId}...`,\n direction: \"outbound\",\n });\n const group = await api.getGroup(groupId);\n if (group != undefined) {\n const logMessage = `received information for association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n options?.onProgress?.(groupId, groupCount);\n }\n }\n}\n// @publicAPI\nexport interface AssociationCCSetOptions {\n groupId: number;\n nodeIds: number[];\n}\n@CCCommand(AssociationCommand.Set)\n@useSupervision()\nexport class AssociationCCSet extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSetOptions>) {\n super(options);\n if (options.groupId < 1) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n if (options.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {\n throw new ZWaveError(`All node IDs must be between 1 and ${MAX_NODES}!`, ZWaveErrorCodes.Argument_Invalid);\n }\n this.groupId = options.groupId;\n this.nodeIds = options.nodeIds;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSet {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const nodeIds = [...raw.payload.subarray(1)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n nodeIds,\n });\n }\n public groupId: number;\n public nodeIds: number[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId, ...this.nodeIds]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"group id\": this.groupId || \"all groups\",\n \"node ids\": this.nodeIds.length\n ? this.nodeIds.join(\", \")\n : \"all nodes\",\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCRemoveOptions {\n /** The group from which to remove the nodes. If none is specified, the nodes will be removed from all nodes. */\n groupId?: number;\n /** The nodes to remove. If none are specified, ALL nodes will be removed. */\n nodeIds?: number[];\n}\n@CCCommand(AssociationCommand.Remove)\n@useSupervision()\nexport class AssociationCCRemove extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCRemoveOptions>) {\n super(options);\n // When removing associations, we allow invalid node IDs.\n // See GH#3606 - it is possible that those exist.\n this.groupId = options.groupId;\n this.nodeIds = options.nodeIds;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCRemove {\n validatePayload(raw.payload.length >= 1);\n let groupId: number | undefined;\n if (raw.payload[0] !== 0) {\n groupId = raw.payload[0];\n }\n const nodeIds = [...raw.payload.subarray(1)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n nodeIds,\n });\n }\n public groupId?: number;\n public nodeIds?: number[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.groupId || 0,\n ...(this.nodeIds || []),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"group id\": this.groupId || \"all groups\",\n \"node ids\": this.nodeIds && this.nodeIds.length\n ? this.nodeIds.join(\", \")\n : \"all nodes\",\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCReportOptions {\n groupId: number;\n maxNodes: number;\n nodeIds: number[];\n reportsToFollow: number;\n}\n@CCCommand(AssociationCommand.Report)\n@ccValueProperty(\"maxNodes\", AssociationCCValues.maxNodes, (self) => [self.groupId])\n@ccValueProperty(\"nodeIds\", AssociationCCValues.nodeIds, (self) => [self.groupId])\nexport class AssociationCCReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.maxNodes = options.maxNodes;\n this.nodeIds = options.nodeIds;\n this.reportsToFollow = options.reportsToFollow;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCReport {\n validatePayload(raw.payload.length >= 3);\n const groupId = raw.payload[0];\n const maxNodes = raw.payload[1];\n const reportsToFollow = raw.payload[2];\n const nodeIds = [...raw.payload.subarray(3)];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n maxNodes,\n reportsToFollow,\n nodeIds,\n });\n }\n public groupId: number;\n public maxNodes: number;\n public nodeIds: number[];\n public reportsToFollow: number;\n public getPartialCCSessionId(): Record<string, any> | undefined {\n // Distinguish sessions by the association group ID\n return { groupId: this.groupId };\n }\n public getRemainingSegments(): number | undefined {\n return this.reportsToFollow;\n }\n public mergePartialCCs(partials: AssociationCCReport[], _ctx: CCParsingContext): Promise<void> {\n // Concat the list of nodes\n this.nodeIds = [...partials, this]\n .map((report) => report.nodeIds)\n .reduce((prev, cur) => prev.concat(...cur), []);\n return Promise.resolve();\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.groupId,\n this.maxNodes,\n this.reportsToFollow,\n ...this.nodeIds,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n \"max # of nodes\": this.maxNodes,\n \"node IDs\": this.nodeIds.join(\", \"),\n \"reports to follow\": this.reportsToFollow,\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCGetOptions {\n groupId: number;\n}\n@CCCommand(AssociationCommand.Get)\n@expectedCCResponse(AssociationCCReport)\nexport class AssociationCCGet extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCGetOptions>) {\n super(options);\n if (options.groupId < 1) {\n throw new ZWaveError(\"The group id must be positive!\", ZWaveErrorCodes.Argument_Invalid);\n }\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCGet {\n validatePayload(raw.payload.length >= 1);\n const groupId = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n });\n }\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group id\": this.groupId },\n };\n }\n}\n// @publicAPI\nexport interface AssociationCCSupportedGroupingsReportOptions {\n groupCount: number;\n}\n@CCCommand(AssociationCommand.SupportedGroupingsReport)\n@ccValueProperty(\"groupCount\", AssociationCCValues.groupCount)\nexport class AssociationCCSupportedGroupingsReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSupportedGroupingsReportOptions>) {\n super(options);\n this.groupCount = options.groupCount;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSupportedGroupingsReport {\n validatePayload(raw.payload.length >= 1);\n const groupCount = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupCount,\n });\n }\n public groupCount: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupCount]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group count\": this.groupCount },\n };\n }\n}\n@CCCommand(AssociationCommand.SupportedGroupingsGet)\n@expectedCCResponse(AssociationCCSupportedGroupingsReport)\nexport class AssociationCCSupportedGroupingsGet extends AssociationCC {\n}\n// @publicAPI\nexport interface AssociationCCSpecificGroupReportOptions {\n group: number;\n}\n@CCCommand(AssociationCommand.SpecificGroupReport)\nexport class AssociationCCSpecificGroupReport extends AssociationCC {\n public constructor(options: WithAddress<AssociationCCSpecificGroupReportOptions>) {\n super(options);\n this.group = options.group;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationCCSpecificGroupReport {\n validatePayload(raw.payload.length >= 1);\n const group = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n group,\n });\n }\n public group: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.group]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { group: this.group },\n };\n }\n}\n@CCCommand(AssociationCommand.SpecificGroupGet)\n@expectedCCResponse(AssociationCCSpecificGroupReport)\nexport class AssociationCCSpecificGroupGet extends AssociationCC {\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAGhC,kBAAwP;AACxP,oBAAsB;AACtB,oBAAyB;AACzB,iBAAqC;AACrC,0BAAuH;AACvH,oCAAiI;AAEjI,mBAA4D;AAE5D,cAAyB;AACzB,gCAAoC;AAZpC,MAAM,EAAE,gDAAgD,wCAAwC,0CAA0C,0CAA0C,6CAA6C,0DAA0D,gDAAgD,kDAAiD,IAAK;IAgBpX,oBAAgB,MAAA;8BAD5B,mCAAI,2BAAe,WAAW,CAAC;;;;oBACM;;;;;;;;;;wCAAA,YAAa;WAAA;;;;;;;;sCA8B9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AAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,QAAQ,IAAI,QAAQ,CAAC;AAC3B,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;OACH;IACL;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,KAAK,CAAC;AACtC,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,OAAO,KAAK,MAAK;;IAEpC;;;;IAIS,iCAA6B,MAAA;8BAFzC,yCAAU,gCAAmB,gBAAgB,OAC7C,kDAAmB,gCAAgC,CAAC;;;;oBACF;qDAAA,YAAa;WAAA;;;;;;;;AAAhE,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
6
6
  "names": ["AssociationCC"]
7
7
  }
@@ -270,8 +270,11 @@ let AssociationGroupInfoCC = (() => {
270
270
  direction: "outbound"
271
271
  });
272
272
  await api.getCommands(groupId);
273
+ node.reportInterviewProgress(groupId, 2 * associationGroupCount);
273
274
  }
274
- await this.refreshValues(ctx);
275
+ await this.refreshValues(ctx, {
276
+ onProgress: /* @__PURE__ */ __name((completed) => node.reportInterviewProgress(associationGroupCount + completed, 2 * associationGroupCount), "onProgress")
277
+ });
275
278
  this.setInterviewComplete(ctx, true);
276
279
  }
277
280
  async refreshValues(ctx, options) {
@@ -299,6 +302,7 @@ profile: ${(0, import_shared.getEnumMemberName)(import_Types.Association
299
302
  direction: "inbound"
300
303
  });
301
304
  }
305
+ options?.onProgress?.(groupId, associationGroupCount);
302
306
  }
303
307
  }
304
308
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/AssociationGroupInfoCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./AssociationGroupInfoCC._validateArgs.js\";\nconst { validateArgs_AssociationGroupInfoCCAPI_getGroupName, validateArgs_AssociationGroupInfoCCAPI_reportGroupName, validateArgs_AssociationGroupInfoCCAPI_getGroupInfo, validateArgs_AssociationGroupInfoCCAPI_reportGroupInfo, validateArgs_AssociationGroupInfoCCAPI_getCommands, validateArgs_AssociationGroupInfoCCAPI_reportCommands } = __validateArgs;\nimport { CommandClasses, type EndpointId, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupportsCC, type WithAddress, encodeCCId, getCCName, parseCCId, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, cpp2js, getEnumMemberName, num2hex } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { AssociationGroupInfoCommand, AssociationGroupInfoProfile, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { AssociationCC } from \"./AssociationCC.js\";\nimport { MultiChannelAssociationCC } from \"./MultiChannelAssociationCC.js\";\nimport { AssociationGroupInfoCCValues } from \"./_CCValues.generated.js\";\nexport { AssociationGroupInfoCCValues };\n// @noSetValueAPI This CC only has get-type commands\n@API(CommandClasses[\"Association Group Information\"])\nexport class AssociationGroupInfoCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: AssociationGroupInfoCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case AssociationGroupInfoCommand.NameGet:\n case AssociationGroupInfoCommand.NameReport:\n case AssociationGroupInfoCommand.InfoGet:\n case AssociationGroupInfoCommand.InfoReport:\n case AssociationGroupInfoCommand.CommandListGet:\n case AssociationGroupInfoCommand.CommandListReport:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getGroupName()\n public async getGroupName(groupId: number): Promise<MaybeNotKnown<string>> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameGet);\n const cc = new AssociationGroupInfoCCNameGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCNameReport>(cc, this.commandOptions);\n if (response)\n return response.name;\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportGroupName()\n public async reportGroupName(groupId: number, name: string): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameReport);\n const cc = new AssociationGroupInfoCCNameReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n name,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getGroupInfo()\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getGroupInfo(groupId: number, refreshCache: boolean = false) {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoGet);\n const cc = new AssociationGroupInfoCCInfoGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n refreshCache,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCInfoReport>(cc, this.commandOptions);\n // SDS13782 says: If List Mode is set to 0, the Group Count field MUST be set to 1.\n // But that's not always the case. Apparently some endpoints return 0 groups\n // although they support AGI CC\n if (response && response.groups.length > 0) {\n const { groupId: _, ...info } = response.groups[0];\n return {\n hasDynamicInfo: response.hasDynamicInfo,\n ...info,\n };\n }\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportGroupInfo()\n public async reportGroupInfo(options: AssociationGroupInfoCCInfoReportOptions): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoReport);\n const cc = new AssociationGroupInfoCCInfoReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getCommands()\n public async getCommands(groupId: number, allowCache: boolean = true): Promise<MaybeNotKnown<AssociationGroupInfoCCCommandListReport[\"commands\"]>> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListGet);\n const cc = new AssociationGroupInfoCCCommandListGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n allowCache,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCCommandListReport>(cc, this.commandOptions);\n if (response)\n return response.commands;\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportCommands()\n public async reportCommands(groupId: number, commands: ReadonlyMap<CommandClasses, readonly number[]>): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListReport);\n const cc = new AssociationGroupInfoCCCommandListReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n commands,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Association Group Information\"])\n@implementedVersion(3)\n@ccValues(AssociationGroupInfoCCValues)\nexport class AssociationGroupInfoCC extends CommandClass {\n declare ccCommand: AssociationGroupInfoCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // AssociationCC must be interviewed after Z-Wave+ if that is supported\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n ];\n }\n /** Returns the name of an association group */\n public static getGroupNameCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<string> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationGroupInfoCCValues.groupName(groupId).endpoint(endpoint.index));\n }\n /** Returns the association profile for an association group */\n public static getGroupProfileCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<AssociationGroupInfoProfile> {\n return ctx.getValueDB(endpoint.nodeId).getValue<{\n profile: AssociationGroupInfoProfile;\n }>(AssociationGroupInfoCCValues.groupInfo(groupId).endpoint(endpoint.index))\n ?.profile;\n }\n /** Returns the dictionary of all commands issued by the given association group */\n public static getIssuedCommandsCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<ReadonlyMap<CommandClasses, readonly number[]>> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationGroupInfoCCValues.commands(groupId).endpoint(endpoint.index));\n }\n public static findGroupsForIssuedCommand(ctx: GetValueDB, endpoint: EndpointId & SupportsCC, ccId: CommandClasses, command: number): number[] {\n const ret: number[] = [];\n const associationGroupCount = this.getAssociationGroupCountCached(ctx, endpoint);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // Scan the issued commands of all groups if there's a match\n const issuedCommands = this.getIssuedCommandsCached(ctx, endpoint, groupId);\n if (!issuedCommands)\n continue;\n if (issuedCommands.has(ccId)\n && issuedCommands.get(ccId)!.includes(command)) {\n ret.push(groupId);\n continue;\n }\n }\n return ret;\n }\n private static getAssociationGroupCountCached(ctx: GetValueDB, endpoint: EndpointId & SupportsCC): number {\n // The association group count is either determined by the\n // Association CC or the Multi Channel Association CC\n return (\n // First query the Multi Channel Association CC\n // And fall back to 0\n (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])\n && MultiChannelAssociationCC.getGroupCountCached(ctx, endpoint))\n // Then the Association CC\n || (endpoint.supportsCC(CommandClasses.Association)\n && AssociationCC.getGroupCountCached(ctx, endpoint))\n || 0);\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Association Group Information\"], ctx, endpoint).withOptions({ priority: MessagePriority.NodeQuery });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n const associationGroupCount = AssociationGroupInfoCC\n .getAssociationGroupCountCached(ctx, endpoint);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // First get the group's name\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying name...`,\n direction: \"outbound\",\n });\n const name = await api.getGroupName(groupId);\n if (name) {\n const logMessage = `Association group #${groupId} has name \"${name}\"`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n // Then the command list\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying command list...`,\n direction: \"outbound\",\n });\n await api.getCommands(groupId);\n // Not sure how to log this\n }\n // Finally query each group for its information\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Association Group Information\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // Query the information for each group (this is the only thing that could be dynamic)\n const associationGroupCount = AssociationGroupInfoCC\n .getAssociationGroupCountCached(ctx, endpoint);\n const hasDynamicInfo = this.getValue<boolean>(ctx, AssociationGroupInfoCCValues.hasDynamicInfo);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // Then its information\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying info...`,\n direction: \"outbound\",\n });\n const info = await api.getGroupInfo(groupId, !!hasDynamicInfo);\n if (info) {\n const logMessage = `Received info for association group #${groupId}:\ninfo is dynamic: ${info.hasDynamicInfo}\nprofile: ${getEnumMemberName(AssociationGroupInfoProfile, info.profile)}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCNameReportOptions {\n groupId: number;\n name: string;\n}\n@CCCommand(AssociationGroupInfoCommand.NameReport)\nexport class AssociationGroupInfoCCNameReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCNameReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.name = options.name;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCNameReport {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const nameLength = raw.payload[1];\n // CC:0059.01.02.11.001: The Name Length field MUST be in the range 0..42\n validatePayload(nameLength <= 42);\n validatePayload(raw.payload.length >= 2 + nameLength);\n // The specs don't allow 0-terminated string, but some devices use them\n // So we need to cut them off\n const name = cpp2js(raw.payload.subarray(2, 2 + nameLength).toString(\"utf8\"));\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n name,\n });\n }\n public readonly groupId: number;\n public readonly name: string;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const valueDB = this.getValueDB(ctx);\n valueDB.setValue(AssociationGroupInfoCCValues.groupName(this.groupId).endpoint(this.endpointIndex), this.name);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.groupId, this.name.length],\n Bytes.from(this.name, \"utf8\"),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n name: this.name,\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCNameGetOptions {\n groupId: number;\n}\n@CCCommand(AssociationGroupInfoCommand.NameGet)\n@expectedCCResponse(AssociationGroupInfoCCNameReport)\nexport class AssociationGroupInfoCCNameGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCNameGetOptions>) {\n super(options);\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCNameGet {\n validatePayload(raw.payload.length >= 1);\n const groupId = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n });\n }\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group id\": this.groupId },\n };\n }\n}\nexport interface AssociationGroupInfo {\n groupId: number;\n mode: number;\n profile: number;\n eventCode: number;\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCInfoReportOptions {\n isListMode: boolean;\n hasDynamicInfo: boolean;\n groups: AssociationGroupInfo[];\n}\n@CCCommand(AssociationGroupInfoCommand.InfoReport)\n@ccValueProperty(\"hasDynamicInfo\", AssociationGroupInfoCCValues.hasDynamicInfo)\nexport class AssociationGroupInfoCCInfoReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCInfoReportOptions>) {\n super(options);\n this.isListMode = options.isListMode;\n this.hasDynamicInfo = options.hasDynamicInfo;\n this.groups = options.groups;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCInfoReport {\n validatePayload(raw.payload.length >= 1);\n const isListMode = !!(raw.payload[0] & 128);\n const hasDynamicInfo = !!(raw.payload[0] & 64);\n const groupCount = raw.payload[0] & 63;\n // each group requires 7 bytes of payload\n validatePayload(raw.payload.length >= 1 + groupCount * 7);\n const groups: AssociationGroupInfo[] = [];\n for (let i = 0; i < groupCount; i++) {\n const offset = 1 + i * 7;\n // Parse the payload\n const groupBytes = raw.payload.subarray(offset, offset + 7);\n const groupId = groupBytes[0];\n const mode = 0; // groupBytes[1];\n const profile = groupBytes.readUInt16BE(2);\n const eventCode = 0; // groupBytes.readUInt16BE(5);\n groups.push({ groupId, mode, profile, eventCode });\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n isListMode,\n hasDynamicInfo,\n groups,\n });\n }\n public readonly isListMode: boolean;\n public readonly hasDynamicInfo: boolean;\n public readonly groups: readonly AssociationGroupInfo[];\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n for (const group of this.groups) {\n const { groupId, mode, profile, eventCode } = group;\n this.setValue(ctx, AssociationGroupInfoCCValues.groupInfo(groupId), {\n mode,\n profile,\n eventCode,\n });\n }\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.alloc(1 + this.groups.length * 7, 0);\n this.payload[0] = (this.isListMode ? 128 : 0)\n | (this.hasDynamicInfo ? 64 : 0)\n | (this.groups.length & 63);\n for (let i = 0; i < this.groups.length; i++) {\n const offset = 1 + i * 7;\n this.payload[offset] = this.groups[i].groupId;\n this.payload.writeUInt16BE(this.groups[i].profile, offset + 2);\n // The remaining bytes are zero\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"is list mode\": this.isListMode,\n \"has dynamic info\": this.hasDynamicInfo,\n groups: this.groups\n .map((g) => `\n\u00B7 Group #${g.groupId}\n mode: ${g.mode}\n profile: ${g.profile}\n event code: ${g.eventCode}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport type AssociationGroupInfoCCInfoGetOptions = {\n refreshCache: boolean;\n} & ({\n listMode: boolean;\n} | {\n groupId: number;\n});\n@CCCommand(AssociationGroupInfoCommand.InfoGet)\n@expectedCCResponse(AssociationGroupInfoCCInfoReport)\nexport class AssociationGroupInfoCCInfoGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCInfoGetOptions>) {\n super(options);\n this.refreshCache = options.refreshCache;\n if (\"listMode\" in options)\n this.listMode = options.listMode;\n if (\"groupId\" in options)\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCInfoGet {\n validatePayload(raw.payload.length >= 2);\n const optionByte = raw.payload[0];\n const refreshCache = !!(optionByte & 128);\n const listMode: boolean | undefined = !!(optionByte & 64);\n let groupId: number | undefined;\n if (!listMode) {\n groupId = raw.payload[1];\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n refreshCache,\n listMode,\n groupId,\n });\n }\n public refreshCache: boolean;\n public listMode?: boolean;\n public groupId?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const isListMode = this.listMode === true;\n const optionByte = (this.refreshCache ? 128 : 0)\n | (isListMode ? 64 : 0);\n this.payload = Bytes.from([\n optionByte,\n isListMode ? 0 : this.groupId!,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {};\n if (this.groupId != undefined) {\n message[\"group id\"] = this.groupId;\n }\n if (this.listMode != undefined) {\n message[\"list mode\"] = this.listMode;\n }\n message[\"refresh cache\"] = this.refreshCache;\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCCommandListReportOptions {\n groupId: number;\n commands: ReadonlyMap<CommandClasses, readonly number[]>;\n}\n@CCCommand(AssociationGroupInfoCommand.CommandListReport)\n@ccValueProperty(\"commands\", AssociationGroupInfoCCValues.commands, (self) => [self.groupId])\nexport class AssociationGroupInfoCCCommandListReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCCommandListReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.commands = options.commands;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCCommandListReport {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const listLength = raw.payload[1];\n validatePayload(raw.payload.length >= 2 + listLength);\n const listBytes = raw.payload.subarray(2, 2 + listLength);\n // Parse all CC ids and commands\n let offset = 0;\n const commands = new Map<CommandClasses, number[]>();\n while (offset < listLength) {\n const { ccId, bytesRead } = parseCCId(listBytes, offset);\n const command = listBytes[offset + bytesRead];\n if (!commands.has(ccId))\n commands.set(ccId, []);\n commands.get(ccId)!.push(command);\n offset += bytesRead + 1;\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n commands,\n });\n }\n public readonly groupId: number;\n public readonly commands: ReadonlyMap<CommandClasses, readonly number[]>;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n // To make it easier to encode possible extended CCs, we first\n // allocate as much space as we may need, then trim it again\n this.payload = new Bytes(2 + this.commands.size * 3);\n this.payload[0] = this.groupId;\n let offset = 2;\n for (const [ccId, commands] of this.commands) {\n for (const command of commands) {\n offset += encodeCCId(ccId, this.payload, offset);\n this.payload[offset] = command;\n offset++;\n }\n }\n this.payload[1] = offset - 2; // list length\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n commands: [...this.commands]\n .map(([cc, cmds]) => {\n return `\\n\u00B7 ${getCCName(cc)}: ${cmds\n .map((cmd) => num2hex(cmd))\n .join(\", \")}`;\n })\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCCommandListGetOptions {\n allowCache: boolean;\n groupId: number;\n}\n@CCCommand(AssociationGroupInfoCommand.CommandListGet)\n@expectedCCResponse(AssociationGroupInfoCCCommandListReport)\nexport class AssociationGroupInfoCCCommandListGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCCommandListGetOptions>) {\n super(options);\n this.allowCache = options.allowCache;\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCCommandListGet {\n validatePayload(raw.payload.length >= 2);\n const allowCache = !!(raw.payload[0] & 128);\n const groupId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n allowCache,\n groupId,\n });\n }\n public allowCache: boolean;\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.allowCache ? 128 : 0,\n this.groupId,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n \"allow cache\": this.allowCache,\n },\n };\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA2O;AAC3O,oBAA0D;AAC1D,iBAAqC;AACrC,0BAAkJ;AAClJ,oCAAiH;AAEjH,mBAA0E;AAE1E,2BAA8B;AAC9B,uCAA0C;AAC1C,gCAA6C;AAX7C,MAAM,EAAE,qDAAqD,wDAAwD,qDAAqD,wDAAwD,oDAAoD,sDAAqD,IAAK;IAenU,6BAAyB,MAAA;8BADrC,mCAAI,2BAAe,+BAA+B,CAAC,CAAC;;;;oBACN;;;;;;;;iDAAA,YAAa;WAAA;;;;;;;;kCAavD,oDAAmD,CAAE;qCAYrD,uDAAsD,CAAE;kCAWxD,oDAAmD,CAAE;qCAsBrD,uDAAsD,CAAE;iCAUxD,mDAAkD,CAAE;oCAapD,sDAAqD,CAAE;AAnExD,qCAAA,MAAA,MAAA,0BAAA,EAAA,MAAA,UAAA,MAAA,gBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,kBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,cAAb,OAAyB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAYzB,qCAAA,MAAA,MAAA,6BAAA,EAAA,MAAA,UAAA,MAAA,mBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,qBAAA,KAAA,QAAA,KAAA,gCA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L;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK;QACtB,KAAK,aAAa,MAAM;QACxB,KAAK;OACR;AACD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,YAAY,KAAK;UACjB,eAAe,KAAK;;;IAGhC;;;;",
4
+ "sourcesContent": ["import * as __validateArgs from \"./AssociationGroupInfoCC._validateArgs.js\";\nconst { validateArgs_AssociationGroupInfoCCAPI_getGroupName, validateArgs_AssociationGroupInfoCCAPI_reportGroupName, validateArgs_AssociationGroupInfoCCAPI_getGroupInfo, validateArgs_AssociationGroupInfoCCAPI_reportGroupInfo, validateArgs_AssociationGroupInfoCCAPI_getCommands, validateArgs_AssociationGroupInfoCCAPI_reportCommands } = __validateArgs;\nimport { CommandClasses, type EndpointId, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupportsCC, type WithAddress, encodeCCId, getCCName, parseCCId, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, cpp2js, getEnumMemberName, num2hex } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { AssociationGroupInfoCommand, AssociationGroupInfoProfile, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { AssociationCC } from \"./AssociationCC.js\";\nimport { MultiChannelAssociationCC } from \"./MultiChannelAssociationCC.js\";\nimport { AssociationGroupInfoCCValues } from \"./_CCValues.generated.js\";\nexport { AssociationGroupInfoCCValues };\n// @noSetValueAPI This CC only has get-type commands\n@API(CommandClasses[\"Association Group Information\"])\nexport class AssociationGroupInfoCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: AssociationGroupInfoCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case AssociationGroupInfoCommand.NameGet:\n case AssociationGroupInfoCommand.NameReport:\n case AssociationGroupInfoCommand.InfoGet:\n case AssociationGroupInfoCommand.InfoReport:\n case AssociationGroupInfoCommand.CommandListGet:\n case AssociationGroupInfoCommand.CommandListReport:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getGroupName()\n public async getGroupName(groupId: number): Promise<MaybeNotKnown<string>> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameGet);\n const cc = new AssociationGroupInfoCCNameGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCNameReport>(cc, this.commandOptions);\n if (response)\n return response.name;\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportGroupName()\n public async reportGroupName(groupId: number, name: string): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameReport);\n const cc = new AssociationGroupInfoCCNameReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n name,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getGroupInfo()\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getGroupInfo(groupId: number, refreshCache: boolean = false) {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoGet);\n const cc = new AssociationGroupInfoCCInfoGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n refreshCache,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCInfoReport>(cc, this.commandOptions);\n // SDS13782 says: If List Mode is set to 0, the Group Count field MUST be set to 1.\n // But that's not always the case. Apparently some endpoints return 0 groups\n // although they support AGI CC\n if (response && response.groups.length > 0) {\n const { groupId: _, ...info } = response.groups[0];\n return {\n hasDynamicInfo: response.hasDynamicInfo,\n ...info,\n };\n }\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportGroupInfo()\n public async reportGroupInfo(options: AssociationGroupInfoCCInfoReportOptions): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoReport);\n const cc = new AssociationGroupInfoCCInfoReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_AssociationGroupInfoCCAPI_getCommands()\n public async getCommands(groupId: number, allowCache: boolean = true): Promise<MaybeNotKnown<AssociationGroupInfoCCCommandListReport[\"commands\"]>> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListGet);\n const cc = new AssociationGroupInfoCCCommandListGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n allowCache,\n });\n const response = await this.host.sendCommand<AssociationGroupInfoCCCommandListReport>(cc, this.commandOptions);\n if (response)\n return response.commands;\n }\n @validateArgs_AssociationGroupInfoCCAPI_reportCommands()\n public async reportCommands(groupId: number, commands: ReadonlyMap<CommandClasses, readonly number[]>): Promise<void> {\n this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListReport);\n const cc = new AssociationGroupInfoCCCommandListReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n groupId,\n commands,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Association Group Information\"])\n@implementedVersion(3)\n@ccValues(AssociationGroupInfoCCValues)\nexport class AssociationGroupInfoCC extends CommandClass {\n declare ccCommand: AssociationGroupInfoCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // AssociationCC must be interviewed after Z-Wave+ if that is supported\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n ];\n }\n /** Returns the name of an association group */\n public static getGroupNameCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<string> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationGroupInfoCCValues.groupName(groupId).endpoint(endpoint.index));\n }\n /** Returns the association profile for an association group */\n public static getGroupProfileCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<AssociationGroupInfoProfile> {\n return ctx.getValueDB(endpoint.nodeId).getValue<{\n profile: AssociationGroupInfoProfile;\n }>(AssociationGroupInfoCCValues.groupInfo(groupId).endpoint(endpoint.index))\n ?.profile;\n }\n /** Returns the dictionary of all commands issued by the given association group */\n public static getIssuedCommandsCached(ctx: GetValueDB, endpoint: EndpointId, groupId: number): MaybeNotKnown<ReadonlyMap<CommandClasses, readonly number[]>> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(AssociationGroupInfoCCValues.commands(groupId).endpoint(endpoint.index));\n }\n public static findGroupsForIssuedCommand(ctx: GetValueDB, endpoint: EndpointId & SupportsCC, ccId: CommandClasses, command: number): number[] {\n const ret: number[] = [];\n const associationGroupCount = this.getAssociationGroupCountCached(ctx, endpoint);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // Scan the issued commands of all groups if there's a match\n const issuedCommands = this.getIssuedCommandsCached(ctx, endpoint, groupId);\n if (!issuedCommands)\n continue;\n if (issuedCommands.has(ccId)\n && issuedCommands.get(ccId)!.includes(command)) {\n ret.push(groupId);\n continue;\n }\n }\n return ret;\n }\n private static getAssociationGroupCountCached(ctx: GetValueDB, endpoint: EndpointId & SupportsCC): number {\n // The association group count is either determined by the\n // Association CC or the Multi Channel Association CC\n return (\n // First query the Multi Channel Association CC\n // And fall back to 0\n (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])\n && MultiChannelAssociationCC.getGroupCountCached(ctx, endpoint))\n // Then the Association CC\n || (endpoint.supportsCC(CommandClasses.Association)\n && AssociationCC.getGroupCountCached(ctx, endpoint))\n || 0);\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Association Group Information\"], ctx, endpoint).withOptions({ priority: MessagePriority.NodeQuery });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n const associationGroupCount = AssociationGroupInfoCC\n .getAssociationGroupCountCached(ctx, endpoint);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // First get the group's name\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying name...`,\n direction: \"outbound\",\n });\n const name = await api.getGroupName(groupId);\n if (name) {\n const logMessage = `Association group #${groupId} has name \"${name}\"`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n // Then the command list\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying command list...`,\n direction: \"outbound\",\n });\n await api.getCommands(groupId);\n // Not sure how to log this\n // This loop and the info query in refreshValues() each iterate over all groups,\n // so they make up the first and second half of this CC's interview progress.\n node.reportInterviewProgress(groupId, 2 * associationGroupCount);\n }\n // Finally query each group for its information\n await this.refreshValues(ctx, {\n onProgress: (completed) => node.reportInterviewProgress(associationGroupCount + completed, 2 * associationGroupCount),\n });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Association Group Information\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // Query the information for each group (this is the only thing that could be dynamic)\n const associationGroupCount = AssociationGroupInfoCC\n .getAssociationGroupCountCached(ctx, endpoint);\n const hasDynamicInfo = this.getValue<boolean>(ctx, AssociationGroupInfoCCValues.hasDynamicInfo);\n for (let groupId = 1; groupId <= associationGroupCount; groupId++) {\n // Then its information\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Association group #${groupId}: Querying info...`,\n direction: \"outbound\",\n });\n const info = await api.getGroupInfo(groupId, !!hasDynamicInfo);\n if (info) {\n const logMessage = `Received info for association group #${groupId}:\ninfo is dynamic: ${info.hasDynamicInfo}\nprofile: ${getEnumMemberName(AssociationGroupInfoProfile, info.profile)}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n options?.onProgress?.(groupId, associationGroupCount);\n }\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCNameReportOptions {\n groupId: number;\n name: string;\n}\n@CCCommand(AssociationGroupInfoCommand.NameReport)\nexport class AssociationGroupInfoCCNameReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCNameReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.name = options.name;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCNameReport {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const nameLength = raw.payload[1];\n // CC:0059.01.02.11.001: The Name Length field MUST be in the range 0..42\n validatePayload(nameLength <= 42);\n validatePayload(raw.payload.length >= 2 + nameLength);\n // The specs don't allow 0-terminated string, but some devices use them\n // So we need to cut them off\n const name = cpp2js(raw.payload.subarray(2, 2 + nameLength).toString(\"utf8\"));\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n name,\n });\n }\n public readonly groupId: number;\n public readonly name: string;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const valueDB = this.getValueDB(ctx);\n valueDB.setValue(AssociationGroupInfoCCValues.groupName(this.groupId).endpoint(this.endpointIndex), this.name);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.groupId, this.name.length],\n Bytes.from(this.name, \"utf8\"),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n name: this.name,\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCNameGetOptions {\n groupId: number;\n}\n@CCCommand(AssociationGroupInfoCommand.NameGet)\n@expectedCCResponse(AssociationGroupInfoCCNameReport)\nexport class AssociationGroupInfoCCNameGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCNameGetOptions>) {\n super(options);\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCNameGet {\n validatePayload(raw.payload.length >= 1);\n const groupId = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n });\n }\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.groupId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"group id\": this.groupId },\n };\n }\n}\nexport interface AssociationGroupInfo {\n groupId: number;\n mode: number;\n profile: number;\n eventCode: number;\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCInfoReportOptions {\n isListMode: boolean;\n hasDynamicInfo: boolean;\n groups: AssociationGroupInfo[];\n}\n@CCCommand(AssociationGroupInfoCommand.InfoReport)\n@ccValueProperty(\"hasDynamicInfo\", AssociationGroupInfoCCValues.hasDynamicInfo)\nexport class AssociationGroupInfoCCInfoReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCInfoReportOptions>) {\n super(options);\n this.isListMode = options.isListMode;\n this.hasDynamicInfo = options.hasDynamicInfo;\n this.groups = options.groups;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCInfoReport {\n validatePayload(raw.payload.length >= 1);\n const isListMode = !!(raw.payload[0] & 128);\n const hasDynamicInfo = !!(raw.payload[0] & 64);\n const groupCount = raw.payload[0] & 63;\n // each group requires 7 bytes of payload\n validatePayload(raw.payload.length >= 1 + groupCount * 7);\n const groups: AssociationGroupInfo[] = [];\n for (let i = 0; i < groupCount; i++) {\n const offset = 1 + i * 7;\n // Parse the payload\n const groupBytes = raw.payload.subarray(offset, offset + 7);\n const groupId = groupBytes[0];\n const mode = 0; // groupBytes[1];\n const profile = groupBytes.readUInt16BE(2);\n const eventCode = 0; // groupBytes.readUInt16BE(5);\n groups.push({ groupId, mode, profile, eventCode });\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n isListMode,\n hasDynamicInfo,\n groups,\n });\n }\n public readonly isListMode: boolean;\n public readonly hasDynamicInfo: boolean;\n public readonly groups: readonly AssociationGroupInfo[];\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n for (const group of this.groups) {\n const { groupId, mode, profile, eventCode } = group;\n this.setValue(ctx, AssociationGroupInfoCCValues.groupInfo(groupId), {\n mode,\n profile,\n eventCode,\n });\n }\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.alloc(1 + this.groups.length * 7, 0);\n this.payload[0] = (this.isListMode ? 128 : 0)\n | (this.hasDynamicInfo ? 64 : 0)\n | (this.groups.length & 63);\n for (let i = 0; i < this.groups.length; i++) {\n const offset = 1 + i * 7;\n this.payload[offset] = this.groups[i].groupId;\n this.payload.writeUInt16BE(this.groups[i].profile, offset + 2);\n // The remaining bytes are zero\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"is list mode\": this.isListMode,\n \"has dynamic info\": this.hasDynamicInfo,\n groups: this.groups\n .map((g) => `\n\u00B7 Group #${g.groupId}\n mode: ${g.mode}\n profile: ${g.profile}\n event code: ${g.eventCode}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport type AssociationGroupInfoCCInfoGetOptions = {\n refreshCache: boolean;\n} & ({\n listMode: boolean;\n} | {\n groupId: number;\n});\n@CCCommand(AssociationGroupInfoCommand.InfoGet)\n@expectedCCResponse(AssociationGroupInfoCCInfoReport)\nexport class AssociationGroupInfoCCInfoGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCInfoGetOptions>) {\n super(options);\n this.refreshCache = options.refreshCache;\n if (\"listMode\" in options)\n this.listMode = options.listMode;\n if (\"groupId\" in options)\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCInfoGet {\n validatePayload(raw.payload.length >= 2);\n const optionByte = raw.payload[0];\n const refreshCache = !!(optionByte & 128);\n const listMode: boolean | undefined = !!(optionByte & 64);\n let groupId: number | undefined;\n if (!listMode) {\n groupId = raw.payload[1];\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n refreshCache,\n listMode,\n groupId,\n });\n }\n public refreshCache: boolean;\n public listMode?: boolean;\n public groupId?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const isListMode = this.listMode === true;\n const optionByte = (this.refreshCache ? 128 : 0)\n | (isListMode ? 64 : 0);\n this.payload = Bytes.from([\n optionByte,\n isListMode ? 0 : this.groupId!,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {};\n if (this.groupId != undefined) {\n message[\"group id\"] = this.groupId;\n }\n if (this.listMode != undefined) {\n message[\"list mode\"] = this.listMode;\n }\n message[\"refresh cache\"] = this.refreshCache;\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCCommandListReportOptions {\n groupId: number;\n commands: ReadonlyMap<CommandClasses, readonly number[]>;\n}\n@CCCommand(AssociationGroupInfoCommand.CommandListReport)\n@ccValueProperty(\"commands\", AssociationGroupInfoCCValues.commands, (self) => [self.groupId])\nexport class AssociationGroupInfoCCCommandListReport extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCCommandListReportOptions>) {\n super(options);\n this.groupId = options.groupId;\n this.commands = options.commands;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCCommandListReport {\n validatePayload(raw.payload.length >= 2);\n const groupId = raw.payload[0];\n const listLength = raw.payload[1];\n validatePayload(raw.payload.length >= 2 + listLength);\n const listBytes = raw.payload.subarray(2, 2 + listLength);\n // Parse all CC ids and commands\n let offset = 0;\n const commands = new Map<CommandClasses, number[]>();\n while (offset < listLength) {\n const { ccId, bytesRead } = parseCCId(listBytes, offset);\n const command = listBytes[offset + bytesRead];\n if (!commands.has(ccId))\n commands.set(ccId, []);\n commands.get(ccId)!.push(command);\n offset += bytesRead + 1;\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n groupId,\n commands,\n });\n }\n public readonly groupId: number;\n public readonly commands: ReadonlyMap<CommandClasses, readonly number[]>;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n // To make it easier to encode possible extended CCs, we first\n // allocate as much space as we may need, then trim it again\n this.payload = new Bytes(2 + this.commands.size * 3);\n this.payload[0] = this.groupId;\n let offset = 2;\n for (const [ccId, commands] of this.commands) {\n for (const command of commands) {\n offset += encodeCCId(ccId, this.payload, offset);\n this.payload[offset] = command;\n offset++;\n }\n }\n this.payload[1] = offset - 2; // list length\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n commands: [...this.commands]\n .map(([cc, cmds]) => {\n return `\\n\u00B7 ${getCCName(cc)}: ${cmds\n .map((cmd) => num2hex(cmd))\n .join(\", \")}`;\n })\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface AssociationGroupInfoCCCommandListGetOptions {\n allowCache: boolean;\n groupId: number;\n}\n@CCCommand(AssociationGroupInfoCommand.CommandListGet)\n@expectedCCResponse(AssociationGroupInfoCCCommandListReport)\nexport class AssociationGroupInfoCCCommandListGet extends AssociationGroupInfoCC {\n public constructor(options: WithAddress<AssociationGroupInfoCCCommandListGetOptions>) {\n super(options);\n this.allowCache = options.allowCache;\n this.groupId = options.groupId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): AssociationGroupInfoCCCommandListGet {\n validatePayload(raw.payload.length >= 2);\n const allowCache = !!(raw.payload[0] & 128);\n const groupId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n allowCache,\n groupId,\n });\n }\n public allowCache: boolean;\n public groupId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.allowCache ? 128 : 0,\n this.groupId,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"group id\": this.groupId,\n \"allow cache\": this.allowCache,\n },\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA2O;AAC3O,oBAA0D;AAC1D,iBAAqC;AACrC,0BAAkJ;AAClJ,oCAAiH;AAEjH,mBAA0E;AAE1E,2BAA8B;AAC9B,uCAA0C;AAC1C,gCAA6C;AAX7C,MAAM,EAAE,qDAAqD,wDAAwD,qDAAqD,wDAAwD,oDAAoD,sDAAqD,IAAK;IAenU,6BAAyB,MAAA;8BADrC,mCAAI,2BAAe,+BAA+B,CAAC,CAAC;;;;oBACN;;;;;;;;iDAAA,YAAa;WAAA;;;;;;;;kCAavD,oDAAmD,CAAE;qCAYrD,uDAAsD,C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;;IASS,wCAAoC,MAAA;8BAFhD,yCAAU,yCAA4B,cAAc,OACpD,kDAAmB,uCAAuC,CAAC;;;;oBACF;4DAAA,YAAsB;WAAA;;;;;;;;AAAhF,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAiE;AAChF,YAAM,OAAO;AACb,WAAK,aAAa,QAAQ;AAC1B,WAAK,UAAU,QAAQ;IAC3B;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,aAAa,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI;AACvC,YAAM,UAAU,IAAI,QAAQ,CAAC;AAC7B,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK;QACtB,KAAK,aAAa,MAAM;QACxB,KAAK;OACR;AACD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,YAAY,KAAK;UACjB,eAAe,KAAK;;;IAGhC;;;;",
6
6
  "names": ["AssociationGroupInfoCC"]
7
7
  }
@@ -362,7 +362,9 @@ let ColorSwitchCC = (() => {
362
362
  const hexColorValue = import_CCValues_generated.ColorSwitchCCValues.hexColor;
363
363
  this.setMetadata(ctx, hexColorValue);
364
364
  }
365
- await this.refreshValues(ctx);
365
+ await this.refreshValues(ctx, {
366
+ onProgress: /* @__PURE__ */ __name((completed, total) => node.reportInterviewProgress(completed, total), "onProgress")
367
+ });
366
368
  this.setInterviewComplete(ctx, true);
367
369
  }
368
370
  async refreshValues(ctx, options) {
@@ -372,7 +374,7 @@ let ColorSwitchCC = (() => {
372
374
  priority: options?.priority ?? import_core.MessagePriority.NodeQuery
373
375
  });
374
376
  const supportedColors = this.getValue(ctx, import_CCValues_generated.ColorSwitchCCValues.supportedColorComponents) ?? [];
375
- for (const color of supportedColors) {
377
+ for (const [i, color] of supportedColors.entries()) {
376
378
  if (!(0, import_shared.isEnumMember)(import_Types.ColorComponent, color))
377
379
  continue;
378
380
  const colorName = (0, import_shared.getEnumMemberName)(import_Types.ColorComponent, color);
@@ -382,6 +384,7 @@ let ColorSwitchCC = (() => {
382
384
  direction: "outbound"
383
385
  });
384
386
  await api.get(color);
387
+ options?.onProgress?.(i + 1, supportedColors.length);
385
388
  }
386
389
  }
387
390
  translatePropertyKey(ctx, property, propertyKey) {