@zwave-js/cc 15.25.2 → 15.25.3

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 (159) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +10 -14
  2. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  3. package/build/cjs/cc/AssociationCC.d.ts +1 -1
  4. package/build/cjs/cc/AssociationCC.js.map +1 -1
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +16 -16
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  7. package/build/cjs/cc/BarrierOperatorCC.js +4 -4
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  9. package/build/cjs/cc/BinarySensorCC.js +3 -3
  10. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  11. package/build/cjs/cc/CentralSceneCC.js +7 -6
  12. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  13. package/build/cjs/cc/ColorSwitchCC.js +4 -4
  14. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  15. package/build/cjs/cc/ConfigurationCC.js +22 -25
  16. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  17. package/build/cjs/cc/DoorLockCC.js +44 -60
  18. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  19. package/build/cjs/cc/HumidityControlModeCC.js +4 -5
  20. package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
  21. package/build/cjs/cc/HumidityControlSetpointCC.js +14 -14
  22. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  23. package/build/cjs/cc/IrrigationCC.js +21 -25
  24. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  25. package/build/cjs/cc/MeterCC.js +9 -10
  26. package/build/cjs/cc/MeterCC.js.map +2 -2
  27. package/build/cjs/cc/MultiChannelCC.d.ts +1 -1
  28. package/build/cjs/cc/MultiChannelCC.js +17 -21
  29. package/build/cjs/cc/MultiChannelCC.js.map +2 -2
  30. package/build/cjs/cc/MultilevelSensorCC.js +8 -6
  31. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  32. package/build/cjs/cc/NotificationCC.js +4 -8
  33. package/build/cjs/cc/NotificationCC.js.map +2 -2
  34. package/build/cjs/cc/ProtectionCC.js +11 -12
  35. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  36. package/build/cjs/cc/Security2CC.js +12 -22
  37. package/build/cjs/cc/Security2CC.js.map +2 -2
  38. package/build/cjs/cc/SecurityCC.js +8 -16
  39. package/build/cjs/cc/SecurityCC.js.map +2 -2
  40. package/build/cjs/cc/ThermostatFanModeCC.js +4 -4
  41. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  42. package/build/cjs/cc/ThermostatModeCC.js +4 -4
  43. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  44. package/build/cjs/cc/ThermostatOperatingStateCC.js +1 -2
  45. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  46. package/build/cjs/cc/ThermostatSetpointCC.js +4 -3
  47. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  48. package/build/cjs/cc/UserCodeCC.js +2 -4
  49. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  50. package/build/cjs/cc/WindowCoveringCC.js +5 -5
  51. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  52. package/build/cjs/cc/_CCValues.generated.d.ts +4 -4
  53. package/build/cjs/cc/_CCValues.generated.js +2 -2
  54. package/build/cjs/cc/_CCValues.generated.js.map +1 -1
  55. package/build/cjs/cc/index.d.ts +3 -3
  56. package/build/cjs/cc/index.js.map +2 -2
  57. package/build/cjs/lib/CommandClass.d.ts +3 -1
  58. package/build/cjs/lib/CommandClass.js +25 -3
  59. package/build/cjs/lib/CommandClass.js.map +2 -2
  60. package/build/cjs/lib/Security2/Extension.d.ts +6 -4
  61. package/build/cjs/lib/Security2/Extension.js +22 -20
  62. package/build/cjs/lib/Security2/Extension.js.map +2 -2
  63. package/build/cjs/lib/_Types.js.map +1 -1
  64. package/build/cjs/lib/utils.js +14 -8
  65. package/build/cjs/lib/utils.js.map +2 -2
  66. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  67. package/build/esm/cc/AlarmSensorCC.js +11 -17
  68. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  69. package/build/esm/cc/AssociationCC.d.ts +1 -1
  70. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  71. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  72. package/build/esm/cc/AssociationGroupInfoCC.js +18 -21
  73. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  74. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  75. package/build/esm/cc/BarrierOperatorCC.js +5 -7
  76. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  77. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  78. package/build/esm/cc/BinarySensorCC.js +4 -6
  79. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  80. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  81. package/build/esm/cc/CentralSceneCC.js +8 -8
  82. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  83. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  84. package/build/esm/cc/ColorSwitchCC.js +5 -7
  85. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  86. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  87. package/build/esm/cc/ConfigurationCC.js +29 -29
  88. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  89. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  90. package/build/esm/cc/DoorLockCC.js +70 -73
  91. package/build/esm/cc/DoorLockCC.js.map +1 -1
  92. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  93. package/build/esm/cc/HumidityControlModeCC.js +5 -8
  94. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  95. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  96. package/build/esm/cc/HumidityControlSetpointCC.js +15 -22
  97. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  98. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  99. package/build/esm/cc/IrrigationCC.js +26 -24
  100. package/build/esm/cc/IrrigationCC.js.map +1 -1
  101. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  102. package/build/esm/cc/MeterCC.js +12 -18
  103. package/build/esm/cc/MeterCC.js.map +1 -1
  104. package/build/esm/cc/MultiChannelCC.d.ts +1 -1
  105. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  106. package/build/esm/cc/MultiChannelCC.js +18 -23
  107. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  108. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  109. package/build/esm/cc/MultilevelSensorCC.js +11 -19
  110. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  111. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  112. package/build/esm/cc/NotificationCC.js +6 -13
  113. package/build/esm/cc/NotificationCC.js.map +1 -1
  114. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  115. package/build/esm/cc/ProtectionCC.js +12 -21
  116. package/build/esm/cc/ProtectionCC.js.map +1 -1
  117. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  118. package/build/esm/cc/Security2CC.js +13 -31
  119. package/build/esm/cc/Security2CC.js.map +1 -1
  120. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  121. package/build/esm/cc/SecurityCC.js +9 -21
  122. package/build/esm/cc/SecurityCC.js.map +1 -1
  123. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  124. package/build/esm/cc/ThermostatFanModeCC.js +5 -7
  125. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  126. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  127. package/build/esm/cc/ThermostatModeCC.js +5 -7
  128. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  129. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  130. package/build/esm/cc/ThermostatOperatingStateCC.js +2 -4
  131. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  132. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  133. package/build/esm/cc/ThermostatSetpointCC.js +5 -9
  134. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  135. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  136. package/build/esm/cc/UserCodeCC.js +3 -7
  137. package/build/esm/cc/UserCodeCC.js.map +1 -1
  138. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  139. package/build/esm/cc/WindowCoveringCC.js +6 -9
  140. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  141. package/build/esm/cc/_CCValues.generated.d.ts +4 -4
  142. package/build/esm/cc/_CCValues.generated.js +2 -2
  143. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  144. package/build/esm/cc/index.d.ts +3 -3
  145. package/build/esm/cc/index.d.ts.map +1 -1
  146. package/build/esm/cc/index.js.map +1 -1
  147. package/build/esm/lib/CommandClass.d.ts +3 -1
  148. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  149. package/build/esm/lib/CommandClass.js +30 -4
  150. package/build/esm/lib/CommandClass.js.map +1 -1
  151. package/build/esm/lib/Security2/Extension.d.ts +6 -4
  152. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  153. package/build/esm/lib/Security2/Extension.js +23 -21
  154. package/build/esm/lib/Security2/Extension.js.map +1 -1
  155. package/build/esm/lib/_Types.js +1 -1
  156. package/build/esm/lib/utils.d.ts.map +1 -1
  157. package/build/esm/lib/utils.js +15 -9
  158. package/build/esm/lib/utils.js.map +1 -1
  159. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/utils.ts"],
