@zwave-js/cc 15.19.0 → 15.20.1
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.
- package/build/cjs/cc/AssociationGroupInfoCC.js +1 -1
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.js +2 -2
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +2 -2
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.js +1 -1
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +2 -2
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.js +2 -1
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.js +1 -1
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +1 -1
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.js +3 -3
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.js +6 -6
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.js +6 -6
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +4 -4
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.js +6 -6
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.js +3 -3
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js +4 -4
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.js +7 -7
- package/build/cjs/cc/Security2CC.js.map +2 -2
- package/build/cjs/cc/SecurityCC.js +5 -5
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +11 -1
- package/build/cjs/cc/SoundSwitchCC.js +26 -1
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.js +5 -5
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +2 -2
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.js +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.js +4 -4
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.js +2 -2
- package/build/cjs/cc/TransportServiceCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.js +10 -10
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +1 -1
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +8 -8
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/index.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/lib/CommandClass.js +2 -2
- package/build/cjs/lib/CommandClass.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +2 -2
- package/build/cjs/lib/Security2/Extension.js.map +2 -2
- package/build/cjs/lib/Values.js.map +1 -1
- package/build/cjs/lib/traits.d.ts +9 -0
- package/build/esm/cc/AssociationGroupInfoCC.js +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -2
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -2
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -1
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +1 -1
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +3 -3
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.js +6 -6
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/MeterCC.js +6 -6
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +4 -4
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +6 -6
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -2
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.js +3 -3
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +4 -4
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +7 -7
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +5 -5
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +11 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +26 -1
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +5 -5
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -2
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +3 -3
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +4 -4
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +2 -2
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.js +10 -10
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +1 -1
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +8 -8
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js +0 -1
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClass.js +2 -2
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -2
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Values.js +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/traits.d.ts +9 -0
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/MultiChannelAssociationCC.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype EndpointId,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, type BytesView, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype AssociationAddress,\n\ttype EndpointAddress,\n\tMultiChannelAssociationCommand,\n} from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { AssociationCCValues } from \"./AssociationCC.js\";\n\nexport const MultiChannelAssociationCCValues = V.defineCCValues(\n\tCommandClasses[\"Multi Channel Association\"],\n\t{\n\t\t...V.staticProperty(\"groupCount\", undefined, { internal: true }),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"maxNodes\",\n\t\t\t\"maxNodes\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"maxNodes\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"nodeIds\",\n\t\t\t\"nodeIds\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"nodeIds\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"endpoints\",\n\t\t\t\"endpoints\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"endpoints\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t},\n);\n\nfunction endpointAddressesToString(\n\tendpoints: readonly EndpointAddress[],\n): string {\n\treturn endpoints\n\t\t.map(({ nodeId, endpoint }) => {\n\t\t\tif (typeof endpoint === \"number\") {\n\t\t\t\treturn `${nodeId}:${endpoint}`;\n\t\t\t} else {\n\t\t\t\treturn `${nodeId}:[${endpoint.map(String).join(\", \")}]`;\n\t\t\t}\n\t\t})\n\t\t.join(\", \");\n}\n\nconst MULTI_CHANNEL_ASSOCIATION_MARKER = 0x00;\n\nfunction serializeMultiChannelAssociationDestination(\n\tnodeIds: number[],\n\tendpoints: EndpointAddress[],\n): Bytes {\n\tconst nodeAddressBytes = nodeIds.length;\n\tconst endpointAddressBytes = endpoints.length * 2;\n\tconst payload = new Bytes(\n\t\t// node addresses\n\t\tnodeAddressBytes\n\t\t\t// endpoint marker\n\t\t\t+ (endpointAddressBytes > 0 ? 1 : 0)\n\t\t\t// endpoints\n\t\t\t+ endpointAddressBytes,\n\t);\n\t// write node addresses\n\tfor (let i = 0; i < nodeIds.length; i++) {\n\t\tpayload[i] = nodeIds[i];\n\t}\n\t// write endpoint addresses\n\tif (endpointAddressBytes > 0) {\n\t\tlet offset = nodeIds.length;\n\t\tpayload[offset] = MULTI_CHANNEL_ASSOCIATION_MARKER;\n\t\toffset += 1;\n\t\tfor (let i = 0; i < endpoints.length; i++) {\n\t\t\tconst endpoint = endpoints[i];\n\t\t\tconst destination = typeof endpoint.endpoint === \"number\"\n\t\t\t\t// The destination is a single number\n\t\t\t\t? endpoint.endpoint & 0b0111_1111\n\t\t\t\t// The destination is a bit mask\n\t\t\t\t: encodeBitMask(endpoint.endpoint, 7)[0] | 0b1000_0000;\n\n\t\t\tpayload[offset + 2 * i] = endpoint.nodeId;\n\t\t\tpayload[offset + 2 * i + 1] = destination;\n\t\t}\n\t}\n\treturn payload;\n}\n\nfunction deserializeMultiChannelAssociationDestination(data: BytesView): {\n\tnodeIds: number[];\n\tendpoints: EndpointAddress[];\n} {\n\tconst nodeIds: number[] = [];\n\tlet endpointOffset = data.length;\n\t// Scan node ids until we find the marker\n\tfor (let i = 0; i < data.length; i++) {\n\t\tif (data[i] === MULTI_CHANNEL_ASSOCIATION_MARKER) {\n\t\t\tendpointOffset = i + 1;\n\t\t\tbreak;\n\t\t}\n\t\tnodeIds.push(data[i]);\n\t}\n\tconst endpoints: EndpointAddress[] = [];\n\tfor (let i = endpointOffset; i < data.length; i += 2) {\n\t\tconst nodeId = data[i];\n\t\tconst isBitMask = !!(data[i + 1] & 0b1000_0000);\n\t\tconst destination = data[i + 1] & 0b0111_1111;\n\t\tconst endpoint = isBitMask\n\t\t\t? parseBitMask(Bytes.from([destination]))\n\t\t\t: destination;\n\n\t\tendpoints.push({ nodeId, endpoint });\n\t}\n\n\treturn { nodeIds, endpoints };\n}\n\n// @noSetValueAPI\n\n@API(CommandClasses[\"Multi Channel Association\"])\nexport class MultiChannelAssociationCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: MultiChannelAssociationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase MultiChannelAssociationCommand.Get:\n\t\t\tcase MultiChannelAssociationCommand.Set:\n\t\t\tcase MultiChannelAssociationCommand.Report:\n\t\t\tcase MultiChannelAssociationCommand.Remove:\n\t\t\tcase MultiChannelAssociationCommand.SupportedGroupingsGet:\n\t\t\tcase MultiChannelAssociationCommand.SupportedGroupingsReport:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t/**\n\t * Returns the number of association groups a node supports.\n\t * Association groups are consecutive, starting at 1.\n\t */\n\tpublic async getGroupCount(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.SupportedGroupingsGet,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSupportedGroupingsGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultiChannelAssociationCCSupportedGroupingsReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.groupCount;\n\t}\n\n\t@validateArgs()\n\tpublic async reportGroupCount(groupCount: number): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.SupportedGroupingsReport,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSupportedGroupingsReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tgroupCount,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Returns information about an association group.\n\t */\n\t@validateArgs()\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic async getGroup(groupId: number) {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Get,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tgroupId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultiChannelAssociationCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"maxNodes\", \"nodeIds\", \"endpoints\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\toptions: MultiChannelAssociationCCReportOptions,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Report,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Adds new nodes or endpoints to an association group\n\t */\n\t@validateArgs()\n\tpublic async addDestinations(\n\t\toptions: MultiChannelAssociationCCSetOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Set,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Removes nodes or endpoints from an association group\n\t */\n\t@validateArgs()\n\tpublic async removeDestinations(\n\t\toptions: MultiChannelAssociationCCRemoveOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Remove,\n\t\t);\n\n\t\tif (!options.groupId && this.version === 1) {\n\t\t\t// V1 does not support omitting the group, manually remove the destination from all groups\n\t\t\t// We don't want to do too much work, so find out which groups the destination is in\n\t\t\tconst currentDestinations = MultiChannelAssociationCC\n\t\t\t\t.getAllDestinationsCached(\n\t\t\t\t\tthis.host,\n\t\t\t\t\tthis.endpoint,\n\t\t\t\t);\n\t\t\tfor (const [group, destinations] of currentDestinations) {\n\t\t\t\tconst cc = new MultiChannelAssociationCCRemove({\n\t\t\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tnodeIds: destinations\n\t\t\t\t\t\t.filter((d) => d.endpoint != undefined)\n\t\t\t\t\t\t.map((d) => d.nodeId),\n\t\t\t\t\tendpoints: destinations.filter(\n\t\t\t\t\t\t(d): d is AssociationAddress & { endpoint: number } =>\n\t\t\t\t\t\t\td.endpoint != undefined,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t\t// TODO: evaluate intermediate supervision results\n\t\t\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t\t\t}\n\t\t} else if (options.groupId && options.groupId < 0) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must not be negative!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t} else {\n\t\t\tconst cc = new MultiChannelAssociationCCRemove({\n\t\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t\t...options,\n\t\t\t});\n\t\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Multi Channel Association\"])\n@implementedVersion(5)\n@ccValues(MultiChannelAssociationCCValues)\nexport class MultiChannelAssociationCC extends CommandClass {\n\tdeclare ccCommand: MultiChannelAssociationCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\t// MultiChannelAssociationCC must be interviewed after Z-Wave+ if that is supported\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses[\"Z-Wave Plus Info\"],\n\t\t\t// We need information about endpoints to correctly configure the lifeline associations\n\t\t\tCommandClasses[\"Multi Channel\"],\n\t\t\t// AssociationCC will short-circuit if this CC is supported\n\t\t\tCommandClasses.Association,\n\t\t];\n\t}\n\n\t/**\n\t * Returns the number of association groups reported by the node/endpoint.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getGroupCountCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): number {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultiChannelAssociationCCValues.groupCount.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) || 0;\n\t}\n\n\t/**\n\t * Returns the number of nodes an association group supports.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getMaxNodesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tgroupId: number,\n\t): number {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultiChannelAssociationCCValues.maxNodes(groupId).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\t}\n\n\t/**\n\t * Returns all the destinations of all association groups reported by the node/endpoint.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getAllDestinationsCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): ReadonlyMap<number, readonly AssociationAddress[]> {\n\t\tconst ret = new Map<number, AssociationAddress[]>();\n\t\tconst groupCount = this.getGroupCountCached(ctx, endpoint);\n\t\tconst valueDB = ctx.getValueDB(endpoint.nodeId);\n\t\tfor (let i = 1; i <= groupCount; i++) {\n\t\t\tconst groupDestinations: AssociationAddress[] = [];\n\t\t\t// Add all node destinations\n\t\t\tconst nodes = valueDB.getValue<number[]>(\n\t\t\t\tMultiChannelAssociationCCValues.nodeIds(i).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tgroupDestinations.push(...nodes.map((nodeId) => ({ nodeId })));\n\t\t\t// And all endpoint destinations\n\t\t\tconst endpoints = valueDB.getValue<EndpointAddress[]>(\n\t\t\t\tMultiChannelAssociationCCValues.endpoints(i).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tfor (const ep of endpoints) {\n\t\t\t\tif (typeof ep.endpoint === \"number\") {\n\t\t\t\t\tgroupDestinations.push({\n\t\t\t\t\t\tnodeId: ep.nodeId,\n\t\t\t\t\t\tendpoint: ep.endpoint,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tgroupDestinations.push(\n\t\t\t\t\t\t...ep.endpoint.map((e) => ({\n\t\t\t\t\t\t\tnodeId: ep.nodeId,\n\t\t\t\t\t\t\tendpoint: e,\n\t\t\t\t\t\t})),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tret.set(\n\t\t\t\ti,\n\t\t\t\t// Filter out duplicates\n\t\t\t\tgroupDestinations.filter(\n\t\t\t\t\t(addr, index) =>\n\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t=== groupDestinations.findIndex(\n\t\t\t\t\t\t\t\t({ nodeId, endpoint }) =>\n\t\t\t\t\t\t\t\t\tnodeId === addr.nodeId\n\t\t\t\t\t\t\t\t\t&& endpoint === addr.endpoint,\n\t\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst mcAPI = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First find out how many groups are supported as multi channel\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying number of multi channel association groups...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst mcGroupCount = await mcAPI.getGroupCount();\n\t\tif (mcGroupCount != undefined) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`supports ${mcGroupCount} multi channel association groups`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying multi channel association groups timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// Query each association group for its members\n\t\tawait this.refreshValues(ctx);\n\n\t\t// And set up lifeline associations\n\t\tawait ccUtils.configureLifelineAssociations(ctx, endpoint);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst mcAPI = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\t\tconst assocAPI = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst mcGroupCount: number = this.getValue(\n\t\t\tctx,\n\t\t\tMultiChannelAssociationCCValues.groupCount,\n\t\t) ?? 0;\n\n\t\t// Some devices report more association groups than multi channel association groups, so we need this info here\n\t\tconst assocGroupCount: number =\n\t\t\tthis.getValue(ctx, AssociationCCValues.groupCount)\n\t\t\t|| mcGroupCount;\n\n\t\t// Then query each multi channel association group\n\t\tfor (let groupId = 1; groupId <= mcGroupCount; groupId++) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying multi channel association group #${groupId}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst group = await mcAPI.getGroup(groupId);\n\t\t\tif (!group) continue;\n\t\t\tconst logMessage =\n\t\t\t\t`received information for multi channel association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}\ncurrently assigned endpoints: ${\n\t\t\t\t\tgroup.endpoints\n\t\t\t\t\t\t.map(({ nodeId, endpoint }) => {\n\t\t\t\t\t\t\tif (typeof endpoint === \"number\") {\n\t\t\t\t\t\t\t\treturn `${nodeId}:${endpoint}`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn `${nodeId}:[${\n\t\t\t\t\t\t\t\t\tendpoint.map(String).join(\", \")\n\t\t\t\t\t\t\t\t}]`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\t// Check if there are more non-multi-channel association groups we haven't queried yet\n\t\tif (assocAPI.isSupported() && assocGroupCount > mcGroupCount) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying additional non-multi-channel association groups...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tfor (\n\t\t\t\tlet groupId = mcGroupCount + 1;\n\t\t\t\tgroupId <= assocGroupCount;\n\t\t\t\tgroupId++\n\t\t\t) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying association group #${groupId}...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tconst group = await assocAPI.getGroup(groupId);\n\t\t\t\tif (!group) continue;\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received information for association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport type MultiChannelAssociationCCSetOptions =\n\t& {\n\t\tgroupId: number;\n\t}\n\t& (\n\t\t| { nodeIds: number[] }\n\t\t| { endpoints: EndpointAddress[] }\n\t\t| { nodeIds: number[]; endpoints: EndpointAddress[] }\n\t);\n\n@CCCommand(MultiChannelAssociationCommand.Set)\n@useSupervision()\nexport class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.groupId < 1) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must be positive!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.groupId = options.groupId;\n\t\tthis.nodeIds = (\"nodeIds\" in options && options.nodeIds) || [];\n\t\tif (this.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`All node IDs must be between 1 and ${MAX_NODES}!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.endpoints = (\"endpoints\" in options && options.endpoints)\n\t\t\t|| [];\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(1),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\tpublic nodeIds: number[];\n\tpublic endpoints: EndpointAddress[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.groupId]),\n\t\t\tserializeMultiChannelAssociationDestination(\n\t\t\t\tthis.nodeIds,\n\t\t\t\tthis.endpoints,\n\t\t\t),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"group id\": this.groupId,\n\t\t\t\t\"node ids\": this.nodeIds.join(\", \"),\n\t\t\t\tendpoints: endpointAddressesToString(this.endpoints),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCRemoveOptions {\n\t/** The group from which to remove the nodes. If none is specified, the nodes will be removed from all groups. */\n\tgroupId?: number;\n\t/** The nodes to remove. If no nodeIds and no endpoint addresses are specified, ALL nodes will be removed. */\n\tnodeIds?: number[];\n\t/** The single endpoints to remove. If no nodeIds and no endpoint addresses are specified, ALL will be removed. */\n\tendpoints?: EndpointAddress[];\n}\n\n@CCCommand(MultiChannelAssociationCommand.Remove)\n@useSupervision()\nexport class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCRemoveOptions>,\n\t) {\n\t\tsuper(options);\n\t\t// When removing associations, we allow invalid node IDs.\n\t\t// See GH#3606 - it is possible that those exist.\n\t\tthis.groupId = options.groupId;\n\t\tthis.nodeIds = options.nodeIds;\n\t\tthis.endpoints = options.endpoints;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCRemove {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId: number | undefined = raw.payload[0];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(1),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t});\n\t}\n\n\tpublic groupId?: number;\n\tpublic nodeIds?: number[];\n\tpublic endpoints?: EndpointAddress[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.groupId || 0]),\n\t\t\tserializeMultiChannelAssociationDestination(\n\t\t\t\tthis.nodeIds || [],\n\t\t\t\tthis.endpoints || [],\n\t\t\t),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"group id\": this.groupId || \"(all groups)\",\n\t\t};\n\t\tif (this.nodeIds) {\n\t\t\tmessage[\"node ids\"] = this.nodeIds.join(\", \");\n\t\t}\n\t\tif (this.endpoints) {\n\t\t\tmessage.endpoints = endpointAddressesToString(this.endpoints);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCReportOptions {\n\tgroupId: number;\n\tmaxNodes: number;\n\tnodeIds: number[];\n\tendpoints: EndpointAddress[];\n\treportsToFollow: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.Report)\n@ccValueProperty(\n\t\"maxNodes\",\n\tMultiChannelAssociationCCValues.maxNodes,\n\t(self) => [self.groupId],\n)\n@ccValueProperty(\n\t\"nodeIds\",\n\tMultiChannelAssociationCCValues.nodeIds,\n\t(self) => [self.groupId],\n)\n@ccValueProperty(\n\t\"endpoints\",\n\tMultiChannelAssociationCCValues.endpoints,\n\t(self) => [self.groupId],\n)\nexport class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.groupId = options.groupId;\n\t\tthis.maxNodes = options.maxNodes;\n\t\tthis.nodeIds = options.nodeIds;\n\t\tthis.endpoints = options.endpoints;\n\t\tthis.reportsToFollow = options.reportsToFollow;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCReport {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst groupId = raw.payload[0];\n\t\tconst maxNodes = raw.payload[1];\n\t\tconst reportsToFollow = raw.payload[2];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(3),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tmaxNodes,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t\treportsToFollow,\n\t\t});\n\t}\n\n\tpublic readonly groupId: number;\n\n\tpublic maxNodes: number;\n\n\tpublic nodeIds: number[];\n\n\tpublic endpoints: EndpointAddress[];\n\n\tpublic reportsToFollow: number;\n\n\tpublic getPartialCCSessionId(): Record<string, any> | undefined {\n\t\t// Distinguish sessions by the association group ID\n\t\treturn { groupId: this.groupId };\n\t}\n\n\tpublic expectMoreMessages(): boolean {\n\t\treturn this.reportsToFollow > 0;\n\t}\n\n\tpublic mergePartialCCs(\n\t\tpartials: MultiChannelAssociationCCReport[],\n\t\t_ctx: CCParsingContext,\n\t): Promise<void> {\n\t\t// Concat the list of nodes\n\t\tthis.nodeIds = [...partials, this]\n\t\t\t.map((report) => [...report.nodeIds])\n\t\t\t.reduce((prev, cur) => prev.concat(...cur), []);\n\t\t// Concat the list of endpoints\n\t\tthis.endpoints = [...partials, this]\n\t\t\t.map((report) => [...report.endpoints])\n\t\t\t.reduce((prev, cur) => prev.concat(...cur), []);\n\t\treturn Promise.resolve();\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst destinations = serializeMultiChannelAssociationDestination(\n\t\t\tthis.nodeIds,\n\t\t\tthis.endpoints,\n\t\t);\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\tthis.groupId,\n\t\t\t\tthis.maxNodes,\n\t\t\t\tthis.reportsToFollow,\n\t\t\t]),\n\t\t\tdestinations,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"group id\": this.groupId,\n\t\t\t\t\"maximum # of nodes\": this.maxNodes,\n\t\t\t\t\"node ids\": this.nodeIds.join(\", \"),\n\t\t\t\tendpoints: endpointAddressesToString(this.endpoints),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCGetOptions {\n\tgroupId: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.Get)\n@expectedCCResponse(MultiChannelAssociationCCReport)\nexport class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.groupId < 1) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must be positive!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.groupId = options.groupId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.groupId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"group id\": this.groupId },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCSupportedGroupingsReportOptions {\n\tgroupCount: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.SupportedGroupingsReport)\n@ccValueProperty(\"groupCount\", MultiChannelAssociationCCValues.groupCount)\nexport class MultiChannelAssociationCCSupportedGroupingsReport\n\textends MultiChannelAssociationCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tMultiChannelAssociationCCSupportedGroupingsReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.groupCount = options.groupCount;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCSupportedGroupingsReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupCount = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupCount,\n\t\t});\n\t}\n\n\tpublic readonly groupCount: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.groupCount]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"group count\": this.groupCount },\n\t\t};\n\t}\n}\n\n@CCCommand(MultiChannelAssociationCommand.SupportedGroupingsGet)\n@expectedCCResponse(MultiChannelAssociationCCSupportedGroupingsReport)\nexport class MultiChannelAssociationCCSupportedGroupingsGet\n\textends MultiChannelAssociationCC\n{}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAgBO;AACP,oBAA4C;AAE5C,iBAAqC;AACrC,0BAKO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;AACP,cAAyB;AACzB,2BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCpC,SAAS,0BACR,WAAqC;AAErC,SAAO,UACL,IAAI,CAAC,EAAE,QAAQ,SAAQ,MAAM;AAC7B,QAAI,OAAO,aAAa,UAAU;AACjC,aAAO,GAAG,MAAM,IAAI,QAAQ;IAC7B,OAAO;AACN,aAAO,GAAG,MAAM,KAAK,SAAS,IAAI,MAAM,EAAE,KAAK,IAAI,CAAC;IACrD;EACD,CAAC,EACA,KAAK,IAAI;AACZ;AAZS;AAcT,MAAM,mCAAmC;AAEzC,SAAS,4CACR,SACA,WAA4B;AAE5B,QAAM,mBAAmB,QAAQ;AACjC,QAAM,uBAAuB,UAAU,SAAS;AAChD,QAAM,UAAU,IAAI;;IAEnB,oBAEI,uBAAuB,IAAI,IAAI,KAEhC;EAAoB;AAGxB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACxC,YAAQ,CAAC,IAAI,QAAQ,CAAC;EACvB;AAEA,MAAI,uBAAuB,GAAG;AAC7B,QAAI,SAAS,QAAQ;AACrB,Y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tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, type BytesView, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype AssociationAddress,\n\ttype EndpointAddress,\n\tMultiChannelAssociationCommand,\n} from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { AssociationCCValues } from \"./AssociationCC.js\";\n\nexport const MultiChannelAssociationCCValues = V.defineCCValues(\n\tCommandClasses[\"Multi Channel Association\"],\n\t{\n\t\t...V.staticProperty(\"groupCount\", undefined, { internal: true }),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"maxNodes\",\n\t\t\t\"maxNodes\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"maxNodes\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"nodeIds\",\n\t\t\t\"nodeIds\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"nodeIds\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"endpoints\",\n\t\t\t\"endpoints\",\n\t\t\t(groupId: number) => groupId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"endpoints\" && typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t},\n);\n\nfunction endpointAddressesToString(\n\tendpoints: readonly EndpointAddress[],\n): string {\n\treturn endpoints\n\t\t.map(({ nodeId, endpoint }) => {\n\t\t\tif (typeof endpoint === \"number\") {\n\t\t\t\treturn `${nodeId}:${endpoint}`;\n\t\t\t} else {\n\t\t\t\treturn `${nodeId}:[${endpoint.map(String).join(\", \")}]`;\n\t\t\t}\n\t\t})\n\t\t.join(\", \");\n}\n\nconst MULTI_CHANNEL_ASSOCIATION_MARKER = 0x00;\n\nfunction serializeMultiChannelAssociationDestination(\n\tnodeIds: number[],\n\tendpoints: EndpointAddress[],\n): Bytes {\n\tconst nodeAddressBytes = nodeIds.length;\n\tconst endpointAddressBytes = endpoints.length * 2;\n\tconst payload = new Bytes(\n\t\t// node addresses\n\t\tnodeAddressBytes\n\t\t\t// endpoint marker\n\t\t\t+ (endpointAddressBytes > 0 ? 1 : 0)\n\t\t\t// endpoints\n\t\t\t+ endpointAddressBytes,\n\t);\n\t// write node addresses\n\tfor (let i = 0; i < nodeIds.length; i++) {\n\t\tpayload[i] = nodeIds[i];\n\t}\n\t// write endpoint addresses\n\tif (endpointAddressBytes > 0) {\n\t\tlet offset = nodeIds.length;\n\t\tpayload[offset] = MULTI_CHANNEL_ASSOCIATION_MARKER;\n\t\toffset += 1;\n\t\tfor (let i = 0; i < endpoints.length; i++) {\n\t\t\tconst endpoint = endpoints[i];\n\t\t\tconst destination = typeof endpoint.endpoint === \"number\"\n\t\t\t\t// The destination is a single number\n\t\t\t\t? endpoint.endpoint & 0b0111_1111\n\t\t\t\t// The destination is a bit mask\n\t\t\t\t: encodeBitMask(endpoint.endpoint, 7)[0] | 0b1000_0000;\n\n\t\t\tpayload[offset + 2 * i] = endpoint.nodeId;\n\t\t\tpayload[offset + 2 * i + 1] = destination;\n\t\t}\n\t}\n\treturn payload;\n}\n\nfunction deserializeMultiChannelAssociationDestination(data: BytesView): {\n\tnodeIds: number[];\n\tendpoints: EndpointAddress[];\n} {\n\tconst nodeIds: number[] = [];\n\tlet endpointOffset = data.length;\n\t// Scan node ids until we find the marker\n\tfor (let i = 0; i < data.length; i++) {\n\t\tif (data[i] === MULTI_CHANNEL_ASSOCIATION_MARKER) {\n\t\t\tendpointOffset = i + 1;\n\t\t\tbreak;\n\t\t}\n\t\tnodeIds.push(data[i]);\n\t}\n\tconst endpoints: EndpointAddress[] = [];\n\tfor (let i = endpointOffset; i < data.length; i += 2) {\n\t\tconst nodeId = data[i];\n\t\tconst isBitMask = !!(data[i + 1] & 0b1000_0000);\n\t\tconst destination = data[i + 1] & 0b0111_1111;\n\t\tconst endpoint = isBitMask\n\t\t\t? parseBitMask(Bytes.from([destination]))\n\t\t\t: destination;\n\n\t\tendpoints.push({ nodeId, endpoint });\n\t}\n\n\treturn { nodeIds, endpoints };\n}\n\n// @noSetValueAPI\n\n@API(CommandClasses[\"Multi Channel Association\"])\nexport class MultiChannelAssociationCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: MultiChannelAssociationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase MultiChannelAssociationCommand.Get:\n\t\t\tcase MultiChannelAssociationCommand.Set:\n\t\t\tcase MultiChannelAssociationCommand.Report:\n\t\t\tcase MultiChannelAssociationCommand.Remove:\n\t\t\tcase MultiChannelAssociationCommand.SupportedGroupingsGet:\n\t\t\tcase MultiChannelAssociationCommand.SupportedGroupingsReport:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t/**\n\t * Returns the number of association groups a node supports.\n\t * Association groups are consecutive, starting at 1.\n\t */\n\tpublic async getGroupCount(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.SupportedGroupingsGet,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSupportedGroupingsGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultiChannelAssociationCCSupportedGroupingsReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.groupCount;\n\t}\n\n\t@validateArgs()\n\tpublic async reportGroupCount(groupCount: number): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.SupportedGroupingsReport,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSupportedGroupingsReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tgroupCount,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Returns information about an association group.\n\t */\n\t@validateArgs()\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic async getGroup(groupId: number) {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Get,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tgroupId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultiChannelAssociationCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"maxNodes\", \"nodeIds\", \"endpoints\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\toptions: MultiChannelAssociationCCReportOptions,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Report,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Adds new nodes or endpoints to an association group\n\t */\n\t@validateArgs()\n\tpublic async addDestinations(\n\t\toptions: MultiChannelAssociationCCSetOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Set,\n\t\t);\n\n\t\tconst cc = new MultiChannelAssociationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Removes nodes or endpoints from an association group\n\t */\n\t@validateArgs()\n\tpublic async removeDestinations(\n\t\toptions: MultiChannelAssociationCCRemoveOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultiChannelAssociationCommand,\n\t\t\tMultiChannelAssociationCommand.Remove,\n\t\t);\n\n\t\tif (!options.groupId && this.version === 1) {\n\t\t\t// V1 does not support omitting the group, manually remove the destination from all groups\n\t\t\t// We don't want to do too much work, so find out which groups the destination is in\n\t\t\tconst currentDestinations = MultiChannelAssociationCC\n\t\t\t\t.getAllDestinationsCached(\n\t\t\t\t\tthis.host,\n\t\t\t\t\tthis.endpoint,\n\t\t\t\t);\n\t\t\tfor (const [group, destinations] of currentDestinations) {\n\t\t\t\tconst cc = new MultiChannelAssociationCCRemove({\n\t\t\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tnodeIds: destinations\n\t\t\t\t\t\t.filter((d) => d.endpoint != undefined)\n\t\t\t\t\t\t.map((d) => d.nodeId),\n\t\t\t\t\tendpoints: destinations.filter(\n\t\t\t\t\t\t(d): d is AssociationAddress & { endpoint: number } =>\n\t\t\t\t\t\t\td.endpoint != undefined,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t\t// TODO: evaluate intermediate supervision results\n\t\t\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t\t\t}\n\t\t} else if (options.groupId && options.groupId < 0) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must not be negative!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t} else {\n\t\t\tconst cc = new MultiChannelAssociationCCRemove({\n\t\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t\t...options,\n\t\t\t});\n\t\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Multi Channel Association\"])\n@implementedVersion(5)\n@ccValues(MultiChannelAssociationCCValues)\nexport class MultiChannelAssociationCC extends CommandClass {\n\tdeclare ccCommand: MultiChannelAssociationCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\t// MultiChannelAssociationCC must be interviewed after Z-Wave+ if that is supported\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses[\"Z-Wave Plus Info\"],\n\t\t\t// We need information about endpoints to correctly configure the lifeline associations\n\t\t\tCommandClasses[\"Multi Channel\"],\n\t\t\t// AssociationCC will short-circuit if this CC is supported\n\t\t\tCommandClasses.Association,\n\t\t];\n\t}\n\n\t/**\n\t * Returns the number of association groups reported by the node/endpoint.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getGroupCountCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): number {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultiChannelAssociationCCValues.groupCount.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) || 0;\n\t}\n\n\t/**\n\t * Returns the number of nodes an association group supports.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getMaxNodesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tgroupId: number,\n\t): number {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultiChannelAssociationCCValues.maxNodes(groupId).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? 0;\n\t}\n\n\t/**\n\t * Returns all the destinations of all association groups reported by the node/endpoint.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getAllDestinationsCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): ReadonlyMap<number, readonly AssociationAddress[]> {\n\t\tconst ret = new Map<number, AssociationAddress[]>();\n\t\tconst groupCount = this.getGroupCountCached(ctx, endpoint);\n\t\tconst valueDB = ctx.getValueDB(endpoint.nodeId);\n\t\tfor (let i = 1; i <= groupCount; i++) {\n\t\t\tconst groupDestinations: AssociationAddress[] = [];\n\t\t\t// Add all node destinations\n\t\t\tconst nodes = valueDB.getValue<number[]>(\n\t\t\t\tMultiChannelAssociationCCValues.nodeIds(i).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tgroupDestinations.push(...nodes.map((nodeId) => ({ nodeId })));\n\t\t\t// And all endpoint destinations\n\t\t\tconst endpoints = valueDB.getValue<EndpointAddress[]>(\n\t\t\t\tMultiChannelAssociationCCValues.endpoints(i).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\t\tfor (const ep of endpoints) {\n\t\t\t\tif (typeof ep.endpoint === \"number\") {\n\t\t\t\t\tgroupDestinations.push({\n\t\t\t\t\t\tnodeId: ep.nodeId,\n\t\t\t\t\t\tendpoint: ep.endpoint,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tgroupDestinations.push(\n\t\t\t\t\t\t...ep.endpoint.map((e) => ({\n\t\t\t\t\t\t\tnodeId: ep.nodeId,\n\t\t\t\t\t\t\tendpoint: e,\n\t\t\t\t\t\t})),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tret.set(\n\t\t\t\ti,\n\t\t\t\t// Filter out duplicates\n\t\t\t\tgroupDestinations.filter(\n\t\t\t\t\t(addr, index) =>\n\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t=== groupDestinations.findIndex(\n\t\t\t\t\t\t\t\t({ nodeId, endpoint }) =>\n\t\t\t\t\t\t\t\t\tnodeId === addr.nodeId\n\t\t\t\t\t\t\t\t\t&& endpoint === addr.endpoint,\n\t\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst mcAPI = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First find out how many groups are supported as multi channel\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying number of multi channel association groups...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst mcGroupCount = await mcAPI.getGroupCount();\n\t\tif (mcGroupCount != undefined) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`supports ${mcGroupCount} multi channel association groups`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying multi channel association groups timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// Query each association group for its members\n\t\tawait this.refreshValues(ctx);\n\n\t\t// And set up lifeline associations\n\t\tawait ccUtils.configureLifelineAssociations(ctx, endpoint);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst mcAPI = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\t\tconst assocAPI = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst mcGroupCount: number = this.getValue(\n\t\t\tctx,\n\t\t\tMultiChannelAssociationCCValues.groupCount,\n\t\t) ?? 0;\n\n\t\t// Some devices report more association groups than multi channel association groups, so we need this info here\n\t\tconst assocGroupCount: number =\n\t\t\tthis.getValue(ctx, AssociationCCValues.groupCount)\n\t\t\t|| mcGroupCount;\n\n\t\t// Then query each multi channel association group\n\t\tfor (let groupId = 1; groupId <= mcGroupCount; groupId++) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying multi channel association group #${groupId}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst group = await mcAPI.getGroup(groupId);\n\t\t\tif (!group) continue;\n\t\t\tconst logMessage =\n\t\t\t\t`received information for multi channel association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}\ncurrently assigned endpoints: ${\n\t\t\t\t\tgroup.endpoints\n\t\t\t\t\t\t.map(({ nodeId, endpoint }) => {\n\t\t\t\t\t\t\tif (typeof endpoint === \"number\") {\n\t\t\t\t\t\t\t\treturn `${nodeId}:${endpoint}`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn `${nodeId}:[${\n\t\t\t\t\t\t\t\t\tendpoint.map(String).join(\", \")\n\t\t\t\t\t\t\t\t}]`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\t// Check if there are more non-multi-channel association groups we haven't queried yet\n\t\tif (assocAPI.isSupported() && assocGroupCount > mcGroupCount) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying additional non-multi-channel association groups...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tfor (\n\t\t\t\tlet groupId = mcGroupCount + 1;\n\t\t\t\tgroupId <= assocGroupCount;\n\t\t\t\tgroupId++\n\t\t\t) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying association group #${groupId}...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tconst group = await assocAPI.getGroup(groupId);\n\t\t\t\tif (!group) continue;\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received information for association group #${groupId}:\nmaximum # of nodes: ${group.maxNodes}\ncurrently assigned nodes: ${group.nodeIds.map(String).join(\", \")}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport type MultiChannelAssociationCCSetOptions =\n\t& {\n\t\tgroupId: number;\n\t}\n\t& (\n\t\t| { nodeIds: number[] }\n\t\t| { endpoints: EndpointAddress[] }\n\t\t| { nodeIds: number[]; endpoints: EndpointAddress[] }\n\t);\n\n@CCCommand(MultiChannelAssociationCommand.Set)\n@useSupervision()\nexport class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.groupId < 1) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must be positive!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.groupId = options.groupId;\n\t\tthis.nodeIds = (\"nodeIds\" in options && options.nodeIds) || [];\n\t\tif (this.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`All node IDs must be between 1 and ${MAX_NODES}!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.endpoints = (\"endpoints\" in options && options.endpoints)\n\t\t\t|| [];\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(1),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\tpublic nodeIds: number[];\n\tpublic endpoints: EndpointAddress[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\t[this.groupId],\n\t\t\tserializeMultiChannelAssociationDestination(\n\t\t\t\tthis.nodeIds,\n\t\t\t\tthis.endpoints,\n\t\t\t),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"group id\": this.groupId,\n\t\t\t\t\"node ids\": this.nodeIds.join(\", \"),\n\t\t\t\tendpoints: endpointAddressesToString(this.endpoints),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCRemoveOptions {\n\t/** The group from which to remove the nodes. If none is specified, the nodes will be removed from all groups. */\n\tgroupId?: number;\n\t/** The nodes to remove. If no nodeIds and no endpoint addresses are specified, ALL nodes will be removed. */\n\tnodeIds?: number[];\n\t/** The single endpoints to remove. If no nodeIds and no endpoint addresses are specified, ALL will be removed. */\n\tendpoints?: EndpointAddress[];\n}\n\n@CCCommand(MultiChannelAssociationCommand.Remove)\n@useSupervision()\nexport class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCRemoveOptions>,\n\t) {\n\t\tsuper(options);\n\t\t// When removing associations, we allow invalid node IDs.\n\t\t// See GH#3606 - it is possible that those exist.\n\t\tthis.groupId = options.groupId;\n\t\tthis.nodeIds = options.nodeIds;\n\t\tthis.endpoints = options.endpoints;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCRemove {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId: number | undefined = raw.payload[0];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(1),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t});\n\t}\n\n\tpublic groupId?: number;\n\tpublic nodeIds?: number[];\n\tpublic endpoints?: EndpointAddress[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\t[this.groupId || 0],\n\t\t\tserializeMultiChannelAssociationDestination(\n\t\t\t\tthis.nodeIds || [],\n\t\t\t\tthis.endpoints || [],\n\t\t\t),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"group id\": this.groupId || \"(all groups)\",\n\t\t};\n\t\tif (this.nodeIds) {\n\t\t\tmessage[\"node ids\"] = this.nodeIds.join(\", \");\n\t\t}\n\t\tif (this.endpoints) {\n\t\t\tmessage.endpoints = endpointAddressesToString(this.endpoints);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCReportOptions {\n\tgroupId: number;\n\tmaxNodes: number;\n\tnodeIds: number[];\n\tendpoints: EndpointAddress[];\n\treportsToFollow: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.Report)\n@ccValueProperty(\n\t\"maxNodes\",\n\tMultiChannelAssociationCCValues.maxNodes,\n\t(self) => [self.groupId],\n)\n@ccValueProperty(\n\t\"nodeIds\",\n\tMultiChannelAssociationCCValues.nodeIds,\n\t(self) => [self.groupId],\n)\n@ccValueProperty(\n\t\"endpoints\",\n\tMultiChannelAssociationCCValues.endpoints,\n\t(self) => [self.groupId],\n)\nexport class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.groupId = options.groupId;\n\t\tthis.maxNodes = options.maxNodes;\n\t\tthis.nodeIds = options.nodeIds;\n\t\tthis.endpoints = options.endpoints;\n\t\tthis.reportsToFollow = options.reportsToFollow;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCReport {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst groupId = raw.payload[0];\n\t\tconst maxNodes = raw.payload[1];\n\t\tconst reportsToFollow = raw.payload[2];\n\n\t\tconst { nodeIds, endpoints } =\n\t\t\tdeserializeMultiChannelAssociationDestination(\n\t\t\t\traw.payload.subarray(3),\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t\tmaxNodes,\n\t\t\tnodeIds,\n\t\t\tendpoints,\n\t\t\treportsToFollow,\n\t\t});\n\t}\n\n\tpublic readonly groupId: number;\n\n\tpublic maxNodes: number;\n\n\tpublic nodeIds: number[];\n\n\tpublic endpoints: EndpointAddress[];\n\n\tpublic reportsToFollow: number;\n\n\tpublic getPartialCCSessionId(): Record<string, any> | undefined {\n\t\t// Distinguish sessions by the association group ID\n\t\treturn { groupId: this.groupId };\n\t}\n\n\tpublic expectMoreMessages(): boolean {\n\t\treturn this.reportsToFollow > 0;\n\t}\n\n\tpublic mergePartialCCs(\n\t\tpartials: MultiChannelAssociationCCReport[],\n\t\t_ctx: CCParsingContext,\n\t): Promise<void> {\n\t\t// Concat the list of nodes\n\t\tthis.nodeIds = [...partials, this]\n\t\t\t.map((report) => [...report.nodeIds])\n\t\t\t.reduce((prev, cur) => prev.concat(...cur), []);\n\t\t// Concat the list of endpoints\n\t\tthis.endpoints = [...partials, this]\n\t\t\t.map((report) => [...report.endpoints])\n\t\t\t.reduce((prev, cur) => prev.concat(...cur), []);\n\t\treturn Promise.resolve();\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst destinations = serializeMultiChannelAssociationDestination(\n\t\t\tthis.nodeIds,\n\t\t\tthis.endpoints,\n\t\t);\n\t\tthis.payload = Bytes.concat([\n\t\t\t[\n\t\t\t\tthis.groupId,\n\t\t\t\tthis.maxNodes,\n\t\t\t\tthis.reportsToFollow,\n\t\t\t],\n\t\t\tdestinations,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"group id\": this.groupId,\n\t\t\t\t\"maximum # of nodes\": this.maxNodes,\n\t\t\t\t\"node ids\": this.nodeIds.join(\", \"),\n\t\t\t\tendpoints: endpointAddressesToString(this.endpoints),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCGetOptions {\n\tgroupId: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.Get)\n@expectedCCResponse(MultiChannelAssociationCCReport)\nexport class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultiChannelAssociationCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.groupId < 1) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The group id must be positive!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.groupId = options.groupId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupId,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.groupId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"group id\": this.groupId },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultiChannelAssociationCCSupportedGroupingsReportOptions {\n\tgroupCount: number;\n}\n\n@CCCommand(MultiChannelAssociationCommand.SupportedGroupingsReport)\n@ccValueProperty(\"groupCount\", MultiChannelAssociationCCValues.groupCount)\nexport class MultiChannelAssociationCCSupportedGroupingsReport\n\textends MultiChannelAssociationCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tMultiChannelAssociationCCSupportedGroupingsReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.groupCount = options.groupCount;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultiChannelAssociationCCSupportedGroupingsReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst groupCount = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tgroupCount,\n\t\t});\n\t}\n\n\tpublic readonly groupCount: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.groupCount]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"group count\": this.groupCount },\n\t\t};\n\t}\n}\n\n@CCCommand(MultiChannelAssociationCommand.SupportedGroupingsGet)\n@expectedCCResponse(MultiChannelAssociationCCSupportedGroupingsReport)\nexport class MultiChannelAssociationCCSupportedGroupingsGet\n\textends MultiChannelAssociationCC\n{}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAgBO;AACP,oBAA4C;AAE5C,iBAAqC;AACrC,0BAKO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;AACP,cAAyB;AACzB,2BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCpC,SAAS,0BACR,WAAqC;AAErC,SAAO,UACL,IAAI,CAAC,EAAE,QAAQ,SAAQ,MAAM;AAC7B,QAAI,OAAO,aAAa,UAAU;AACjC,aAAO,GAAG,MAAM,IAAI,QAAQ;IAC7B,OAAO;AACN,aAAO,GAAG,MAAM,KAAK,SAAS,IAAI,MAAM,EAAE,KAAK,IAAI,CAAC;IACrD;EACD,CAAC,EACA,KAAK,IAAI;AACZ;AAZS;AAcT,MAAM,mCAAmC;AAEzC,SAAS,4CACR,SACA,WAA4B;AAE5B,QAAM,mBAAmB,QAAQ;AACjC,QAAM,uBAAuB,UAAU,SAAS;AAChD,QAAM,UAAU,IAAI;;IAEnB,oBAEI,uBAAuB,IAAI,IAAI,KAEhC;EAAoB;AAGxB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACxC,YAAQ,CAAC,IAAI,QAAQ,CAAC;EACvB;AAEA,MAAI,uBAAuB,GAAG;AAC7B,QAAI,SAAS,QAAQ;AACrB,YAAQ,MAAM,IAAI;AAClB,cAAU;AACV,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,YAAM,WAAW,UAAU,CAAC;AAC5B,YAAM,cAAc,OAAO,SAAS,aAAa,WAE9C,SAAS,WAAW,UAEpB,2BAAc,SAAS,UAAU,CAAC,EAAE,CAAC,IAAI;AAE5C,cAAQ,SAAS,IAAI,CAAC,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A,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IAGZ,YACC,SAEC;AAED,YAAM,OAAO;AAEb,WAAK,aAAa,QAAQ;IAC3B;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,aAAa,IAAI,QAAQ,CAAC;AAEhC,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEgB;IAET,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,UAAU,CAAC;AAC3C,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,eAAe,KAAK,WAAU;;IAE3C;;;;IAKY,kDAA8C,MAAA;8BAF1D,yCAAU,4CAA+B,qBAAqB,OAC9D,kDAAmB,iDAAiD,CAAC;;;;oBAE7D;sEAAA,YAAyB;WAAA;;;;;;;;AADlC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": ["endpoint"]
|
|
7
7
|
}
|
|
@@ -730,9 +730,9 @@ let MultiChannelCCCapabilityReport = (() => {
|
|
|
730
730
|
wasRemoved;
|
|
731
731
|
serialize(ctx) {
|
|
732
732
|
this.payload = import_shared.Bytes.concat([
|
|
733
|
-
|
|
733
|
+
[
|
|
734
734
|
this.endpointIndex & 127 | (this.isDynamic ? 128 : 0)
|
|
735
|
-
]
|
|
735
|
+
],
|
|
736
736
|
(0, import_core.encodeApplicationNodeInformation)(this)
|
|
737
737
|
]);
|
|
738
738
|
return super.serialize(ctx);
|
|
@@ -850,11 +850,11 @@ let MultiChannelCCEndPointFindReport = (() => {
|
|
|
850
850
|
reportsToFollow;
|
|
851
851
|
serialize(ctx) {
|
|
852
852
|
this.payload = import_shared.Bytes.concat([
|
|
853
|
-
|
|
853
|
+
[
|
|
854
854
|
this.reportsToFollow,
|
|
855
855
|
this.genericClass,
|
|
856
856
|
this.specificClass
|
|
857
|
-
]
|
|
857
|
+
],
|
|
858
858
|
import_shared.Bytes.from(this.foundEndpoints.map((e) => e & 127))
|
|
859
859
|
]);
|
|
860
860
|
return super.serialize(ctx);
|
|
@@ -1122,7 +1122,7 @@ let MultiChannelCCCommandEncapsulation = (() => {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
const destination = typeof this.destination === "number" ? this.destination & 127 : (0, import_core.encodeBitMask)(this.destination, 7)[0] | 128;
|
|
1124
1124
|
this.payload = import_shared.Bytes.concat([
|
|
1125
|
-
|
|
1125
|
+
[this.endpointIndex & 127, destination],
|
|
1126
1126
|
await this.encapsulated.serialize(ctx)
|
|
1127
1127
|
]);
|
|
1128
1128
|
return super.serialize(ctx);
|
|
@@ -1314,7 +1314,7 @@ let MultiChannelCCV1CommandEncapsulation = (() => {
|
|
|
1314
1314
|
encapsulated;
|
|
1315
1315
|
async serialize(ctx) {
|
|
1316
1316
|
this.payload = import_shared.Bytes.concat([
|
|
1317
|
-
|
|
1317
|
+
[this.endpointIndex],
|
|
1318
1318
|
await this.encapsulated.serialize(ctx)
|
|
1319
1319
|
]);
|
|
1320
1320
|
return super.serialize(ctx);
|