4
- "sourcesContent": ["import type { AssociationConfig, GetDeviceConfig } from \"@zwave-js/config\";\nimport {\n\tCommandClasses,\n\ttype ControlsCC,\n\ttype EndpointId,\n\ttype GetAllEndpoints,\n\ttype GetEndpoint,\n\ttype GetNode,\n\ttype GetValueDB,\n\ttype HostIDs,\n\ttype MaybeNotKnown,\n\tNOT_KNOWN,\n\ttype NodeId,\n\ttype QuerySecurityClasses,\n\tSecurityClass,\n\ttype SupportsCC,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tactuatorCCs,\n\tgetCCName,\n\tisActuatorCC,\n\tisLongRangeNodeId,\n\tisSensorCC,\n} from \"@zwave-js/core\";\nimport {\n\tObjectKeyMap,\n\ttype ReadonlyObjectKeyMap,\n\tgetEnumMemberName,\n} from \"@zwave-js/shared\";\nimport { distinct } from \"alcalzone-shared/arrays\";\nimport { AssociationCC, AssociationCCValues } from \"../cc/AssociationCC.js\";\nimport { AssociationGroupInfoCC } from \"../cc/AssociationGroupInfoCC.js\";\nimport { MultiChannelAssociationCC } from \"../cc/MultiChannelAssociationCC.js\";\nimport { CCAPI, type CCAPIHost, type CCAPINode } from \"./API.js\";\nimport {\n\ttype AssociationAddress,\n\tAssociationCheckResult,\n\ttype AssociationGroup,\n\tAssociationGroupInfoProfile,\n\ttype EndpointAddress,\n} from \"./_Types.js\";\n\nexport function getAssociations(\n\tctx: GetValueDB,\n\tendpoint: EndpointId & SupportsCC,\n): ReadonlyMap<number, readonly AssociationAddress[]> {\n\tconst ret = new Map<number, readonly AssociationAddress[]>();\n\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tconst destinations = AssociationCC.getAllDestinationsCached(\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tfor (const [groupId, assocs] of destinations) {\n\t\t\tret.set(groupId, assocs);\n\t\t}\n\t} else {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Merge the \"normal\" destinations with multi channel destinations\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tconst destinations = MultiChannelAssociationCC.getAllDestinationsCached(\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tfor (const [groupId, assocs] of destinations) {\n\t\t\tif (ret.has(groupId)) {\n\t\t\t\tconst normalAssociations = ret.get(groupId)!;\n\t\t\t\tret.set(groupId, [\n\t\t\t\t\t...normalAssociations,\n\t\t\t\t\t// Eliminate potential duplicates\n\t\t\t\t\t...assocs.filter(\n\t\t\t\t\t\t(a1) =>\n\t\t\t\t\t\t\t!normalAssociations.some(\n\t\t\t\t\t\t\t\t(a2) =>\n\t\t\t\t\t\t\t\t\ta1.nodeId === a2.nodeId\n\t\t\t\t\t\t\t\t\t&& a1.endpoint === a2.endpoint,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tret.set(groupId, assocs);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn ret;\n}\n\nexport function getAllAssociations(\n\tctx: GetValueDB,\n\tnode: NodeId & GetAllEndpoints<EndpointId & SupportsCC>,\n): ReadonlyObjectKeyMap<\n\tAssociationAddress,\n\tReadonlyMap<number, readonly AssociationAddress[]>\n> {\n\tconst ret = new ObjectKeyMap<\n\t\tAssociationAddress,\n\t\tReadonlyMap<number, readonly AssociationAddress[]>\n\t>();\n\tfor (const endpoint of node.getAllEndpoints()) {\n\t\tconst address: AssociationAddress = {\n\t\t\tnodeId: node.id,\n\t\t\tendpoint: endpoint.index,\n\t\t};\n\t\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\t\tret.set(address, getAssociations(ctx, endpoint));\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport function checkAssociation(\n\tctx:\n\t\t& HostIDs\n\t\t& GetValueDB\n\t\t& GetNode<\n\t\t\t& NodeId\n\t\t\t& SupportsCC\n\t\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t\t& QuerySecurityClasses\n\t\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestination: AssociationAddress,\n): AssociationCheckResult {\n\t// Check that the target endpoint exists except when adding an association to the controller\n\tconst targetNode = ctx.getNodeOrThrow(destination.nodeId);\n\tconst targetEndpoint = destination.nodeId === ctx.ownNodeId\n\t\t? targetNode\n\t\t: targetNode.getEndpointOrThrow(destination.endpoint ?? 0);\n\n\tif (\n\t\t!endpoint.supportsCC(CommandClasses.Association)\n\t\t&& !endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])\n\t) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Associations to and from ZWLR devices are not allowed\n\tif (isLongRangeNodeId(destination.nodeId)) {\n\t\treturn AssociationCheckResult.Forbidden_DestinationIsLongRange;\n\t} else if (isLongRangeNodeId(endpoint.nodeId)) {\n\t\t// Except the lifeline back to the host\n\t\tif (group !== 1 || destination.nodeId !== ctx.ownNodeId) {\n\t\t\treturn AssociationCheckResult.Forbidden_SourceIsLongRange;\n\t\t}\n\t}\n\n\t// The following checks don't apply to Lifeline associations\n\tif (destination.nodeId === ctx.ownNodeId) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\t// Disallow self-associations\n\tif (destination.nodeId === endpoint.nodeId) {\n\t\treturn AssociationCheckResult.Forbidden_SelfAssociation;\n\t}\n\n\t// For Association version 1 and version 2 / MCA version 1-3:\n\t// A controlling node MUST NOT associate Node A to a Node B destination\n\t// if Node A and Node B\u2019s highest Security Class are not identical.\n\t// For Association version 3 / MCA version 4:\n\t// A controlling node MUST NOT associate Node A to a Node B destination\n\t// if Node A was not granted Node B\u2019s highest Security Class.\n\n\tconst sourceNode = ctx.getNode(endpoint.nodeId)!;\n\tlet securityClassMustMatch: boolean;\n\tif (destination.endpoint == undefined) {\n\t\t// \"normal\" association\n\t\tconst sourceNodeCCVersion = endpoint.getCCVersion(\n\t\t\tCommandClasses.Association,\n\t\t);\n\t\tsecurityClassMustMatch = sourceNodeCCVersion < 3;\n\t} else {\n\t\t// multi channel association\n\t\tconst sourceNodeCCVersion = endpoint.getCCVersion(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t);\n\t\tsecurityClassMustMatch = sourceNodeCCVersion < 4;\n\t}\n\n\tconst sourceSecurityClass = sourceNode.getHighestSecurityClass();\n\tconst targetSecurityClass = targetNode.getHighestSecurityClass();\n\n\t// If the security classes are unknown, all bets are off\n\tif (sourceSecurityClass != undefined && targetSecurityClass != undefined) {\n\t\tif (\n\t\t\tsecurityClassMustMatch\n\t\t\t&& sourceSecurityClass !== targetSecurityClass\n\t\t) {\n\t\t\treturn AssociationCheckResult.Forbidden_SecurityClassMismatch;\n\t\t} else if (\n\t\t\t// Commands to insecure nodes are allowed\n\t\t\ttargetSecurityClass !== SecurityClass.None\n\t\t\t// Otherwise, the sender must know the target's highest key\n\t\t\t&& !securityClassMustMatch\n\t\t\t&& !sourceNode.hasSecurityClass(targetSecurityClass)\n\t\t) {\n\t\t\treturn AssociationCheckResult\n\t\t\t\t.Forbidden_DestinationSecurityClassNotGranted;\n\t\t}\n\t}\n\n\t// SDS14223:\n\t// A controlling node MUST NOT associate Node A to a Node B destination that does not support\n\t// the Command Class that the Node A will be controlling\n\t//\n\t// To determine this, the node must support the AGI CC or we have no way of knowing which\n\t// CCs the node will control\n\tif (!endpoint.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\tconst groupCommandList = AssociationGroupInfoCC.getIssuedCommandsCached(\n\t\tctx,\n\t\tendpoint,\n\t\tgroup,\n\t);\n\tif (!groupCommandList || !groupCommandList.size) {\n\t\t// We don't know which CCs this group controls, just allow it\n\t\treturn AssociationCheckResult.OK;\n\t}\n\tconst groupCCs = [...groupCommandList.keys()];\n\n\t// A controlling node MAY create an association to a destination supporting an\n\t// actuator Command Class if the actual association group sends Basic Control Command Class.\n\tif (\n\t\tgroupCCs.includes(CommandClasses.Basic)\n\t\t&& actuatorCCs.some((cc) => targetEndpoint?.supportsCC(cc))\n\t) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\t// Enforce that at least one issued CC is supported\n\tif (groupCCs.some((cc) => targetEndpoint?.supportsCC(cc))) {\n\t\treturn AssociationCheckResult.OK;\n\t} else {\n\t\treturn AssociationCheckResult.Forbidden_NoSupportedCCs;\n\t}\n}\n\nexport function getAssociationGroups(\n\tctx: GetValueDB & GetDeviceConfig,\n\tendpoint: EndpointId & SupportsCC,\n): ReadonlyMap<number, AssociationGroup> {\n\t// Check whether we have multi channel support or not\n\tlet assocInstance: typeof AssociationCC;\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t} else {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t}\n\n\tconst assocGroupCount = assocInstance.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst mcGroupCount = mcInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst groupCount = Math.max(assocGroupCount, mcGroupCount);\n\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\n\tconst ret = new Map<number, AssociationGroup>();\n\n\tif (endpoint.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\t// We can read all information we need from the AGI CC\n\t\tconst agiInstance = AssociationGroupInfoCC;\n\t\tfor (let group = 1; group <= groupCount; group++) {\n\t\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\t\tendpoint.index,\n\t\t\t\tgroup,\n\t\t\t);\n\t\t\tconst multiChannel = !!mcInstance && group <= mcGroupCount;\n\t\t\tret.set(group, {\n\t\t\t\tmaxNodes: (multiChannel\n\t\t\t\t\t? mcInstance!\n\t\t\t\t\t: assocInstance).getMaxNodesCached(\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\tgroup,\n\t\t\t\t\t) || 1,\n\t\t\t\t// AGI implies Z-Wave+ where group 1 is the lifeline\n\t\t\t\tisLifeline: group === 1,\n\t\t\t\tlabel:\n\t\t\t\t\t// prefer the configured label if we have one\n\t\t\t\t\tassocConfig?.label\n\t\t\t\t\t\t// the ones reported by AGI are sometimes pretty bad\n\t\t\t\t\t\t?? agiInstance.getGroupNameCached(\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\t\tgroup,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t// but still better than \"unnamed\"\n\t\t\t\t\t\t?? `Unnamed group ${group}`,\n\t\t\t\tmultiChannel,\n\t\t\t\tprofile: agiInstance.getGroupProfileCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tendpoint,\n\t\t\t\t\tgroup,\n\t\t\t\t),\n\t\t\t\tissuedCommands: agiInstance.getIssuedCommandsCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tendpoint,\n\t\t\t\t\tgroup,\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t} else {\n\t\t// we need to consult the device config\n\t\tfor (let group = 1; group <= groupCount; group++) {\n\t\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\t\tendpoint.index,\n\t\t\t\tgroup,\n\t\t\t);\n\t\t\tconst multiChannel = !!mcInstance && group <= mcGroupCount;\n\t\t\tret.set(group, {\n\t\t\t\tmaxNodes: (multiChannel\n\t\t\t\t\t? mcInstance!\n\t\t\t\t\t: assocInstance).getMaxNodesCached(\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\tgroup,\n\t\t\t\t\t)\n\t\t\t\t\t|| assocConfig?.maxNodes\n\t\t\t\t\t|| 1,\n\t\t\t\tisLifeline: assocConfig?.isLifeline ?? group === 1,\n\t\t\t\tlabel: assocConfig?.label ?? `Unnamed group ${group}`,\n\t\t\t\tmultiChannel,\n\t\t\t});\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport function getAllAssociationGroups(\n\tctx: GetValueDB & GetDeviceConfig,\n\tnode: NodeId & GetAllEndpoints<EndpointId & SupportsCC>,\n): ReadonlyMap<number, ReadonlyMap<number, AssociationGroup>> {\n\tconst ret = new Map<number, ReadonlyMap<number, AssociationGroup>>();\n\tfor (const endpoint of node.getAllEndpoints()) {\n\t\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\t\tret.set(endpoint.index, getAssociationGroups(ctx, endpoint));\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport async function addAssociations(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t& QuerySecurityClasses\n\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestinations: AssociationAddress[],\n\toptions?: {\n\t\t/**\n\t\t * Whether to force creating associations even if they are not allowed.\n\t\t * **Note:** Invalid associations will most likely not work\n\t\t */\n\t\tforce?: boolean;\n\t},\n): Promise<void> {\n\tconst nodeAndEndpointString = `${endpoint.nodeId}${\n\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t}`;\n\n\t// Check whether we should add any associations the device does not have support for\n\tlet assocInstance: typeof AssociationCC | undefined;\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\t// Split associations into conventional and endpoint associations\n\tconst nodeAssociations = distinct(\n\t\tdestinations\n\t\t\t.filter((a) => a.endpoint == undefined)\n\t\t\t.map((a) => a.nodeId),\n\t);\n\tconst endpointAssociations = destinations.filter(\n\t\t(a) => a.endpoint != undefined,\n\t) as EndpointAddress[];\n\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t} else if (nodeAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t} else if (endpointAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Disallow associating a node with itself. This is technically checked as part of\n\t// checkAssociations, but here we provide a better error message.\n\tconst selfAssociations = destinations.filter((d) =>\n\t\td.nodeId === endpoint.nodeId\n\t);\n\tif (selfAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Associating a node with itself is not allowed!`,\n\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\tselfAssociations.map((a) => ({\n\t\t\t\t...a,\n\t\t\t\tcheckResult: AssociationCheckResult.Forbidden_SelfAssociation,\n\t\t\t})),\n\t\t);\n\t}\n\n\tconst assocGroupCount = assocInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst mcGroupCount = mcInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst groupCount = Math.max(assocGroupCount, mcGroupCount);\n\tif (group > groupCount) {\n\t\tthrow new ZWaveError(\n\t\t\t`Group ${group} does not exist on node ${nodeAndEndpointString}`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\n\tconst groupIsMultiChannel = !!mcInstance\n\t\t&& group <= mcGroupCount\n\t\t&& deviceConfig?.associations?.get(group)?.multiChannel !== false;\n\n\tif (groupIsMultiChannel) {\n\t\t// Check that all associations are allowed\n\t\tif (!options?.force) {\n\t\t\tconst disallowedAssociations = destinations.map(\n\t\t\t\t(a) => ({\n\t\t\t\t\t...a,\n\t\t\t\t\tcheckResult: checkAssociation(ctx, endpoint, group, a),\n\t\t\t\t}),\n\t\t\t).filter(({ checkResult }) =>\n\t\t\t\tcheckResult !== AssociationCheckResult.OK\n\t\t\t);\n\t\t\tif (disallowedAssociations.length) {\n\t\t\t\tlet message = `The following associations are not allowed:`;\n\t\t\t\tmessage += disallowedAssociations\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(a) =>\n\t\t\t\t\t\t\t`\\n\u00B7 Node ${a.nodeId}${\n\t\t\t\t\t\t\t\ta.endpoint ? `, endpoint ${a.endpoint}` : \"\"\n\t\t\t\t\t\t\t}: ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tAssociationCheckResult,\n\t\t\t\t\t\t\t\t\ta.checkResult,\n\t\t\t\t\t\t\t\t).replace(\"Forbidden_\", \"\")\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\");\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\tmessage,\n\t\t\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\t\t\tdisallowedAssociations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// And add them\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.addDestinations({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t\tendpoints: endpointAssociations,\n\t\t});\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t} else {\n\t\t// Although the node supports multi channel associations, this group only supports \"normal\" associations\n\t\tif (destinations.some((a) => a.endpoint != undefined)) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Node ${nodeAndEndpointString}, group ${group} does not support multi channel associations!`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\t// Check that all associations are allowed\n\t\tif (!options?.force) {\n\t\t\tconst disallowedAssociations = destinations.map(\n\t\t\t\t(a) => ({\n\t\t\t\t\t...a,\n\t\t\t\t\tcheckResult: checkAssociation(ctx, endpoint, group, a),\n\t\t\t\t}),\n\t\t\t).filter(({ checkResult }) =>\n\t\t\t\tcheckResult !== AssociationCheckResult.OK\n\t\t\t);\n\t\t\tif (disallowedAssociations.length) {\n\t\t\t\tlet message =\n\t\t\t\t\t`The associations to the following nodes are not allowed`;\n\t\t\t\tmessage += disallowedAssociations\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(a) =>\n\t\t\t\t\t\t\t`\\n\u00B7 Node ${a.nodeId}: ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tAssociationCheckResult,\n\t\t\t\t\t\t\t\t\ta.checkResult,\n\t\t\t\t\t\t\t\t).replace(\"Forbidden_\", \"\")\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\");\n\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\tmessage,\n\t\t\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\t\t\tdisallowedAssociations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.addNodeIds(group, ...destinations.map((a) => a.nodeId));\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t}\n}\n\nexport async function removeAssociations(\n\tctx: CCAPIHost,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestinations: AssociationAddress[],\n): Promise<void> {\n\tconst nodeAndEndpointString = `${endpoint.nodeId}${\n\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t}`;\n\n\t// Split associations into conventional and endpoint associations\n\tconst nodeAssociations = distinct(\n\t\tdestinations\n\t\t\t.filter((a) => a.endpoint == undefined)\n\t\t\t.map((a) => a.nodeId),\n\t);\n\tconst endpointAssociations = destinations.filter(\n\t\t(a) => a.endpoint != undefined,\n\t) as EndpointAddress[];\n\n\t// Removing associations is not either/or - we could have a device with duplicated associations between\n\t// Association CC and Multi Channel Association CC\n\t// Figure out what we need to use to remove the associations\n\n\tlet groupExistsAsMultiChannel = false;\n\tlet groupExistsAsNodeAssociation = false;\n\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tlet assocInstance: typeof AssociationCC | undefined;\n\n\t// To remove a multi channel association, we need to make sure that the group exists\n\t// and the node supports multi channel associations\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t\tif (group <= mcInstance.getGroupCountCached(ctx, endpoint)) {\n\t\t\tgroupExistsAsMultiChannel = true;\n\t\t}\n\t} else if (endpointAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// To remove a normal association, we need to make sure that the group exists either as a normal association\n\t// or as a multi channel association\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t\tif (group <= assocInstance.getGroupCountCached(ctx, endpoint)) {\n\t\t\tgroupExistsAsNodeAssociation = true;\n\t\t}\n\t}\n\n\tif (!mcInstance && !assocInstance) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Ensure the group exists and can be used\n\tif (!groupExistsAsMultiChannel && !groupExistsAsNodeAssociation) {\n\t\tthrow new ZWaveError(\n\t\t\t` Association group ${group} does not exist for node ${nodeAndEndpointString}`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\tif (endpointAssociations.length > 0 && !groupExistsAsMultiChannel) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString}, association group ${group} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\n\t// Even if we only remove node associations, we use both CCs since it has been found that some\n\t// devices do not correctly share the node list between the two commands\n\tif (\n\t\tassocInstance\n\t\t&& nodeAssociations.length > 0\n\t\t&& groupExistsAsNodeAssociation\n\t) {\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.removeNodeIds({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t});\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t}\n\n\tif (mcInstance && groupExistsAsMultiChannel) {\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.removeDestinations({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t\tendpoints: endpointAssociations,\n\t\t});\n\t\t// Refresh the multi channel association list\n\t\tawait api.getGroup(group);\n\t}\n}\n\nexport function getLifelineGroupIds(\n\tctx: GetValueDB & GetDeviceConfig,\n\tendpoint: EndpointId & SupportsCC,\n): number[] {\n\t// For now only support this for the root endpoint - i.e. node\n\tif (endpoint.index > 0) return [];\n\n\t// Some nodes define multiple lifeline groups, so we need to assign us to\n\t// all of them\n\tconst lifelineGroups: number[] = [];\n\n\t// If the target node supports Z-Wave+ info that means the lifeline MUST be group #1\n\tif (endpoint.supportsCC(CommandClasses[\"Z-Wave Plus Info\"])) {\n\t\tlifelineGroups.push(1);\n\t}\n\n\t// We have a device config file that tells us which (additional) association to assign\n\tlet associations: ReadonlyMap<number, AssociationConfig> | undefined;\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\tif (endpoint.index === 0) {\n\t\t// The root endpoint's associations may be configured separately or as part of \"endpoints\"\n\t\tassociations = deviceConfig?.associations\n\t\t\t?? deviceConfig?.endpoints?.get(0)?.associations;\n\t} else {\n\t\t// The other endpoints can only have a configuration as part of \"endpoints\"\n\t\tassociations = deviceConfig?.endpoints?.get(\n\t\t\tendpoint.index,\n\t\t)?.associations;\n\t}\n\n\tif (associations?.size) {\n\t\tlifelineGroups.push(\n\t\t\t...[...associations.values()]\n\t\t\t\t.filter((a) => a.isLifeline)\n\t\t\t\t.map((a) => a.groupId),\n\t\t);\n\t}\n\n\treturn distinct(lifelineGroups).toSorted((a, b) => a - b);\n}\n\nexport async function configureLifelineAssociations(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& ControlsCC\n\t\t& GetAllEndpoints<EndpointId & SupportsCC & ControlsCC>\n\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n): Promise<void> {\n\t// Assign the controller to all lifeline groups\n\tconst ownNodeId = ctx.ownNodeId;\n\tconst node = ctx.getNodeOrThrow(endpoint.nodeId);\n\tconst valueDB = ctx.getValueDB(node.id);\n\tconst deviceConfig = ctx.getDeviceConfig?.(node.id);\n\n\t// We check if a node supports Multi Channel CC before creating Multi Channel Lifeline Associations (#1109)\n\tconst nodeSupportsMultiChannel = node.supportsCC(\n\t\tCommandClasses[\"Multi Channel\"],\n\t);\n\n\tlet assocInstance: typeof AssociationCC | undefined;\n\tconst assocAPI = CCAPI.create(\n\t\tCommandClasses.Association,\n\t\tctx,\n\t\tendpoint,\n\t);\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t}\n\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tlet mcGroupCount = 0;\n\tconst mcAPI = CCAPI.create(\n\t\tCommandClasses[\"Multi Channel Association\"],\n\t\tctx,\n\t\tendpoint,\n\t);\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t\tmcGroupCount = mcInstance.getGroupCountCached(ctx, endpoint) ?? 0;\n\t}\n\n\tconst lifelineGroups = getLifelineGroupIds(ctx, node);\n\tif (lifelineGroups.length === 0) {\n\t\t// We can look for the General Lifeline AGI profile as a last resort\n\t\tif (\n\t\t\tendpoint.supportsCC(CommandClasses[\"Association Group Information\"])\n\t\t) {\n\t\t\tconst agiAPI = CCAPI.create(\n\t\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t);\n\n\t\t\t// The lifeline MUST be group 1\n\t\t\tconst lifeline = await agiAPI\n\t\t\t\t.getGroupInfo(1, true)\n\t\t\t\t.catch(() => undefined);\n\t\t\tif (\n\t\t\t\tlifeline?.profile\n\t\t\t\t\t=== AssociationGroupInfoProfile[\"General: Lifeline\"]\n\t\t\t) {\n\t\t\t\tlifelineGroups.push(1);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (lifelineGroups.length === 0) {\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: endpoint.index,\n\t\t\tmessage:\n\t\t\t\t\"No information about Lifeline associations, cannot assign ourselves!\",\n\t\t\tlevel: \"warn\",\n\t\t});\n\t\t// Remember that we have NO lifeline association\n\t\tvalueDB.setValue(\n\t\t\tAssociationCCValues.hasLifeline.endpoint(endpoint.index),\n\t\t\tfalse,\n\t\t);\n\t\treturn;\n\t}\n\n\tctx.logNode(node.id, {\n\t\tendpoint: endpoint.index,\n\t\tmessage: `Checking/assigning lifeline groups: ${\n\t\t\tlifelineGroups.join(\n\t\t\t\t\", \",\n\t\t\t)\n\t\t}\nsupports classic associations: ${!!assocInstance}\nsupports multi channel associations: ${!!mcInstance}`,\n\t});\n\n\tfor (const group of lifelineGroups) {\n\t\tconst groupSupportsMultiChannelAssociation = group <= mcGroupCount;\n\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\tendpoint.index,\n\t\t\tgroup,\n\t\t);\n\n\t\tconst mustUseNodeAssociation = !groupSupportsMultiChannelAssociation\n\t\t\t|| !nodeSupportsMultiChannel\n\t\t\t|| assocConfig?.multiChannel === false;\n\t\tlet mustUseMultiChannelAssociation = false;\n\n\t\tif (groupSupportsMultiChannelAssociation && nodeSupportsMultiChannel) {\n\t\t\tif (assocConfig?.multiChannel === true) {\n\t\t\t\tmustUseMultiChannelAssociation = true;\n\t\t\t} else if (endpoint.index === 0) {\n\t\t\t\t// If the node has multiple endpoints but none of the extra ones support associations,\n\t\t\t\t// the root endpoints needs a Multi Channel Association\n\t\t\t\tconst allEndpoints = node.getAllEndpoints();\n\t\t\t\tif (\n\t\t\t\t\tallEndpoints.length > 1\n\t\t\t\t\t&& allEndpoints\n\t\t\t\t\t\t.filter((e) => e.index !== endpoint.index)\n\t\t\t\t\t\t.every(\n\t\t\t\t\t\t\t(e) =>\n\t\t\t\t\t\t\t\t!e.supportsCC(CommandClasses.Association)\n\t\t\t\t\t\t\t\t&& !e.supportsCC(\n\t\t\t\t\t\t\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tmustUseMultiChannelAssociation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: endpoint.index,\n\t\t\tmessage: `Configuring lifeline group #${group}:\ngroup supports multi channel: ${groupSupportsMultiChannelAssociation}\nconfigured strategy: ${assocConfig?.multiChannel ?? \"auto\"}\nmust use node association: ${mustUseNodeAssociation}\nmust use endpoint association: ${mustUseMultiChannelAssociation}`,\n\t\t});\n\n\t\t// Figure out which associations exist and may need to be removed\n\t\tconst isAssignedAsNodeAssociation = (\n\t\t\tendpoint: EndpointId,\n\t\t): boolean => {\n\t\t\tif (groupSupportsMultiChannelAssociation && mcInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tmcInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& !!mcInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some(\n\t\t\t\t\t\t\t(addr) =>\n\t\t\t\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t\t\t\t&& addr.endpoint == undefined,\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (assocInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tassocInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& !!assocInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some((addr) => addr.nodeId === ownNodeId)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\n\t\tconst isAssignedAsEndpointAssociation = (\n\t\t\tendpoint: EndpointId,\n\t\t): boolean => {\n\t\t\tif (mcInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tmcInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& mcInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some(\n\t\t\t\t\t\t\t(addr) =>\n\t\t\t\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t\t\t\t&& addr.endpoint === 0,\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t\t// If the node was used with other controller software, there might be\n\t\t// invalid lifeline associations which cause reporting problems\n\t\tconst invalidEndpointAssociations: EndpointAddress[] = mcInstance\n\t\t\t?.getAllDestinationsCached(ctx, endpoint)\n\t\t\t.get(group)\n\t\t\t?.filter(\n\t\t\t\t(addr): addr is AssociationAddress & EndpointAddress =>\n\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t&& addr.endpoint != undefined\n\t\t\t\t\t&& addr.endpoint !== 0,\n\t\t\t) ?? [];\n\n\t\t// Clean them up first\n\t\tif (\n\t\t\tinvalidEndpointAssociations.length > 0\n\t\t\t&& mcAPI.isSupported()\n\t\t\t&& groupSupportsMultiChannelAssociation\n\t\t) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`Found invalid lifeline associations in group #${group}, removing them...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\tgroupId: group,\n\t\t\t\tendpoints: invalidEndpointAssociations,\n\t\t\t});\n\t\t\t// refresh the associations - don't trust that it worked\n\t\t\tawait mcAPI.getGroup(group);\n\t\t}\n\n\t\t// Assigning the correct lifelines depends on the association kind, source endpoint and the desired strategy:\n\t\t//\n\t\t// When `mustUseMultiChannelAssociation` is `true` - Use a multi channel association (if possible), no fallback\n\t\t// When `mustUseNodeAssociation` is `true` - Use a node association (if possible), no fallback\n\t\t// Otherwise:\n\t\t// 1. Try a node association on the current endpoint/root\n\t\t// 2. If Association CC is not supported, try assigning a node association with the Multi Channel Association CC\n\t\t// 3. If that did not work, fall back to a multi channel association (target endpoint 0)\n\t\t// 4. If that did not work either, the endpoint index is >0 and the node is Z-Wave+:\n\t\t// Fall back to a multi channel association (target endpoint 0) on the root, if it doesn't have one yet.\n\n\t\tlet hasLifeline = false;\n\n\t\t// First try: node association\n\t\tif (!mustUseMultiChannelAssociation) {\n\t\t\tif (isAssignedAsNodeAssociation(endpoint)) {\n\t\t\t\t// We already have the correct association\n\t\t\t\thasLifeline = true;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Lifeline group #${group} is already assigned with a node association`,\n\t\t\t\t\tdirection: \"none\",\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tassocAPI.isSupported()\n\t\t\t\t// Some endpoint groups don't support having any destinations because they are shared with the root\n\t\t\t\t&& assocInstance!.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t> 0\n\t\t\t) {\n\t\t\t\t// We can use a node association, but first remove any possible endpoint associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Association CC...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (\n\t\t\t\t\tisAssignedAsEndpointAssociation(endpoint)\n\t\t\t\t\t&& mcAPI.isSupported()\n\t\t\t\t) {\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t});\n\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\tawait mcAPI.getGroup(group);\n\t\t\t\t}\n\n\t\t\t\tawait assocAPI.addNodeIds(group, ownNodeId);\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await assocAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.nodeIds.includes(ownNodeId);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a node association via Association CC`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Association CC did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Second try: Node association using the Multi Channel Association CC\n\t\t\tif (\n\t\t\t\t!hasLifeline\n\t\t\t\t&& mcAPI.isSupported()\n\t\t\t\t&& mcInstance!.getMaxNodesCached(ctx, endpoint, group) > 0\n\t\t\t) {\n\t\t\t\t// We can use a node association, but first remove any possible endpoint associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Multi Channel Association CC...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (isAssignedAsEndpointAssociation(endpoint)) {\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tawait mcAPI.addDestinations({\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t});\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await mcAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.nodeIds.includes(ownNodeId);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a node association via Multi Channel Association CC`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Multi Channel Association CC did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Third try: Use an endpoint association (target endpoint 0)\n\t\t// This is only supported starting in Multi Channel Association CC V3\n\t\tif (!hasLifeline && !mustUseNodeAssociation) {\n\t\t\tif (isAssignedAsEndpointAssociation(endpoint)) {\n\t\t\t\t// We already have the correct association\n\t\t\t\thasLifeline = true;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Lifeline group #${group} is already assigned with an endpoint association`,\n\t\t\t\t\tdirection: \"none\",\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tmcAPI.isSupported()\n\t\t\t\t&& mcAPI.version >= 3\n\t\t\t\t&& mcInstance!.getMaxNodesCached(ctx, endpoint, group) > 0\n\t\t\t) {\n\t\t\t\t// We can use a multi channel association, but first remove any possible node associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (isAssignedAsNodeAssociation(endpoint)) {\n\t\t\t\t\t// It has been found that some devices don't correctly share the node associations between\n\t\t\t\t\t// Association CC and Multi Channel Association CC, so we remove the nodes from both lists\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t});\n\t\t\t\t\tif (assocAPI.isSupported()) {\n\t\t\t\t\t\tawait assocAPI.removeNodeIds({\n\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\tawait assocAPI.getGroup(group);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tawait mcAPI.addDestinations({\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t});\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await mcAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.endpoints.some(\n\t\t\t\t\t(a) => a.nodeId === ownNodeId && a.endpoint === 0,\n\t\t\t\t);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a multi channel association`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Last attempt (actual Z-Wave+ Lifelines only): Try a multi channel association on the root.\n\t\t// Endpoint interviews happen AFTER the root interview, so this enables us to overwrite what\n\t\t// we previously configured on the root.\n\t\tif (\n\t\t\t!hasLifeline\n\t\t\t&& group === 1\n\t\t\t&& node.supportsCC(CommandClasses[\"Z-Wave Plus Info\"])\n\t\t\t&& endpoint.index > 0\n\t\t) {\n\t\t\t// But first check if the root may have a multi channel association\n\t\t\tconst rootAssocConfig = deviceConfig\n\t\t\t\t?.getAssociationConfigForEndpoint(0, group);\n\t\t\tconst rootMustUseNodeAssociation = !nodeSupportsMultiChannel\n\t\t\t\t|| rootAssocConfig?.multiChannel === false;\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`Checking root device for fallback assignment of lifeline group #${group}:\nroot supports multi channel: ${nodeSupportsMultiChannel}\nconfigured strategy: ${rootAssocConfig?.multiChannel ?? \"auto\"}\nmust use node association: ${rootMustUseNodeAssociation}`,\n\t\t\t});\n\n\t\t\tif (!rootMustUseNodeAssociation) {\n\t\t\t\tif (isAssignedAsEndpointAssociation(node)) {\n\t\t\t\t\t// We already have the correct association\n\t\t\t\t\thasLifeline = true;\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} is already assigned with a multi channel association on the root device`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst rootMCAPI = CCAPI.create(\n\t\t\t\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t);\n\t\t\t\t\tconst rootAssocAPI = CCAPI.create(\n\t\t\t\t\t\tCommandClasses.Association,\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t);\n\t\t\t\t\tif (rootMCAPI.isSupported()) {\n\t\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association on the root device...`,\n\t\t\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// Clean up node associations because they might prevent us from adding the endpoint association\n\t\t\t\t\t\tif (isAssignedAsNodeAssociation(node)) {\n\t\t\t\t\t\t\t// It has been found that some devices don't correctly share the node associations between\n\t\t\t\t\t\t\t// Association CC and Multi Channel Association CC, so we remove the nodes from both lists\n\t\t\t\t\t\t\tawait rootMCAPI.removeDestinations({\n\t\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootAssocAPI.isSupported()) {\n\t\t\t\t\t\t\t\tawait rootAssocAPI.removeNodeIds({\n\t\t\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\t\t\tawait rootAssocAPI.getGroup(group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait rootMCAPI.addDestinations({\n\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\tconst groupReport = await rootMCAPI.getGroup(group);\n\t\t\t\t\t\thasLifeline = !!groupReport?.endpoints.some(\n\t\t\t\t\t\t\t(a) => a.nodeId === ownNodeId && a.endpoint === 0,\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}\n\n\t\tif (!hasLifeline) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`All attempts to assign lifeline group #${group} failed, skipping...`,\n\t\t\t\tdirection: \"none\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Remember that we did the association assignment\n\tvalueDB.setValue(\n\t\tAssociationCCValues.hasLifeline.endpoint(endpoint.index),\n\t\ttrue,\n\t);\n}\n\nexport async function assignLifelineIssueingCommand(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& ControlsCC\n\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t& QuerySecurityClasses\n\t>,\n\tendpoint: EndpointId,\n\tccId: CommandClasses,\n\tccCommand: number,\n): Promise<void> {\n\tconst node = ctx.getNodeOrThrow(endpoint.nodeId);\n\tif (\n\t\tnode.supportsCC(CommandClasses[\"Association Group Information\"])\n\t\t&& (node.supportsCC(CommandClasses.Association)\n\t\t\t|| node.supportsCC(CommandClasses[\"Multi Channel Association\"]))\n\t) {\n\t\tconst groupsIssueingNotifications = AssociationGroupInfoCC\n\t\t\t.findGroupsForIssuedCommand(\n\t\t\t\tctx,\n\t\t\t\tnode,\n\t\t\t\tccId,\n\t\t\t\tccCommand,\n\t\t\t);\n\t\tif (groupsIssueingNotifications.length > 0) {\n\t\t\t// We always grab the first group - usually it should be the lifeline\n\t\t\tconst groupId = groupsIssueingNotifications[0];\n\t\t\tconst existingAssociations = getAssociations(ctx, node).get(groupId)\n\t\t\t\t?? [];\n\n\t\t\tif (\n\t\t\t\t!existingAssociations.some(\n\t\t\t\t\t(a) => a.nodeId === ctx.ownNodeId,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tccId,\n\t\t\t\t\t\t)\n\t\t\t\t\t} commands...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tawait addAssociations(ctx, node, groupId, [\n\t\t\t\t\t{ nodeId: ctx.ownNodeId },\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function doesAnyLifelineSendActuatorOrSensorReports(\n\tctx: GetValueDB & GetDeviceConfig,\n\tnode: NodeId & SupportsCC,\n): MaybeNotKnown<boolean> {\n\t// No association support means no unsolicited reports\n\tif (\n\t\t!node.supportsCC(CommandClasses.Association)\n\t\t&& !node.supportsCC(CommandClasses[\"Multi Channel Association\"])\n\t) {\n\t\treturn false;\n\t}\n\n\t// No AGI support means we cannot know\n\tif (!node.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\treturn NOT_KNOWN;\n\t}\n\n\t// Lifeline group IDs include the ones we added via a config file, so they may not be considered true lifelines\n\tconst lifelineGroupIds = getLifelineGroupIds(ctx, node);\n\t// If any potential lifeline group has the \"General: Lifeline\" profile, the node MUST send unsolicited reports that way\n\tif (\n\t\tlifelineGroupIds.some(\n\t\t\t(id) =>\n\t\t\t\tAssociationGroupInfoCC.getGroupProfileCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tnode,\n\t\t\t\t\tid,\n\t\t\t\t) === AssociationGroupInfoProfile[\"General: Lifeline\"],\n\t\t)\n\t) {\n\t\treturn true;\n\t}\n\n\t// Otherwise check if any of the groups sends any actuator or sensor commands. We'll assume that those are reports\n\tfor (const groupId of lifelineGroupIds) {\n\t\tconst issuedCommands = AssociationGroupInfoCC.getIssuedCommandsCached(\n\t\t\tctx,\n\t\t\tnode,\n\t\t\tgroupId,\n\t\t);\n\t\tif (!issuedCommands) continue;\n\t\tconst commands = [...issuedCommands.keys()];\n\t\tif (commands.some((c) => isActuatorCC(c) || isSensorCC(c))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;;;;;;;;;;;AAAA,kBAsBO;AACP,oBAIO;AACP,oBAAyB;AACzB,2BAAmD;AACnD,oCAAuC;AACvC,uCAA0C;AAC1C,iBAAsD;AACtD,mBAMO;AAED,S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UAAS;SACvB;MACF;IACD;EACD;AACD;AAnDsB;AAqDhB,SAAU,2CACf,KACA,MAAyB;AAGzB,MACC,CAAC,KAAK,WAAW,2BAAe,WAAW,KACxC,CAAC,KAAK,WAAW,2BAAe,2BAA2B,CAAC,GAC9D;AACD,WAAO;EACR;AAGA,MAAI,CAAC,KAAK,WAAW,2BAAe,+BAA+B,CAAC,GAAG;AACtE,WAAO;EACR;AAGA,QAAM,mBAAmB,oBAAoB,KAAK,IAAI;AAEtD,MACC,iBAAiB,KAChB,CAAC,OACA,qDAAuB,sBACtB,KACA,MACA,EAAE,MACG,yCAA4B,mBAAmB,CAAC,GAEvD;AACD,WAAO;EACR;AAGA,aAAW,WAAW,kBAAkB;AACvC,UAAM,iBAAiB,qDAAuB,wBAC7C,KACA,MACA,OAAO;AAER,QAAI,CAAC;AAAgB;AACrB,UAAM,WAAW,CAAC,GAAG,eAAe,KAAI,CAAE;AAC1C,QAAI,SAAS,KAAK,CAAC,UAAM,0BAAa,CAAC,SAAK,wBAAW,CAAC,CAAC,GAAG;AAC3D,aAAO;IACR;EACD;AAEA,SAAO;AACR;AAhDgB;",
4
+ "sourcesContent": ["import type { AssociationConfig, GetDeviceConfig } from \"@zwave-js/config\";\nimport {\n\tCommandClasses,\n\ttype ControlsCC,\n\ttype EndpointId,\n\ttype GetAllEndpoints,\n\ttype GetEndpoint,\n\ttype GetNode,\n\ttype GetValueDB,\n\ttype HostIDs,\n\ttype MaybeNotKnown,\n\tNOT_KNOWN,\n\ttype NodeId,\n\ttype QuerySecurityClasses,\n\tSecurityClass,\n\ttype SupportsCC,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tactuatorCCs,\n\tgetCCName,\n\tisActuatorCC,\n\tisLongRangeNodeId,\n\tisSensorCC,\n\tlogDict,\n\tlogText,\n} from \"@zwave-js/core\";\nimport {\n\tObjectKeyMap,\n\ttype ReadonlyObjectKeyMap,\n\tgetEnumMemberName,\n} from \"@zwave-js/shared\";\nimport { distinct } from \"alcalzone-shared/arrays\";\nimport { AssociationCC, AssociationCCValues } from \"../cc/AssociationCC.js\";\nimport { AssociationGroupInfoCC } from \"../cc/AssociationGroupInfoCC.js\";\nimport { MultiChannelAssociationCC } from \"../cc/MultiChannelAssociationCC.js\";\nimport { CCAPI, type CCAPIHost, type CCAPINode } from \"./API.js\";\nimport {\n\ttype AssociationAddress,\n\tAssociationCheckResult,\n\ttype AssociationGroup,\n\tAssociationGroupInfoProfile,\n\ttype EndpointAddress,\n} from \"./_Types.js\";\n\nexport function getAssociations(\n\tctx: GetValueDB,\n\tendpoint: EndpointId & SupportsCC,\n): ReadonlyMap<number, readonly AssociationAddress[]> {\n\tconst ret = new Map<number, readonly AssociationAddress[]>();\n\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tconst destinations = AssociationCC.getAllDestinationsCached(\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tfor (const [groupId, assocs] of destinations) {\n\t\t\tret.set(groupId, assocs);\n\t\t}\n\t} else {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Merge the \"normal\" destinations with multi channel destinations\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tconst destinations = MultiChannelAssociationCC.getAllDestinationsCached(\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tfor (const [groupId, assocs] of destinations) {\n\t\t\tif (ret.has(groupId)) {\n\t\t\t\tconst normalAssociations = ret.get(groupId)!;\n\t\t\t\tret.set(groupId, [\n\t\t\t\t\t...normalAssociations,\n\t\t\t\t\t// Eliminate potential duplicates\n\t\t\t\t\t...assocs.filter(\n\t\t\t\t\t\t(a1) =>\n\t\t\t\t\t\t\t!normalAssociations.some(\n\t\t\t\t\t\t\t\t(a2) =>\n\t\t\t\t\t\t\t\t\ta1.nodeId === a2.nodeId\n\t\t\t\t\t\t\t\t\t&& a1.endpoint === a2.endpoint,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tret.set(groupId, assocs);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn ret;\n}\n\nexport function getAllAssociations(\n\tctx: GetValueDB,\n\tnode: NodeId & GetAllEndpoints<EndpointId & SupportsCC>,\n): ReadonlyObjectKeyMap<\n\tAssociationAddress,\n\tReadonlyMap<number, readonly AssociationAddress[]>\n> {\n\tconst ret = new ObjectKeyMap<\n\t\tAssociationAddress,\n\t\tReadonlyMap<number, readonly AssociationAddress[]>\n\t>();\n\tfor (const endpoint of node.getAllEndpoints()) {\n\t\tconst address: AssociationAddress = {\n\t\t\tnodeId: node.id,\n\t\t\tendpoint: endpoint.index,\n\t\t};\n\t\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\t\tret.set(address, getAssociations(ctx, endpoint));\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport function checkAssociation(\n\tctx:\n\t\t& HostIDs\n\t\t& GetValueDB\n\t\t& GetNode<\n\t\t\t& NodeId\n\t\t\t& SupportsCC\n\t\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t\t& QuerySecurityClasses\n\t\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestination: AssociationAddress,\n): AssociationCheckResult {\n\t// Check that the target endpoint exists except when adding an association to the controller\n\tconst targetNode = ctx.getNodeOrThrow(destination.nodeId);\n\tconst targetEndpoint = destination.nodeId === ctx.ownNodeId\n\t\t? targetNode\n\t\t: targetNode.getEndpointOrThrow(destination.endpoint ?? 0);\n\n\tif (\n\t\t!endpoint.supportsCC(CommandClasses.Association)\n\t\t&& !endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])\n\t) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Associations to and from ZWLR devices are not allowed\n\tif (isLongRangeNodeId(destination.nodeId)) {\n\t\treturn AssociationCheckResult.Forbidden_DestinationIsLongRange;\n\t} else if (isLongRangeNodeId(endpoint.nodeId)) {\n\t\t// Except the lifeline back to the host\n\t\tif (group !== 1 || destination.nodeId !== ctx.ownNodeId) {\n\t\t\treturn AssociationCheckResult.Forbidden_SourceIsLongRange;\n\t\t}\n\t}\n\n\t// The following checks don't apply to Lifeline associations\n\tif (destination.nodeId === ctx.ownNodeId) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\t// Disallow self-associations\n\tif (destination.nodeId === endpoint.nodeId) {\n\t\treturn AssociationCheckResult.Forbidden_SelfAssociation;\n\t}\n\n\t// For Association version 1 and version 2 / MCA version 1-3:\n\t// A controlling node MUST NOT associate Node A to a Node B destination\n\t// if Node A and Node B\u2019s highest Security Class are not identical.\n\t// For Association version 3 / MCA version 4:\n\t// A controlling node MUST NOT associate Node A to a Node B destination\n\t// if Node A was not granted Node B\u2019s highest Security Class.\n\n\tconst sourceNode = ctx.getNode(endpoint.nodeId)!;\n\tlet securityClassMustMatch: boolean;\n\tif (destination.endpoint == undefined) {\n\t\t// \"normal\" association\n\t\tconst sourceNodeCCVersion = endpoint.getCCVersion(\n\t\t\tCommandClasses.Association,\n\t\t);\n\t\tsecurityClassMustMatch = sourceNodeCCVersion < 3;\n\t} else {\n\t\t// multi channel association\n\t\tconst sourceNodeCCVersion = endpoint.getCCVersion(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t);\n\t\tsecurityClassMustMatch = sourceNodeCCVersion < 4;\n\t}\n\n\tconst sourceSecurityClass = sourceNode.getHighestSecurityClass();\n\tconst targetSecurityClass = targetNode.getHighestSecurityClass();\n\n\t// If the security classes are unknown, all bets are off\n\tif (sourceSecurityClass != undefined && targetSecurityClass != undefined) {\n\t\tif (\n\t\t\tsecurityClassMustMatch\n\t\t\t&& sourceSecurityClass !== targetSecurityClass\n\t\t) {\n\t\t\treturn AssociationCheckResult.Forbidden_SecurityClassMismatch;\n\t\t} else if (\n\t\t\t// Commands to insecure nodes are allowed\n\t\t\ttargetSecurityClass !== SecurityClass.None\n\t\t\t// Otherwise, the sender must know the target's highest key\n\t\t\t&& !securityClassMustMatch\n\t\t\t&& !sourceNode.hasSecurityClass(targetSecurityClass)\n\t\t) {\n\t\t\treturn AssociationCheckResult\n\t\t\t\t.Forbidden_DestinationSecurityClassNotGranted;\n\t\t}\n\t}\n\n\t// SDS14223:\n\t// A controlling node MUST NOT associate Node A to a Node B destination that does not support\n\t// the Command Class that the Node A will be controlling\n\t//\n\t// To determine this, the node must support the AGI CC or we have no way of knowing which\n\t// CCs the node will control\n\tif (!endpoint.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\tconst groupCommandList = AssociationGroupInfoCC.getIssuedCommandsCached(\n\t\tctx,\n\t\tendpoint,\n\t\tgroup,\n\t);\n\tif (!groupCommandList || !groupCommandList.size) {\n\t\t// We don't know which CCs this group controls, just allow it\n\t\treturn AssociationCheckResult.OK;\n\t}\n\tconst groupCCs = [...groupCommandList.keys()];\n\n\t// A controlling node MAY create an association to a destination supporting an\n\t// actuator Command Class if the actual association group sends Basic Control Command Class.\n\tif (\n\t\tgroupCCs.includes(CommandClasses.Basic)\n\t\t&& actuatorCCs.some((cc) => targetEndpoint?.supportsCC(cc))\n\t) {\n\t\treturn AssociationCheckResult.OK;\n\t}\n\n\t// Enforce that at least one issued CC is supported\n\tif (groupCCs.some((cc) => targetEndpoint?.supportsCC(cc))) {\n\t\treturn AssociationCheckResult.OK;\n\t} else {\n\t\treturn AssociationCheckResult.Forbidden_NoSupportedCCs;\n\t}\n}\n\nexport function getAssociationGroups(\n\tctx: GetValueDB & GetDeviceConfig,\n\tendpoint: EndpointId & SupportsCC,\n): ReadonlyMap<number, AssociationGroup> {\n\t// Check whether we have multi channel support or not\n\tlet assocInstance: typeof AssociationCC;\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t} else {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${endpoint.nodeId}${\n\t\t\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t\t\t} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t}\n\n\tconst assocGroupCount = assocInstance.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst mcGroupCount = mcInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst groupCount = Math.max(assocGroupCount, mcGroupCount);\n\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\n\tconst ret = new Map<number, AssociationGroup>();\n\n\tif (endpoint.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\t// We can read all information we need from the AGI CC\n\t\tconst agiInstance = AssociationGroupInfoCC;\n\t\tfor (let group = 1; group <= groupCount; group++) {\n\t\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\t\tendpoint.index,\n\t\t\t\tgroup,\n\t\t\t);\n\t\t\tconst multiChannel = !!mcInstance && group <= mcGroupCount;\n\t\t\tret.set(group, {\n\t\t\t\tmaxNodes: (multiChannel\n\t\t\t\t\t? mcInstance!\n\t\t\t\t\t: assocInstance).getMaxNodesCached(\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\tgroup,\n\t\t\t\t\t) || 1,\n\t\t\t\t// AGI implies Z-Wave+ where group 1 is the lifeline\n\t\t\t\tisLifeline: group === 1,\n\t\t\t\tlabel:\n\t\t\t\t\t// prefer the configured label if we have one\n\t\t\t\t\tassocConfig?.label\n\t\t\t\t\t\t// the ones reported by AGI are sometimes pretty bad\n\t\t\t\t\t\t?? agiInstance.getGroupNameCached(\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\t\tgroup,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t// but still better than \"unnamed\"\n\t\t\t\t\t\t?? `Unnamed group ${group}`,\n\t\t\t\tmultiChannel,\n\t\t\t\tprofile: agiInstance.getGroupProfileCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tendpoint,\n\t\t\t\t\tgroup,\n\t\t\t\t),\n\t\t\t\tissuedCommands: agiInstance.getIssuedCommandsCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tendpoint,\n\t\t\t\t\tgroup,\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t} else {\n\t\t// we need to consult the device config\n\t\tfor (let group = 1; group <= groupCount; group++) {\n\t\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\t\tendpoint.index,\n\t\t\t\tgroup,\n\t\t\t);\n\t\t\tconst multiChannel = !!mcInstance && group <= mcGroupCount;\n\t\t\tret.set(group, {\n\t\t\t\tmaxNodes: (multiChannel\n\t\t\t\t\t? mcInstance!\n\t\t\t\t\t: assocInstance).getMaxNodesCached(\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\tgroup,\n\t\t\t\t\t)\n\t\t\t\t\t|| assocConfig?.maxNodes\n\t\t\t\t\t|| 1,\n\t\t\t\tisLifeline: assocConfig?.isLifeline ?? group === 1,\n\t\t\t\tlabel: assocConfig?.label ?? `Unnamed group ${group}`,\n\t\t\t\tmultiChannel,\n\t\t\t});\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport function getAllAssociationGroups(\n\tctx: GetValueDB & GetDeviceConfig,\n\tnode: NodeId & GetAllEndpoints<EndpointId & SupportsCC>,\n): ReadonlyMap<number, ReadonlyMap<number, AssociationGroup>> {\n\tconst ret = new Map<number, ReadonlyMap<number, AssociationGroup>>();\n\tfor (const endpoint of node.getAllEndpoints()) {\n\t\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\t\tret.set(endpoint.index, getAssociationGroups(ctx, endpoint));\n\t\t}\n\t}\n\treturn ret;\n}\n\nexport async function addAssociations(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t& QuerySecurityClasses\n\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestinations: AssociationAddress[],\n\toptions?: {\n\t\t/**\n\t\t * Whether to force creating associations even if they are not allowed.\n\t\t * **Note:** Invalid associations will most likely not work\n\t\t */\n\t\tforce?: boolean;\n\t},\n): Promise<void> {\n\tconst nodeAndEndpointString = `${endpoint.nodeId}${\n\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t}`;\n\n\t// Check whether we should add any associations the device does not have support for\n\tlet assocInstance: typeof AssociationCC | undefined;\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\t// Split associations into conventional and endpoint associations\n\tconst nodeAssociations = distinct(\n\t\tdestinations\n\t\t\t.filter((a) => a.endpoint == undefined)\n\t\t\t.map((a) => a.nodeId),\n\t);\n\tconst endpointAssociations = destinations.filter(\n\t\t(a) => a.endpoint != undefined,\n\t) as EndpointAddress[];\n\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t} else if (nodeAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t} else if (endpointAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Disallow associating a node with itself. This is technically checked as part of\n\t// checkAssociations, but here we provide a better error message.\n\tconst selfAssociations = destinations.filter((d) =>\n\t\td.nodeId === endpoint.nodeId\n\t);\n\tif (selfAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Associating a node with itself is not allowed!`,\n\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\tselfAssociations.map((a) => ({\n\t\t\t\t...a,\n\t\t\t\tcheckResult: AssociationCheckResult.Forbidden_SelfAssociation,\n\t\t\t})),\n\t\t);\n\t}\n\n\tconst assocGroupCount = assocInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst mcGroupCount = mcInstance?.getGroupCountCached(ctx, endpoint)\n\t\t?? 0;\n\tconst groupCount = Math.max(assocGroupCount, mcGroupCount);\n\tif (group > groupCount) {\n\t\tthrow new ZWaveError(\n\t\t\t`Group ${group} does not exist on node ${nodeAndEndpointString}`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\n\tconst groupIsMultiChannel = !!mcInstance\n\t\t&& group <= mcGroupCount\n\t\t&& deviceConfig?.associations?.get(group)?.multiChannel !== false;\n\n\tif (groupIsMultiChannel) {\n\t\t// Check that all associations are allowed\n\t\tif (!options?.force) {\n\t\t\tconst disallowedAssociations = destinations.map(\n\t\t\t\t(a) => ({\n\t\t\t\t\t...a,\n\t\t\t\t\tcheckResult: checkAssociation(ctx, endpoint, group, a),\n\t\t\t\t}),\n\t\t\t).filter(({ checkResult }) =>\n\t\t\t\tcheckResult !== AssociationCheckResult.OK\n\t\t\t);\n\t\t\tif (disallowedAssociations.length) {\n\t\t\t\tlet message = `The following associations are not allowed:`;\n\t\t\t\tmessage += disallowedAssociations\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(a) =>\n\t\t\t\t\t\t\t`\\n\u00B7 Node ${a.nodeId}${\n\t\t\t\t\t\t\t\ta.endpoint ? `, endpoint ${a.endpoint}` : \"\"\n\t\t\t\t\t\t\t}: ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tAssociationCheckResult,\n\t\t\t\t\t\t\t\t\ta.checkResult,\n\t\t\t\t\t\t\t\t).replace(\"Forbidden_\", \"\")\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\");\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\tmessage,\n\t\t\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\t\t\tdisallowedAssociations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// And add them\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.addDestinations({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t\tendpoints: endpointAssociations,\n\t\t});\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t} else {\n\t\t// Although the node supports multi channel associations, this group only supports \"normal\" associations\n\t\tif (destinations.some((a) => a.endpoint != undefined)) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Node ${nodeAndEndpointString}, group ${group} does not support multi channel associations!`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\t// Check that all associations are allowed\n\t\tif (!options?.force) {\n\t\t\tconst disallowedAssociations = destinations.map(\n\t\t\t\t(a) => ({\n\t\t\t\t\t...a,\n\t\t\t\t\tcheckResult: checkAssociation(ctx, endpoint, group, a),\n\t\t\t\t}),\n\t\t\t).filter(({ checkResult }) =>\n\t\t\t\tcheckResult !== AssociationCheckResult.OK\n\t\t\t);\n\t\t\tif (disallowedAssociations.length) {\n\t\t\t\tlet message =\n\t\t\t\t\t`The associations to the following nodes are not allowed`;\n\t\t\t\tmessage += disallowedAssociations\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(a) =>\n\t\t\t\t\t\t\t`\\n\u00B7 Node ${a.nodeId}: ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tAssociationCheckResult,\n\t\t\t\t\t\t\t\t\ta.checkResult,\n\t\t\t\t\t\t\t\t).replace(\"Forbidden_\", \"\")\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\");\n\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\tmessage,\n\t\t\t\t\tZWaveErrorCodes.AssociationCC_NotAllowed,\n\t\t\t\t\tdisallowedAssociations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.addNodeIds(group, ...destinations.map((a) => a.nodeId));\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t}\n}\n\nexport async function removeAssociations(\n\tctx: CCAPIHost,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n\tgroup: number,\n\tdestinations: AssociationAddress[],\n): Promise<void> {\n\tconst nodeAndEndpointString = `${endpoint.nodeId}${\n\t\tendpoint.index > 0 ? `, endpoint ${endpoint.index}` : \"\"\n\t}`;\n\n\t// Split associations into conventional and endpoint associations\n\tconst nodeAssociations = distinct(\n\t\tdestinations\n\t\t\t.filter((a) => a.endpoint == undefined)\n\t\t\t.map((a) => a.nodeId),\n\t);\n\tconst endpointAssociations = destinations.filter(\n\t\t(a) => a.endpoint != undefined,\n\t) as EndpointAddress[];\n\n\t// Removing associations is not either/or - we could have a device with duplicated associations between\n\t// Association CC and Multi Channel Association CC\n\t// Figure out what we need to use to remove the associations\n\n\tlet groupExistsAsMultiChannel = false;\n\tlet groupExistsAsNodeAssociation = false;\n\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tlet assocInstance: typeof AssociationCC | undefined;\n\n\t// To remove a multi channel association, we need to make sure that the group exists\n\t// and the node supports multi channel associations\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t\tif (group <= mcInstance.getGroupCountCached(ctx, endpoint)) {\n\t\t\tgroupExistsAsMultiChannel = true;\n\t\t}\n\t} else if (endpointAssociations.length > 0) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// To remove a normal association, we need to make sure that the group exists either as a normal association\n\t// or as a multi channel association\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t\tif (group <= assocInstance.getGroupCountCached(ctx, endpoint)) {\n\t\t\tgroupExistsAsNodeAssociation = true;\n\t\t}\n\t}\n\n\tif (!mcInstance && !assocInstance) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString} does not support associations!`,\n\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t);\n\t}\n\n\t// Ensure the group exists and can be used\n\tif (!groupExistsAsMultiChannel && !groupExistsAsNodeAssociation) {\n\t\tthrow new ZWaveError(\n\t\t\t` Association group ${group} does not exist for node ${nodeAndEndpointString}`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\tif (endpointAssociations.length > 0 && !groupExistsAsMultiChannel) {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeAndEndpointString}, association group ${group} does not support multi channel associations!`,\n\t\t\tZWaveErrorCodes.AssociationCC_InvalidGroup,\n\t\t);\n\t}\n\n\t// Even if we only remove node associations, we use both CCs since it has been found that some\n\t// devices do not correctly share the node list between the two commands\n\tif (\n\t\tassocInstance\n\t\t&& nodeAssociations.length > 0\n\t\t&& groupExistsAsNodeAssociation\n\t) {\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Association,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.removeNodeIds({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t});\n\t\t// Refresh the association list\n\t\tawait api.getGroup(group);\n\t}\n\n\tif (mcInstance && groupExistsAsMultiChannel) {\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t);\n\t\tawait api.removeDestinations({\n\t\t\tgroupId: group,\n\t\t\tnodeIds: nodeAssociations,\n\t\t\tendpoints: endpointAssociations,\n\t\t});\n\t\t// Refresh the multi channel association list\n\t\tawait api.getGroup(group);\n\t}\n}\n\nexport function getLifelineGroupIds(\n\tctx: GetValueDB & GetDeviceConfig,\n\tendpoint: EndpointId & SupportsCC,\n): number[] {\n\t// For now only support this for the root endpoint - i.e. node\n\tif (endpoint.index > 0) return [];\n\n\t// Some nodes define multiple lifeline groups, so we need to assign us to\n\t// all of them\n\tconst lifelineGroups: number[] = [];\n\n\t// If the target node supports Z-Wave+ info that means the lifeline MUST be group #1\n\tif (endpoint.supportsCC(CommandClasses[\"Z-Wave Plus Info\"])) {\n\t\tlifelineGroups.push(1);\n\t}\n\n\t// We have a device config file that tells us which (additional) association to assign\n\tlet associations: ReadonlyMap<number, AssociationConfig> | undefined;\n\tconst deviceConfig = ctx.getDeviceConfig?.(endpoint.nodeId);\n\tif (endpoint.index === 0) {\n\t\t// The root endpoint's associations may be configured separately or as part of \"endpoints\"\n\t\tassociations = deviceConfig?.associations\n\t\t\t?? deviceConfig?.endpoints?.get(0)?.associations;\n\t} else {\n\t\t// The other endpoints can only have a configuration as part of \"endpoints\"\n\t\tassociations = deviceConfig?.endpoints?.get(\n\t\t\tendpoint.index,\n\t\t)?.associations;\n\t}\n\n\tif (associations?.size) {\n\t\tlifelineGroups.push(\n\t\t\t...[...associations.values()]\n\t\t\t\t.filter((a) => a.isLifeline)\n\t\t\t\t.map((a) => a.groupId),\n\t\t);\n\t}\n\n\treturn distinct(lifelineGroups).toSorted((a, b) => a - b);\n}\n\nexport async function configureLifelineAssociations(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& ControlsCC\n\t\t& GetAllEndpoints<EndpointId & SupportsCC & ControlsCC>\n\t>,\n\tendpoint: EndpointId & SupportsCC & ControlsCC,\n): Promise<void> {\n\t// Assign the controller to all lifeline groups\n\tconst ownNodeId = ctx.ownNodeId;\n\tconst node = ctx.getNodeOrThrow(endpoint.nodeId);\n\tconst valueDB = ctx.getValueDB(node.id);\n\tconst deviceConfig = ctx.getDeviceConfig?.(node.id);\n\n\t// We check if a node supports Multi Channel CC before creating Multi Channel Lifeline Associations (#1109)\n\tconst nodeSupportsMultiChannel = node.supportsCC(\n\t\tCommandClasses[\"Multi Channel\"],\n\t);\n\n\tlet assocInstance: typeof AssociationCC | undefined;\n\tconst assocAPI = CCAPI.create(\n\t\tCommandClasses.Association,\n\t\tctx,\n\t\tendpoint,\n\t);\n\tif (endpoint.supportsCC(CommandClasses.Association)) {\n\t\tassocInstance = AssociationCC;\n\t}\n\n\tlet mcInstance: typeof MultiChannelAssociationCC | undefined;\n\tlet mcGroupCount = 0;\n\tconst mcAPI = CCAPI.create(\n\t\tCommandClasses[\"Multi Channel Association\"],\n\t\tctx,\n\t\tendpoint,\n\t);\n\tif (endpoint.supportsCC(CommandClasses[\"Multi Channel Association\"])) {\n\t\tmcInstance = MultiChannelAssociationCC;\n\t\tmcGroupCount = mcInstance.getGroupCountCached(ctx, endpoint) ?? 0;\n\t}\n\n\tconst lifelineGroups = getLifelineGroupIds(ctx, node);\n\tif (lifelineGroups.length === 0) {\n\t\t// We can look for the General Lifeline AGI profile as a last resort\n\t\tif (\n\t\t\tendpoint.supportsCC(CommandClasses[\"Association Group Information\"])\n\t\t) {\n\t\t\tconst agiAPI = CCAPI.create(\n\t\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t);\n\n\t\t\t// The lifeline MUST be group 1\n\t\t\tconst lifeline = await agiAPI\n\t\t\t\t.getGroupInfo(1, true)\n\t\t\t\t.catch(() => undefined);\n\t\t\tif (\n\t\t\t\tlifeline?.profile\n\t\t\t\t\t=== AssociationGroupInfoProfile[\"General: Lifeline\"]\n\t\t\t) {\n\t\t\t\tlifelineGroups.push(1);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (lifelineGroups.length === 0) {\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: endpoint.index,\n\t\t\tmessage:\n\t\t\t\t\"No information about Lifeline associations, cannot assign ourselves!\",\n\t\t\tlevel: \"warn\",\n\t\t});\n\t\t// Remember that we have NO lifeline association\n\t\tvalueDB.setValue(\n\t\t\tAssociationCCValues.hasLifeline.endpoint(endpoint.index),\n\t\t\tfalse,\n\t\t);\n\t\treturn;\n\t}\n\n\tctx.logNode(node.id, {\n\t\tendpoint: endpoint.index,\n\t\tmessage: logText(\n\t\t\t`Checking/assigning lifeline groups: ${\n\t\t\t\tlifelineGroups.join(\n\t\t\t\t\t\", \",\n\t\t\t\t)\n\t\t\t}`,\n\t\t\t{\n\t\t\t\tnested: logDict({\n\t\t\t\t\t\"supports classic associations\": !!assocInstance,\n\t\t\t\t\t\"supports multi channel associations\": !!mcInstance,\n\t\t\t\t}),\n\t\t\t},\n\t\t),\n\t});\n\n\tfor (const group of lifelineGroups) {\n\t\tconst groupSupportsMultiChannelAssociation = group <= mcGroupCount;\n\t\tconst assocConfig = deviceConfig?.getAssociationConfigForEndpoint(\n\t\t\tendpoint.index,\n\t\t\tgroup,\n\t\t);\n\n\t\tconst mustUseNodeAssociation = !groupSupportsMultiChannelAssociation\n\t\t\t|| !nodeSupportsMultiChannel\n\t\t\t|| assocConfig?.multiChannel === false;\n\t\tlet mustUseMultiChannelAssociation = false;\n\n\t\tif (groupSupportsMultiChannelAssociation && nodeSupportsMultiChannel) {\n\t\t\tif (assocConfig?.multiChannel === true) {\n\t\t\t\tmustUseMultiChannelAssociation = true;\n\t\t\t} else if (endpoint.index === 0) {\n\t\t\t\t// If the node has multiple endpoints but none of the extra ones support associations,\n\t\t\t\t// the root endpoints needs a Multi Channel Association\n\t\t\t\tconst allEndpoints = node.getAllEndpoints();\n\t\t\t\tif (\n\t\t\t\t\tallEndpoints.length > 1\n\t\t\t\t\t&& allEndpoints\n\t\t\t\t\t\t.filter((e) => e.index !== endpoint.index)\n\t\t\t\t\t\t.every(\n\t\t\t\t\t\t\t(e) =>\n\t\t\t\t\t\t\t\t!e.supportsCC(CommandClasses.Association)\n\t\t\t\t\t\t\t\t&& !e.supportsCC(\n\t\t\t\t\t\t\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tmustUseMultiChannelAssociation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: endpoint.index,\n\t\t\tmessage: logText(`Configuring lifeline group #${group}:`, {\n\t\t\t\tnested: logDict({\n\t\t\t\t\t\"group supports multi channel\":\n\t\t\t\t\t\tgroupSupportsMultiChannelAssociation,\n\t\t\t\t\t\"configured strategy\": assocConfig?.multiChannel ?? \"auto\",\n\t\t\t\t\t\"must use node association\": mustUseNodeAssociation,\n\t\t\t\t\t\"must use endpoint association\":\n\t\t\t\t\t\tmustUseMultiChannelAssociation,\n\t\t\t\t}),\n\t\t\t}),\n\t\t});\n\n\t\t// Figure out which associations exist and may need to be removed\n\t\tconst isAssignedAsNodeAssociation = (\n\t\t\tendpoint: EndpointId,\n\t\t): boolean => {\n\t\t\tif (groupSupportsMultiChannelAssociation && mcInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tmcInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& !!mcInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some(\n\t\t\t\t\t\t\t(addr) =>\n\t\t\t\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t\t\t\t&& addr.endpoint == undefined,\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (assocInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tassocInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& !!assocInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some((addr) => addr.nodeId === ownNodeId)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\n\t\tconst isAssignedAsEndpointAssociation = (\n\t\t\tendpoint: EndpointId,\n\t\t): boolean => {\n\t\t\tif (mcInstance) {\n\t\t\t\tif (\n\t\t\t\t\t// Only consider a group if it doesn't share its associations with the root endpoint\n\t\t\t\t\tmcInstance.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t\t> 0\n\t\t\t\t\t&& mcInstance\n\t\t\t\t\t\t.getAllDestinationsCached(ctx, endpoint)\n\t\t\t\t\t\t.get(group)\n\t\t\t\t\t\t?.some(\n\t\t\t\t\t\t\t(addr) =>\n\t\t\t\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t\t\t\t&& addr.endpoint === 0,\n\t\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t\t// If the node was used with other controller software, there might be\n\t\t// invalid lifeline associations which cause reporting problems\n\t\tconst invalidEndpointAssociations: EndpointAddress[] = mcInstance\n\t\t\t?.getAllDestinationsCached(ctx, endpoint)\n\t\t\t.get(group)\n\t\t\t?.filter(\n\t\t\t\t(addr): addr is AssociationAddress & EndpointAddress =>\n\t\t\t\t\taddr.nodeId === ownNodeId\n\t\t\t\t\t&& addr.endpoint != undefined\n\t\t\t\t\t&& addr.endpoint !== 0,\n\t\t\t) ?? [];\n\n\t\t// Clean them up first\n\t\tif (\n\t\t\tinvalidEndpointAssociations.length > 0\n\t\t\t&& mcAPI.isSupported()\n\t\t\t&& groupSupportsMultiChannelAssociation\n\t\t) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`Found invalid lifeline associations in group #${group}, removing them...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\tgroupId: group,\n\t\t\t\tendpoints: invalidEndpointAssociations,\n\t\t\t});\n\t\t\t// refresh the associations - don't trust that it worked\n\t\t\tawait mcAPI.getGroup(group);\n\t\t}\n\n\t\t// Assigning the correct lifelines depends on the association kind, source endpoint and the desired strategy:\n\t\t//\n\t\t// When `mustUseMultiChannelAssociation` is `true` - Use a multi channel association (if possible), no fallback\n\t\t// When `mustUseNodeAssociation` is `true` - Use a node association (if possible), no fallback\n\t\t// Otherwise:\n\t\t// 1. Try a node association on the current endpoint/root\n\t\t// 2. If Association CC is not supported, try assigning a node association with the Multi Channel Association CC\n\t\t// 3. If that did not work, fall back to a multi channel association (target endpoint 0)\n\t\t// 4. If that did not work either, the endpoint index is >0 and the node is Z-Wave+:\n\t\t// Fall back to a multi channel association (target endpoint 0) on the root, if it doesn't have one yet.\n\n\t\tlet hasLifeline = false;\n\n\t\t// First try: node association\n\t\tif (!mustUseMultiChannelAssociation) {\n\t\t\tif (isAssignedAsNodeAssociation(endpoint)) {\n\t\t\t\t// We already have the correct association\n\t\t\t\thasLifeline = true;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Lifeline group #${group} is already assigned with a node association`,\n\t\t\t\t\tdirection: \"none\",\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tassocAPI.isSupported()\n\t\t\t\t// Some endpoint groups don't support having any destinations because they are shared with the root\n\t\t\t\t&& assocInstance!.getMaxNodesCached(ctx, endpoint, group)\n\t\t\t\t\t> 0\n\t\t\t) {\n\t\t\t\t// We can use a node association, but first remove any possible endpoint associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Association CC...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (\n\t\t\t\t\tisAssignedAsEndpointAssociation(endpoint)\n\t\t\t\t\t&& mcAPI.isSupported()\n\t\t\t\t) {\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t});\n\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\tawait mcAPI.getGroup(group);\n\t\t\t\t}\n\n\t\t\t\tawait assocAPI.addNodeIds(group, ownNodeId);\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await assocAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.nodeIds.includes(ownNodeId);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a node association via Association CC`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Association CC did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Second try: Node association using the Multi Channel Association CC\n\t\t\tif (\n\t\t\t\t!hasLifeline\n\t\t\t\t&& mcAPI.isSupported()\n\t\t\t\t&& mcInstance!.getMaxNodesCached(ctx, endpoint, group) > 0\n\t\t\t) {\n\t\t\t\t// We can use a node association, but first remove any possible endpoint associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Multi Channel Association CC...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (isAssignedAsEndpointAssociation(endpoint)) {\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tawait mcAPI.addDestinations({\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t});\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await mcAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.nodeIds.includes(ownNodeId);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a node association via Multi Channel Association CC`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a node association via Multi Channel Association CC did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Third try: Use an endpoint association (target endpoint 0)\n\t\t// This is only supported starting in Multi Channel Association CC V3\n\t\tif (!hasLifeline && !mustUseNodeAssociation) {\n\t\t\tif (isAssignedAsEndpointAssociation(endpoint)) {\n\t\t\t\t// We already have the correct association\n\t\t\t\thasLifeline = true;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Lifeline group #${group} is already assigned with an endpoint association`,\n\t\t\t\t\tdirection: \"none\",\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\tmcAPI.isSupported()\n\t\t\t\t&& mcAPI.version >= 3\n\t\t\t\t&& mcInstance!.getMaxNodesCached(ctx, endpoint, group) > 0\n\t\t\t) {\n\t\t\t\t// We can use a multi channel association, but first remove any possible node associations\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tif (isAssignedAsNodeAssociation(endpoint)) {\n\t\t\t\t\t// It has been found that some devices don't correctly share the node associations between\n\t\t\t\t\t// Association CC and Multi Channel Association CC, so we remove the nodes from both lists\n\t\t\t\t\tawait mcAPI.removeDestinations({\n\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t});\n\t\t\t\t\tif (assocAPI.isSupported()) {\n\t\t\t\t\t\tawait assocAPI.removeNodeIds({\n\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\tawait assocAPI.getGroup(group);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tawait mcAPI.addDestinations({\n\t\t\t\t\tgroupId: group,\n\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t});\n\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\tconst groupReport = await mcAPI.getGroup(group);\n\t\t\t\thasLifeline = !!groupReport?.endpoints.some(\n\t\t\t\t\t(a) => a.nodeId === ownNodeId && a.endpoint === 0,\n\t\t\t\t);\n\n\t\t\t\tif (hasLifeline) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} was assigned with a multi channel association`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association did not work`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Last attempt (actual Z-Wave+ Lifelines only): Try a multi channel association on the root.\n\t\t// Endpoint interviews happen AFTER the root interview, so this enables us to overwrite what\n\t\t// we previously configured on the root.\n\t\tif (\n\t\t\t!hasLifeline\n\t\t\t&& group === 1\n\t\t\t&& node.supportsCC(CommandClasses[\"Z-Wave Plus Info\"])\n\t\t\t&& endpoint.index > 0\n\t\t) {\n\t\t\t// But first check if the root may have a multi channel association\n\t\t\tconst rootAssocConfig = deviceConfig\n\t\t\t\t?.getAssociationConfigForEndpoint(0, group);\n\t\t\tconst rootMustUseNodeAssociation = !nodeSupportsMultiChannel\n\t\t\t\t|| rootAssocConfig?.multiChannel === false;\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`Checking root device for fallback assignment of lifeline group #${group}:\nroot supports multi channel: ${nodeSupportsMultiChannel}\nconfigured strategy: ${rootAssocConfig?.multiChannel ?? \"auto\"}\nmust use node association: ${rootMustUseNodeAssociation}`,\n\t\t\t});\n\n\t\t\tif (!rootMustUseNodeAssociation) {\n\t\t\t\tif (isAssignedAsEndpointAssociation(node)) {\n\t\t\t\t\t// We already have the correct association\n\t\t\t\t\thasLifeline = true;\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`Lifeline group #${group} is already assigned with a multi channel association on the root device`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst rootMCAPI = CCAPI.create(\n\t\t\t\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t);\n\t\t\t\t\tconst rootAssocAPI = CCAPI.create(\n\t\t\t\t\t\tCommandClasses.Association,\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t);\n\t\t\t\t\tif (rootMCAPI.isSupported()) {\n\t\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t`Assigning lifeline group #${group} with a multi channel association on the root device...`,\n\t\t\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// Clean up node associations because they might prevent us from adding the endpoint association\n\t\t\t\t\t\tif (isAssignedAsNodeAssociation(node)) {\n\t\t\t\t\t\t\t// It has been found that some devices don't correctly share the node associations between\n\t\t\t\t\t\t\t// Association CC and Multi Channel Association CC, so we remove the nodes from both lists\n\t\t\t\t\t\t\tawait rootMCAPI.removeDestinations({\n\t\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootAssocAPI.isSupported()) {\n\t\t\t\t\t\t\t\tawait rootAssocAPI.removeNodeIds({\n\t\t\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\t\t\tnodeIds: [ownNodeId],\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\t\t\tawait rootAssocAPI.getGroup(group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait rootMCAPI.addDestinations({\n\t\t\t\t\t\t\tgroupId: group,\n\t\t\t\t\t\t\tendpoints: [{ nodeId: ownNodeId, endpoint: 0 }],\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// refresh the associations - don't trust that it worked\n\t\t\t\t\t\tconst groupReport = await rootMCAPI.getGroup(group);\n\t\t\t\t\t\thasLifeline = !!groupReport?.endpoints.some(\n\t\t\t\t\t\t\t(a) => a.nodeId === ownNodeId && a.endpoint === 0,\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}\n\n\t\tif (!hasLifeline) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage:\n\t\t\t\t\t`All attempts to assign lifeline group #${group} failed, skipping...`,\n\t\t\t\tdirection: \"none\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Remember that we did the association assignment\n\tvalueDB.setValue(\n\t\tAssociationCCValues.hasLifeline.endpoint(endpoint.index),\n\t\ttrue,\n\t);\n}\n\nexport async function assignLifelineIssueingCommand(\n\tctx: CCAPIHost<\n\t\t& CCAPINode\n\t\t& SupportsCC\n\t\t& ControlsCC\n\t\t& GetEndpoint<EndpointId & SupportsCC>\n\t\t& QuerySecurityClasses\n\t>,\n\tendpoint: EndpointId,\n\tccId: CommandClasses,\n\tccCommand: number,\n): Promise<void> {\n\tconst node = ctx.getNodeOrThrow(endpoint.nodeId);\n\tif (\n\t\tnode.supportsCC(CommandClasses[\"Association Group Information\"])\n\t\t&& (node.supportsCC(CommandClasses.Association)\n\t\t\t|| node.supportsCC(CommandClasses[\"Multi Channel Association\"]))\n\t) {\n\t\tconst groupsIssueingNotifications = AssociationGroupInfoCC\n\t\t\t.findGroupsForIssuedCommand(\n\t\t\t\tctx,\n\t\t\t\tnode,\n\t\t\t\tccId,\n\t\t\t\tccCommand,\n\t\t\t);\n\t\tif (groupsIssueingNotifications.length > 0) {\n\t\t\t// We always grab the first group - usually it should be the lifeline\n\t\t\tconst groupId = groupsIssueingNotifications[0];\n\t\t\tconst existingAssociations = getAssociations(ctx, node).get(groupId)\n\t\t\t\t?? [];\n\n\t\t\tif (\n\t\t\t\t!existingAssociations.some(\n\t\t\t\t\t(a) => a.nodeId === ctx.ownNodeId,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: endpoint.index,\n\t\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tccId,\n\t\t\t\t\t\t)\n\t\t\t\t\t} commands...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tawait addAssociations(ctx, node, groupId, [\n\t\t\t\t\t{ nodeId: ctx.ownNodeId },\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function doesAnyLifelineSendActuatorOrSensorReports(\n\tctx: GetValueDB & GetDeviceConfig,\n\tnode: NodeId & SupportsCC,\n): MaybeNotKnown<boolean> {\n\t// No association support means no unsolicited reports\n\tif (\n\t\t!node.supportsCC(CommandClasses.Association)\n\t\t&& !node.supportsCC(CommandClasses[\"Multi Channel Association\"])\n\t) {\n\t\treturn false;\n\t}\n\n\t// No AGI support means we cannot know\n\tif (!node.supportsCC(CommandClasses[\"Association Group Information\"])) {\n\t\treturn NOT_KNOWN;\n\t}\n\n\t// Lifeline group IDs include the ones we added via a config file, so they may not be considered true lifelines\n\tconst lifelineGroupIds = getLifelineGroupIds(ctx, node);\n\t// If any potential lifeline group has the \"General: Lifeline\" profile, the node MUST send unsolicited reports that way\n\tif (\n\t\tlifelineGroupIds.some(\n\t\t\t(id) =>\n\t\t\t\tAssociationGroupInfoCC.getGroupProfileCached(\n\t\t\t\t\tctx,\n\t\t\t\t\tnode,\n\t\t\t\t\tid,\n\t\t\t\t) === AssociationGroupInfoProfile[\"General: Lifeline\"],\n\t\t)\n\t) {\n\t\treturn true;\n\t}\n\n\t// Otherwise check if any of the groups sends any actuator or sensor commands. We'll assume that those are reports\n\tfor (const groupId of lifelineGroupIds) {\n\t\tconst issuedCommands = AssociationGroupInfoCC.getIssuedCommandsCached(\n\t\t\tctx,\n\t\t\tnode,\n\t\t\tgroupId,\n\t\t);\n\t\tif (!issuedCommands) continue;\n\t\tconst commands = [...issuedCommands.keys()];\n\t\tif (commands.some((c) => isActuatorCC(c) || isSensorCC(c))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;;;;;;;;;;;AAAA,kBAwBO;AACP,oBAIO;AACP,oBAAyB;AACzB,2BAAmD;AACnD,oCAAuC;AACvC,uCAA0C;AAC1C,iBAAsD;AACtD,mBAMO;AAED,SAAU,gBACf,KACA,UAAiC;AAEjC,QAAM,MAAM,oBAAI,IAAG;AAEnB,MAAI,SAAS,WAAW,2BAAe,WAAW,GAAG;AACpD,UAAM,eAAe,mCAAc,yBAClC,KACA,QAAQ;AAET,eAAW,CAAC,SAAS,MAAM,KAAK,cAAc;AAC7C,UAAI,IAAI,SAAS,MAAM;IACxB;EACD,OAAO;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CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,GAAG,4BAA4B,CASlF;IACM,oBAAoB,EAAE,eAAe,EAAE,CAAC;IACxC,aAAa,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAQvD;IACM,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,mBAAmB,CASvD;CACJ;AACD,qBAEa,yBAA0B,SAAQ,aAAa;CAC3D"}
@@ -1,7 +1,7 @@
1
1
  import { __esDecorate, __runInitializers } from "tslib";
2
2
  import * as __validateArgs from "./AlarmSensorCC._validateArgs.js";
3
3
  const { validateArgs_AlarmSensorCCAPI_get } = __validateArgs;
4
- import { CommandClasses, MessagePriority, ZWaveError, ZWaveErrorCodes, parseBitMask, validatePayload, } from "@zwave-js/core";
4
+ import { CommandClasses, MessagePriority, ZWaveError, ZWaveErrorCodes, logDict, logList, logText, parseBitMask, validatePayload, } from "@zwave-js/core";
5
5
  import { Bytes, getEnumMemberName, isEnumMember, pick } from "@zwave-js/shared";
6
6
  import { CCAPI, PhysicalCCAPI } from "../lib/API.js";
7
7
  import { CommandClass, } from "../lib/CommandClass.js";
@@ -120,13 +120,11 @@ let AlarmSensorCC = (() => {
120
120
  });
121
121
  const supportedSensorTypes = await api.getSupportedSensorTypes();
122
122
  if (supportedSensorTypes) {
123
- const logMessage = `received supported sensor types: ${supportedSensorTypes
124
- .map((type) => getEnumMemberName(AlarmSensorType, type))
125
- .map((name) => `\n· ${name}`)
126
- .join("")}`;
127
123
  ctx.logNode(node.id, {
128
124
  endpoint: this.endpointIndex,
129
- message: logMessage,
125
+ message: logText("received supported sensor types:", {
126
+ nested: logList(supportedSensorTypes.map((type) => getEnumMemberName(AlarmSensorType, type))),
127
+ }),
130
128
  direction: "inbound",
131
129
  });
132
130
  }
@@ -166,19 +164,15 @@ let AlarmSensorCC = (() => {
166
164
  });
167
165
  const currentValue = await api.get(type);
168
166
  if (currentValue) {
169
- let message = `received current value for ${sensorName}:
170
- state: ${currentValue.state}`;
171
- if (currentValue.severity != undefined) {
172
- message += `
173
- severity: ${currentValue.severity}`;
174
- }
175
- if (currentValue.duration != undefined) {
176
- message += `
177
- duration: ${currentValue.duration}`;
178
- }
179
167
  ctx.logNode(node.id, {
180
168
  endpoint: this.endpointIndex,
181
- message,
169
+ message: logText(`received current value for ${sensorName}:`, {
170
+ nested: logDict({
171
+ state: currentValue.state,
172
+ severity: currentValue.severity,
173
+ duration: currentValue.duration,
174
+ }),
175
+ }),
182
176
  direction: "inbound",
183
177
  });
184
178
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AlarmSensorCC.js","sourceRoot":"","sources":["../../../src_gen/cc/AlarmSensorCC.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,cAAc,MAAM,kCAAkC,CAAC;AACnE,MAAM,EAAE,iCAAiC,EAAE,GAAG,cAAc,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAkF,eAAe,EAAuD,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,GAAG,MAAM,gBAAgB,CAAC;AACnQ,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAc,YAAY,GAA2G,MAAM,wBAAwB,CAAC;AAC3K,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,GAAG,MAAM,kCAAkC,CAAC;AAEpJ,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,sCAAsC;IAEzB,gBAAgB;4BAD5B,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;;;;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;gBACzB,OAAO,KAAK,CAAC;YACjB,uCAAuC;YACvC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC3C,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;QACM,UAAU,CAAC,GAAgB;YAC9B,OAAO;gBACH,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;gBACxB,OAAO,EAAE;oBACL,wBAAwB,EAAE,IAAI,CAAC,oBAAoB;yBAC9C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;yBACjD,IAAI,CAAC,IAAI,CAAC;iBAClB;aACJ,CAAC;QACN,CAAC;;;;SAnCQ,4BAA4B;IAuC5B,yBAAyB;4BAFrC,SAAS,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAC1C,kBAAkB,CAAC,4BAA4B,CAAC;;;;sBACF,aAAa;yCAArB,SAAQ,WAAa;;;;YAA5D,6KACC;;;YADY,uDAAyB;;;;;SAAzB,yBAAyB"}
@@ -78,7 +78,7 @@ export declare class AssociationCCSet extends AssociationCC {
78
78
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
79
79
  }
80
80
  export interface AssociationCCRemoveOptions {
81
- /** The group from which to remove the nodes. If none is specified, the nodes will be removed from all nodes. */
81
+ /** The group from which to remove the nodes. If none is specified, the nodes will be removed from all groups. */
82
82
  groupId?: number;
83
83
  /** The nodes to remove. If none are specified, ALL nodes will be removed. */
84
84
  nodeIds?: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"AssociationCC.d.ts","sourceRoot":"","sources":["../../../src_gen/cc/AssociationCC.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,K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AAS,MAAM,EAAE,CAAC,CAAC;IAClE,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,CAevD;IACM,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,mBAAmB,CAUvD;CACJ;AAED,MAAM,WAAW,2CAA2C;IACxD,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AACD,qBAEa,oCAAqC,SAAQ,sBAAsB;IAC5E,YAAmB,OAAO,EAAE,WAAW,CAAC,2CAA2C,CAAC,EAInF;IACD,OAAc,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,GAAG,oCAAoC,CAS1F;IACM,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,CAMvD;IACM,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,mBAAmB,CAQvD;CACJ"}
@@ -1,7 +1,7 @@
1
1
  import { __esDecorate, __runInitializers } from "tslib";
2
2
  import * as __validateArgs from "./AssociationGroupInfoCC._validateArgs.js";
3
3
  const { validateArgs_AssociationGroupInfoCCAPI_getGroupName, validateArgs_AssociationGroupInfoCCAPI_reportGroupName, validateArgs_AssociationGroupInfoCCAPI_getGroupInfo, validateArgs_AssociationGroupInfoCCAPI_reportGroupInfo, validateArgs_AssociationGroupInfoCCAPI_getCommands, validateArgs_AssociationGroupInfoCCAPI_reportCommands } = __validateArgs;
4
- import { CommandClasses, MessagePriority, encodeCCId, getCCName, parseCCId, validatePayload, } from "@zwave-js/core";
4
+ import { CommandClasses, MessagePriority, encodeCCId, getCCName, logDict, logList, logText, parseCCId, validatePayload, } from "@zwave-js/core";
5
5
  import { Bytes, cpp2js, getEnumMemberName, num2hex } from "@zwave-js/shared";
6
6
  import { CCAPI, PhysicalCCAPI } from "../lib/API.js";
7
7
  import { CommandClass, } from "../lib/CommandClass.js";
@@ -277,12 +277,14 @@ let AssociationGroupInfoCC = (() => {
277
277
  });
278
278
  const info = await api.getGroupInfo(groupId, !!hasDynamicInfo);
279
279
  if (info) {
280
- const logMessage = `Received info for association group #${groupId}:
281
- info is dynamic: ${info.hasDynamicInfo}
282
- profile: ${getEnumMemberName(AssociationGroupInfoProfile, info.profile)}`;
283
280
  ctx.logNode(node.id, {
284
281
  endpoint: this.endpointIndex,
285
- message: logMessage,
282
+ message: logText(`Received info for association group #${groupId}:`, {
283
+ nested: logDict({
284
+ "info is dynamic": info.hasDynamicInfo,
285
+ profile: getEnumMemberName(AssociationGroupInfoProfile, info.profile),
286
+ }),
287
+ }),
286
288
  direction: "inbound",
287
289
  });
288
290
  }
@@ -478,17 +480,16 @@ let AssociationGroupInfoCCInfoReport = (() => {
478
480
  toLogEntry(ctx) {
479
481
  return {
480
482
  ...super.toLogEntry(ctx),
481
- message: {
483
+ message: logDict({
482
484
  "is list mode": this.isListMode,
483
485
  "has dynamic info": this.hasDynamicInfo,
484
- groups: this.groups
485
- .map((g) => `
486
- · Group #${g.groupId}
487
- mode: ${g.mode}
488
- profile: ${g.profile}
489
- event code: ${g.eventCode}`)
490
- .join(""),
491
- },
486
+ }, this.groups.map((g) => logText(`Group #${g.groupId}`, {
487
+ nested: logDict({
488
+ mode: g.mode,
489
+ profile: g.profile,
490
+ "event code": g.eventCode,
491
+ }),
492
+ }))),
492
493
  };
493
494
  }
494
495
  };
@@ -631,13 +632,9 @@ let AssociationGroupInfoCCCommandListReport = (() => {
631
632
  ...super.toLogEntry(ctx),
632
633
  message: {
633
634
  "group id": this.groupId,
634
- commands: [...this.commands]
635
- .map(([cc, cmds]) => {
636
- return `\n· ${getCCName(cc)}: ${cmds
637
- .map((cmd) => num2hex(cmd))
638
- .join(", ")}`;
639
- })
640
- .join(""),
635
+ commands: logList([...this.commands].map(([cc, cmds]) => `${getCCName(cc)}: ${cmds
636
+ .map((cmd) => num2hex(cmd))
637
+ .join(", ")}`)),
641
638
  },
642
639
  };
643
640
  }