@zwave-js/cc 14.0.0-beta.4 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +381 -266
  2. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  3. package/build/cjs/cc/AssociationCC.js +669 -503
  4. package/build/cjs/cc/AssociationCC.js.map +3 -3
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  7. package/build/cjs/cc/BarrierOperatorCC.js +595 -429
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  9. package/build/cjs/cc/BasicCC.js +354 -260
  10. package/build/cjs/cc/BasicCC.js.map +3 -3
  11. package/build/cjs/cc/BatteryCC.js +427 -345
  12. package/build/cjs/cc/BatteryCC.js.map +3 -3
  13. package/build/cjs/cc/BinarySensorCC.js +391 -276
  14. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  15. package/build/cjs/cc/BinarySwitchCC.js +347 -253
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.js +160 -85
  18. package/build/cjs/cc/CRC16CC.js.map +3 -3
  19. package/build/cjs/cc/CentralSceneCC.js +459 -324
  20. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  21. package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  23. package/build/cjs/cc/ClockCC.js +254 -150
  24. package/build/cjs/cc/ClockCC.js.map +3 -3
  25. package/build/cjs/cc/ColorSwitchCC.js +758 -610
  26. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  27. package/build/cjs/cc/ConfigurationCC.js +1700 -1453
  28. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  29. package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
  30. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  31. package/build/cjs/cc/DoorLockCC.js +904 -777
  32. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  33. package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
  34. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  35. package/build/cjs/cc/EnergyProductionCC.js +249 -160
  36. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  37. package/build/cjs/cc/EntryControlCC.js +619 -458
  38. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  39. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
  40. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  41. package/build/cjs/cc/HailCC.js +57 -11
  42. package/build/cjs/cc/HailCC.js.map +2 -2
  43. package/build/cjs/cc/HumidityControlModeCC.js +359 -233
  44. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  45. package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
  46. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  47. package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
  48. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  49. package/build/cjs/cc/InclusionControllerCC.js +205 -114
  50. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  51. package/build/cjs/cc/IndicatorCC.js +897 -736
  52. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  53. package/build/cjs/cc/IrrigationCC.js +1651 -1405
  54. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  55. package/build/cjs/cc/LanguageCC.js +268 -171
  56. package/build/cjs/cc/LanguageCC.js.map +3 -3
  57. package/build/cjs/cc/LockCC.js +254 -154
  58. package/build/cjs/cc/LockCC.js.map +3 -3
  59. package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
  60. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  61. package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
  62. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  63. package/build/cjs/cc/MeterCC.js +827 -707
  64. package/build/cjs/cc/MeterCC.js.map +3 -3
  65. package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
  66. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  67. package/build/cjs/cc/MultiChannelCC.js +1037 -819
  68. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  69. package/build/cjs/cc/MultiCommandCC.js +172 -97
  70. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  71. package/build/cjs/cc/MultilevelSensorCC.js +589 -449
  72. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  73. package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
  74. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  75. package/build/cjs/cc/NoOperationCC.js +89 -27
  76. package/build/cjs/cc/NoOperationCC.js.map +2 -2
  77. package/build/cjs/cc/NodeNamingCC.js +417 -277
  78. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  79. package/build/cjs/cc/NotificationCC.js +972 -818
  80. package/build/cjs/cc/NotificationCC.js.map +3 -3
  81. package/build/cjs/cc/PowerlevelCC.js +450 -303
  82. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  83. package/build/cjs/cc/ProtectionCC.js +686 -494
  84. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  85. package/build/cjs/cc/SceneActivationCC.js +165 -97
  86. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  87. package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
  88. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  89. package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
  90. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  91. package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
  92. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  93. package/build/cjs/cc/Security2CC.js +1483 -1219
  94. package/build/cjs/cc/Security2CC.js.map +3 -3
  95. package/build/cjs/cc/SecurityCC.js +839 -619
  96. package/build/cjs/cc/SecurityCC.js.map +3 -3
  97. package/build/cjs/cc/SoundSwitchCC.js +707 -515
  98. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  99. package/build/cjs/cc/SupervisionCC.js +327 -237
  100. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  101. package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
  102. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  103. package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
  104. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  105. package/build/cjs/cc/ThermostatModeCC.js +425 -302
  106. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  107. package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
  108. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  109. package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
  110. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  111. package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
  112. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  113. package/build/cjs/cc/TimeCC.js +515 -353
  114. package/build/cjs/cc/TimeCC.js.map +3 -3
  115. package/build/cjs/cc/TimeParametersCC.js +302 -202
  116. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  117. package/build/cjs/cc/TransportServiceCC.js +433 -315
  118. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  119. package/build/cjs/cc/UserCodeCC.js +1385 -1102
  120. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  121. package/build/cjs/cc/VersionCC.js +696 -562
  122. package/build/cjs/cc/VersionCC.js.map +3 -3
  123. package/build/cjs/cc/WakeUpCC.js +499 -346
  124. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  125. package/build/cjs/cc/WindowCoveringCC.js +626 -478
  126. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  127. package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
  128. package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
  129. package/build/cjs/cc/ZWavePlusCC.js +233 -159
  130. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  131. package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
  132. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  133. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  134. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  135. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
  136. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  137. package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
  138. package/build/cjs/lib/CommandClassDecorators.js +19 -20
  139. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  140. package/build/cjs/lib/Security2/Extension.d.ts +1 -1
  141. package/build/cjs/lib/Security2/Extension.js +217 -126
  142. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  143. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/AlarmSensorCC.js +389 -291
  145. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  146. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  147. package/build/esm/cc/AssociationCC.js +678 -537
  148. package/build/esm/cc/AssociationCC.js.map +1 -1
  149. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  150. package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
  151. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  152. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  153. package/build/esm/cc/BarrierOperatorCC.js +634 -493
  154. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  155. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  156. package/build/esm/cc/BasicCC.js +380 -302
  157. package/build/esm/cc/BasicCC.js.map +1 -1
  158. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  159. package/build/esm/cc/BatteryCC.js +449 -384
  160. package/build/esm/cc/BatteryCC.js.map +1 -1
  161. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  162. package/build/esm/cc/BinarySensorCC.js +395 -297
  163. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  164. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  165. package/build/esm/cc/BinarySwitchCC.js +353 -274
  166. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  167. package/build/esm/cc/CRC16CC.js +162 -98
  168. package/build/esm/cc/CRC16CC.js.map +1 -1
  169. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  170. package/build/esm/cc/CentralSceneCC.js +465 -351
  171. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  172. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  173. package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
  174. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  175. package/build/esm/cc/ClockCC.js +248 -159
  176. package/build/esm/cc/ClockCC.js.map +1 -1
  177. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  178. package/build/esm/cc/ColorSwitchCC.js +802 -677
  179. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  180. package/build/esm/cc/ConfigurationCC.js +1899 -1687
  181. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  182. package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
  183. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  184. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  185. package/build/esm/cc/DoorLockCC.js +951 -849
  186. package/build/esm/cc/DoorLockCC.js.map +1 -1
  187. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  188. package/build/esm/cc/DoorLockLoggingCC.js +316 -218
  189. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  190. package/build/esm/cc/EnergyProductionCC.js +240 -164
  191. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  192. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  193. package/build/esm/cc/EntryControlCC.js +629 -493
  194. package/build/esm/cc/EntryControlCC.js.map +1 -1
  195. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  196. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
  197. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  198. package/build/esm/cc/HailCC.js +51 -12
  199. package/build/esm/cc/HailCC.js.map +1 -1
  200. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  201. package/build/esm/cc/HumidityControlModeCC.js +357 -250
  202. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  203. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  204. package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
  205. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  206. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  207. package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
  208. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  209. package/build/esm/cc/InclusionControllerCC.js +197 -119
  210. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  211. package/build/esm/cc/IndicatorCC.js +973 -835
  212. package/build/esm/cc/IndicatorCC.js.map +1 -1
  213. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  214. package/build/esm/cc/IrrigationCC.js +1697 -1496
  215. package/build/esm/cc/IrrigationCC.js.map +1 -1
  216. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  217. package/build/esm/cc/LanguageCC.js +266 -184
  218. package/build/esm/cc/LanguageCC.js.map +1 -1
  219. package/build/esm/cc/LockCC.d.ts.map +1 -1
  220. package/build/esm/cc/LockCC.js +247 -162
  221. package/build/esm/cc/LockCC.js.map +1 -1
  222. package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
  223. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  224. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  225. package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
  226. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  227. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  228. package/build/esm/cc/MeterCC.js +896 -795
  229. package/build/esm/cc/MeterCC.js.map +1 -1
  230. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  231. package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
  232. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  233. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  234. package/build/esm/cc/MultiChannelCC.js +1106 -921
  235. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  236. package/build/esm/cc/MultiCommandCC.js +166 -102
  237. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  238. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  239. package/build/esm/cc/MultilevelSensorCC.js +616 -497
  240. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  241. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  242. package/build/esm/cc/MultilevelSwitchCC.js +621 -496
  243. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  244. package/build/esm/cc/NoOperationCC.js +82 -29
  245. package/build/esm/cc/NoOperationCC.js.map +1 -1
  246. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  247. package/build/esm/cc/NodeNamingCC.js +413 -294
  248. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  249. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  250. package/build/esm/cc/NotificationCC.js +1097 -966
  251. package/build/esm/cc/NotificationCC.js.map +1 -1
  252. package/build/esm/cc/PowerlevelCC.js +437 -311
  253. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  254. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  255. package/build/esm/cc/ProtectionCC.js +704 -543
  256. package/build/esm/cc/ProtectionCC.js.map +1 -1
  257. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  258. package/build/esm/cc/SceneActivationCC.js +157 -100
  259. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  260. package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
  261. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  262. package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
  263. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  264. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  265. package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
  266. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  267. package/build/esm/cc/Security2CC.js +1633 -1406
  268. package/build/esm/cc/Security2CC.js.map +1 -1
  269. package/build/esm/cc/SecurityCC.js +876 -687
  270. package/build/esm/cc/SecurityCC.js.map +1 -1
  271. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  272. package/build/esm/cc/SoundSwitchCC.js +689 -526
  273. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  274. package/build/esm/cc/SupervisionCC.js +349 -272
  275. package/build/esm/cc/SupervisionCC.js.map +1 -1
  276. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  277. package/build/esm/cc/ThermostatFanModeCC.js +388 -284
  278. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  279. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  280. package/build/esm/cc/ThermostatFanStateCC.js +184 -111
  281. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  282. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  283. package/build/esm/cc/ThermostatModeCC.js +435 -331
  284. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  285. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  286. package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
  287. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  288. package/build/esm/cc/ThermostatSetbackCC.js +274 -185
  289. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  290. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  291. package/build/esm/cc/ThermostatSetpointCC.js +674 -543
  292. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  293. package/build/esm/cc/TimeCC.js +499 -360
  294. package/build/esm/cc/TimeCC.js.map +1 -1
  295. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  296. package/build/esm/cc/TimeParametersCC.js +296 -211
  297. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  298. package/build/esm/cc/TransportServiceCC.js +464 -363
  299. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  300. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  301. package/build/esm/cc/UserCodeCC.js +1443 -1205
  302. package/build/esm/cc/UserCodeCC.js.map +1 -1
  303. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  304. package/build/esm/cc/VersionCC.js +744 -635
  305. package/build/esm/cc/VersionCC.js.map +1 -1
  306. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  307. package/build/esm/cc/WakeUpCC.js +494 -364
  308. package/build/esm/cc/WakeUpCC.js.map +1 -1
  309. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  310. package/build/esm/cc/WindowCoveringCC.js +655 -530
  311. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  312. package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
  313. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  314. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  315. package/build/esm/cc/ZWavePlusCC.js +223 -162
  316. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  317. package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
  318. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  319. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  320. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  321. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
  322. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  323. package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
  324. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  325. package/build/esm/lib/CommandClassDecorators.js +24 -24
  326. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  327. package/build/esm/lib/Security2/Extension.d.ts +1 -1
  328. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  329. package/build/esm/lib/Security2/Extension.js +207 -123
  330. package/build/esm/lib/Security2/Extension.js.map +1 -1
  331. package/package.json +6 -6
@@ -1,10 +1,37 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
6
34
  };
7
- var AssociationCC_1, AssociationCCSet_1, AssociationCCRemove_1, AssociationCCReport_1, AssociationCCGet_1, AssociationCCSupportedGroupingsReport_1, AssociationCCSpecificGroupReport_1;
8
35
  function __assertType(argName, typeName, boundHasError) {
9
36
  const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
10
37
  if (boundHasError()) {
@@ -118,7 +145,7 @@ import { Bytes } from "@zwave-js/shared/safe";
118
145
  import { distinct } from "alcalzone-shared/arrays/index.js";
119
146
  import { CCAPI, PhysicalCCAPI } from "../lib/API.js";
120
147
  import { CommandClass, } from "../lib/CommandClass.js";
121
- import { API, CCCommand, ccValue, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
148
+ import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
122
149
  import { V } from "../lib/Values.js";
123
150
  import { AssociationCommand } from "../lib/_Types.js";
124
151
  import * as ccUtils from "../lib/utils.js";
@@ -137,570 +164,684 @@ export const AssociationCCValues = Object.freeze({
137
164
  }),
138
165
  });
139
166
  // @noSetValueAPI
140
- let AssociationCCAPI = class AssociationCCAPI extends PhysicalCCAPI {
141
- supportsCommand(cmd) {
142
- switch (cmd) {
143
- case AssociationCommand.Get:
144
- case AssociationCommand.Set:
145
- case AssociationCommand.Report:
146
- case AssociationCommand.Remove:
147
- case AssociationCommand.SupportedGroupingsGet:
148
- case AssociationCommand.SupportedGroupingsReport:
149
- return true;
150
- case AssociationCommand.SpecificGroupGet:
151
- case AssociationCommand.SpecificGroupReport:
152
- return this.version >= 2;
153
- }
154
- return super.supportsCommand(cmd);
155
- }
156
- /**
157
- * Returns the number of association groups a node supports.
158
- * Association groups are consecutive, starting at 1.
159
- */
160
- async getGroupCount() {
161
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsGet);
162
- const cc = new AssociationCCSupportedGroupingsGet({
163
- nodeId: this.endpoint.nodeId,
164
- endpointIndex: this.endpoint.index,
165
- });
166
- const response = await this.host.sendCommand(cc, this.commandOptions);
167
- if (response)
168
- return response.groupCount;
169
- }
170
- async reportGroupCount(groupCount) {
171
- __assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
172
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsReport);
173
- const cc = new AssociationCCSupportedGroupingsReport({
174
- nodeId: this.endpoint.nodeId,
175
- endpointIndex: this.endpoint.index,
176
- groupCount,
177
- });
178
- await this.host.sendCommand(cc, this.commandOptions);
179
- }
180
- /**
181
- * Returns information about an association group.
182
- */
183
- async getGroup(groupId) {
184
- __assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
185
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.Get);
186
- const cc = new AssociationCCGet({
187
- nodeId: this.endpoint.nodeId,
188
- endpointIndex: this.endpoint.index,
189
- groupId,
190
- });
191
- const response = await this.host.sendCommand(cc, this.commandOptions);
192
- if (response) {
193
- return {
194
- maxNodes: response.maxNodes,
195
- nodeIds: response.nodeIds,
196
- };
167
+ let AssociationCCAPI = (() => {
168
+ let _classDecorators = [API(CommandClasses.Association)];
169
+ let _classDescriptor;
170
+ let _classExtraInitializers = [];
171
+ let _classThis;
172
+ let _classSuper = PhysicalCCAPI;
173
+ var AssociationCCAPI = class extends _classSuper {
174
+ static { _classThis = this; }
175
+ static {
176
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
177
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
178
+ AssociationCCAPI = _classThis = _classDescriptor.value;
179
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
180
+ __runInitializers(_classThis, _classExtraInitializers);
197
181
  }
198
- }
199
- async sendReport(options) {
200
- __assertType("options", "AssociationCCReportOptions", __assertType__AssociationCCReportOptions.bind(void 0, options));
201
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.Report);
202
- const cc = new AssociationCCReport({
203
- nodeId: this.endpoint.nodeId,
204
- endpointIndex: this.endpoint.index,
205
- ...options,
206
- });
207
- await this.host.sendCommand(cc, this.commandOptions);
208
- }
209
- /**
210
- * Adds new nodes to an association group
211
- */
212
- async addNodeIds(groupId, ...nodeIds) {
213
- __assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
214
- __assertType("nodeIds", undefined, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
215
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.Set);
216
- const cc = new AssociationCCSet({
217
- nodeId: this.endpoint.nodeId,
218
- endpointIndex: this.endpoint.index,
219
- groupId,
220
- nodeIds,
221
- });
222
- return this.host.sendCommand(cc, this.commandOptions);
223
- }
224
- /**
225
- * Removes nodes from an association group
226
- */
227
- async removeNodeIds(options) {
228
- __assertType("options", "AssociationCCRemoveOptions", __assertType__AssociationCCRemoveOptions.bind(void 0, options));
229
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);
230
- // Validate options
231
- if (!options.groupId) {
232
- if (this.version === 1) {
233
- throw new ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, ZWaveErrorCodes.Argument_Invalid);
182
+ supportsCommand(cmd) {
183
+ switch (cmd) {
184
+ case AssociationCommand.Get:
185
+ case AssociationCommand.Set:
186
+ case AssociationCommand.Report:
187
+ case AssociationCommand.Remove:
188
+ case AssociationCommand.SupportedGroupingsGet:
189
+ case AssociationCommand.SupportedGroupingsReport:
190
+ return true;
191
+ case AssociationCommand.SpecificGroupGet:
192
+ case AssociationCommand.SpecificGroupReport:
193
+ return this.version >= 2;
234
194
  }
195
+ return super.supportsCommand(cmd);
235
196
  }
236
- else if (options.groupId < 0) {
237
- throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
197
+ /**
198
+ * Returns the number of association groups a node supports.
199
+ * Association groups are consecutive, starting at 1.
200
+ */
201
+ async getGroupCount() {
202
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsGet);
203
+ const cc = new AssociationCCSupportedGroupingsGet({
204
+ nodeId: this.endpoint.nodeId,
205
+ endpointIndex: this.endpoint.index,
206
+ });
207
+ const response = await this.host.sendCommand(cc, this.commandOptions);
208
+ if (response)
209
+ return response.groupCount;
238
210
  }
239
- const cc = new AssociationCCRemove({
240
- nodeId: this.endpoint.nodeId,
241
- endpointIndex: this.endpoint.index,
242
- ...options,
243
- });
244
- return this.host.sendCommand(cc, this.commandOptions);
245
- }
246
- /**
247
- * Removes nodes from all association groups
248
- */
249
- async removeNodeIdsFromAllGroups(nodeIds) {
250
- __assertType("nodeIds", undefined, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
251
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);
252
- if (this.version >= 2) {
253
- // The node supports bulk removal
254
- return this.removeNodeIds({ nodeIds, groupId: 0 });
255
- }
256
- else {
257
- // We have to remove the node manually from all groups
258
- const groupCount = this.tryGetValueDB()?.getValue(AssociationCCValues.groupCount.endpoint(this.endpoint.index)) ?? 0;
259
- for (let groupId = 1; groupId <= groupCount; groupId++) {
260
- // TODO: evaluate intermediate supervision results
261
- await this.removeNodeIds({ nodeIds, groupId });
211
+ async reportGroupCount(groupCount) {
212
+ __assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
213
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.SupportedGroupingsReport);
214
+ const cc = new AssociationCCSupportedGroupingsReport({
215
+ nodeId: this.endpoint.nodeId,
216
+ endpointIndex: this.endpoint.index,
217
+ groupCount,
218
+ });
219
+ await this.host.sendCommand(cc, this.commandOptions);
220
+ }
221
+ /**
222
+ * Returns information about an association group.
223
+ */
224
+ async getGroup(groupId) {
225
+ __assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
226
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.Get);
227
+ const cc = new AssociationCCGet({
228
+ nodeId: this.endpoint.nodeId,
229
+ endpointIndex: this.endpoint.index,
230
+ groupId,
231
+ });
232
+ const response = await this.host.sendCommand(cc, this.commandOptions);
233
+ if (response) {
234
+ return {
235
+ maxNodes: response.maxNodes,
236
+ nodeIds: response.nodeIds,
237
+ };
262
238
  }
263
239
  }
264
- }
265
- /**
266
- * Request the association group that represents the most recently detected button press
267
- */
268
- async getSpecificGroup() {
269
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupGet);
270
- const cc = new AssociationCCSpecificGroupGet({
271
- nodeId: this.endpoint.nodeId,
272
- endpointIndex: this.endpoint.index,
273
- });
274
- const response = await this.host.sendCommand(cc, this.commandOptions);
275
- return response?.group;
276
- }
277
- /**
278
- * Report the association group that represents the most recently detected button press
279
- */
280
- async reportSpecificGroup(group) {
281
- __assertType("group", "number", __assertType__number.bind(void 0, group));
282
- this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupReport);
283
- const cc = new AssociationCCSpecificGroupReport({
284
- nodeId: this.endpoint.nodeId,
285
- endpointIndex: this.endpoint.index,
286
- group,
287
- });
288
- await this.host.sendCommand(cc, this.commandOptions);
289
- }
290
- };
291
- AssociationCCAPI = __decorate([
292
- API(CommandClasses.Association)
293
- ], AssociationCCAPI);
294
- export { AssociationCCAPI };
295
- let AssociationCC = AssociationCC_1 = class AssociationCC extends CommandClass {
296
- determineRequiredCCInterviews() {
297
- // AssociationCC must be interviewed after Z-Wave+ if that is supported
298
- return [
299
- ...super.determineRequiredCCInterviews(),
300
- CommandClasses["Z-Wave Plus Info"],
301
- // We need information about endpoints to correctly configure the lifeline associations
302
- CommandClasses["Multi Channel"],
303
- ];
304
- }
305
- /**
306
- * Returns the number of association groups reported by the node/endpoint.
307
- * This only works AFTER the interview process
308
- */
309
- static getGroupCountCached(ctx, endpoint) {
310
- return ctx
311
- .getValueDB(endpoint.nodeId)
312
- .getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
313
- }
314
- /**
315
- * Returns the number of nodes an association group supports.
316
- * This only works AFTER the interview process
317
- */
318
- static getMaxNodesCached(ctx, endpoint, groupId) {
319
- return (ctx
320
- .getValueDB(endpoint.nodeId)
321
- .getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index))
322
- // If the information is not available, fall back to the configuration file if possible
323
- // This can happen on some legacy devices which have "hidden" association groups
324
- ?? ctx
325
- .getDeviceConfig?.(endpoint.nodeId)
326
- ?.getAssociationConfigForEndpoint(endpoint.index, groupId)
327
- ?.maxNodes
328
- ?? 0);
329
- }
330
- /**
331
- * Returns all the destinations of all association groups reported by the node/endpoint.
332
- * This only works AFTER the interview process
333
- */
334
- static getAllDestinationsCached(ctx, endpoint) {
335
- const ret = new Map();
336
- const groupCount = this.getGroupCountCached(ctx, endpoint);
337
- const valueDB = ctx.getValueDB(endpoint.nodeId);
338
- for (let i = 1; i <= groupCount; i++) {
339
- // Add all root destinations
340
- const nodes = valueDB.getValue(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
341
- ret.set(i,
342
- // Filter out duplicates
343
- distinct(nodes).map((nodeId) => ({ nodeId })));
344
- }
345
- return ret;
346
- }
347
- async interview(ctx) {
348
- const node = this.getNode(ctx);
349
- const endpoint = this.getEndpoint(ctx);
350
- const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
351
- priority: MessagePriority.NodeQuery,
352
- });
353
- ctx.logNode(node.id, {
354
- endpoint: this.endpointIndex,
355
- message: `Interviewing ${this.ccName}...`,
356
- direction: "none",
357
- });
358
- // Even if Multi Channel Association is supported, we still need to query the number of
359
- // normal association groups since some devices report more association groups than
360
- // multi channel association groups
361
- // Find out how many groups are supported
362
- ctx.logNode(node.id, {
363
- endpoint: this.endpointIndex,
364
- message: "querying number of association groups...",
365
- direction: "outbound",
366
- });
367
- const groupCount = await api.getGroupCount();
368
- if (groupCount != undefined) {
369
- ctx.logNode(node.id, {
370
- endpoint: this.endpointIndex,
371
- message: `supports ${groupCount} association groups`,
372
- direction: "inbound",
240
+ async sendReport(options) {
241
+ __assertType("options", "AssociationCCReportOptions", __assertType__AssociationCCReportOptions.bind(void 0, options));
242
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.Report);
243
+ const cc = new AssociationCCReport({
244
+ nodeId: this.endpoint.nodeId,
245
+ endpointIndex: this.endpoint.index,
246
+ ...options,
373
247
  });
248
+ await this.host.sendCommand(cc, this.commandOptions);
374
249
  }
375
- else {
376
- ctx.logNode(node.id, {
377
- endpoint: this.endpointIndex,
378
- message: "Querying association groups timed out, skipping interview...",
379
- level: "warn",
250
+ /**
251
+ * Adds new nodes to an association group
252
+ */
253
+ async addNodeIds(groupId, ...nodeIds) {
254
+ __assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
255
+ __assertType("nodeIds", undefined, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
256
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.Set);
257
+ const cc = new AssociationCCSet({
258
+ nodeId: this.endpoint.nodeId,
259
+ endpointIndex: this.endpoint.index,
260
+ groupId,
261
+ nodeIds,
262
+ });
263
+ return this.host.sendCommand(cc, this.commandOptions);
264
+ }
265
+ /**
266
+ * Removes nodes from an association group
267
+ */
268
+ async removeNodeIds(options) {
269
+ __assertType("options", "AssociationCCRemoveOptions", __assertType__AssociationCCRemoveOptions.bind(void 0, options));
270
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);
271
+ // Validate options
272
+ if (!options.groupId) {
273
+ if (this.version === 1) {
274
+ throw new ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, ZWaveErrorCodes.Argument_Invalid);
275
+ }
276
+ }
277
+ else if (options.groupId < 0) {
278
+ throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
279
+ }
280
+ const cc = new AssociationCCRemove({
281
+ nodeId: this.endpoint.nodeId,
282
+ endpointIndex: this.endpoint.index,
283
+ ...options,
284
+ });
285
+ return this.host.sendCommand(cc, this.commandOptions);
286
+ }
287
+ /**
288
+ * Removes nodes from all association groups
289
+ */
290
+ async removeNodeIdsFromAllGroups(nodeIds) {
291
+ __assertType("nodeIds", undefined, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
292
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.Remove);
293
+ if (this.version >= 2) {
294
+ // The node supports bulk removal
295
+ return this.removeNodeIds({ nodeIds, groupId: 0 });
296
+ }
297
+ else {
298
+ // We have to remove the node manually from all groups
299
+ const groupCount = this.tryGetValueDB()?.getValue(AssociationCCValues.groupCount.endpoint(this.endpoint.index)) ?? 0;
300
+ for (let groupId = 1; groupId <= groupCount; groupId++) {
301
+ // TODO: evaluate intermediate supervision results
302
+ await this.removeNodeIds({ nodeIds, groupId });
303
+ }
304
+ }
305
+ }
306
+ /**
307
+ * Request the association group that represents the most recently detected button press
308
+ */
309
+ async getSpecificGroup() {
310
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupGet);
311
+ const cc = new AssociationCCSpecificGroupGet({
312
+ nodeId: this.endpoint.nodeId,
313
+ endpointIndex: this.endpoint.index,
314
+ });
315
+ const response = await this.host.sendCommand(cc, this.commandOptions);
316
+ return response?.group;
317
+ }
318
+ /**
319
+ * Report the association group that represents the most recently detected button press
320
+ */
321
+ async reportSpecificGroup(group) {
322
+ __assertType("group", "number", __assertType__number.bind(void 0, group));
323
+ this.assertSupportsCommand(AssociationCommand, AssociationCommand.SpecificGroupReport);
324
+ const cc = new AssociationCCSpecificGroupReport({
325
+ nodeId: this.endpoint.nodeId,
326
+ endpointIndex: this.endpoint.index,
327
+ group,
380
328
  });
381
- return;
329
+ await this.host.sendCommand(cc, this.commandOptions);
330
+ }
331
+ };
332
+ return AssociationCCAPI = _classThis;
333
+ })();
334
+ export { AssociationCCAPI };
335
+ let AssociationCC = (() => {
336
+ let _classDecorators = [commandClass(CommandClasses.Association), implementedVersion(4), ccValues(AssociationCCValues)];
337
+ let _classDescriptor;
338
+ let _classExtraInitializers = [];
339
+ let _classThis;
340
+ let _classSuper = CommandClass;
341
+ var AssociationCC = class extends _classSuper {
342
+ static { _classThis = this; }
343
+ static {
344
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
345
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
346
+ AssociationCC = _classThis = _classDescriptor.value;
347
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
348
+ __runInitializers(_classThis, _classExtraInitializers);
349
+ }
350
+ determineRequiredCCInterviews() {
351
+ // AssociationCC must be interviewed after Z-Wave+ if that is supported
352
+ return [
353
+ ...super.determineRequiredCCInterviews(),
354
+ CommandClasses["Z-Wave Plus Info"],
355
+ // We need information about endpoints to correctly configure the lifeline associations
356
+ CommandClasses["Multi Channel"],
357
+ ];
358
+ }
359
+ /**
360
+ * Returns the number of association groups reported by the node/endpoint.
361
+ * This only works AFTER the interview process
362
+ */
363
+ static getGroupCountCached(ctx, endpoint) {
364
+ return ctx
365
+ .getValueDB(endpoint.nodeId)
366
+ .getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
367
+ }
368
+ /**
369
+ * Returns the number of nodes an association group supports.
370
+ * This only works AFTER the interview process
371
+ */
372
+ static getMaxNodesCached(ctx, endpoint, groupId) {
373
+ return (ctx
374
+ .getValueDB(endpoint.nodeId)
375
+ .getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index))
376
+ // If the information is not available, fall back to the configuration file if possible
377
+ // This can happen on some legacy devices which have "hidden" association groups
378
+ ?? ctx
379
+ .getDeviceConfig?.(endpoint.nodeId)
380
+ ?.getAssociationConfigForEndpoint(endpoint.index, groupId)
381
+ ?.maxNodes
382
+ ?? 0);
382
383
  }
383
- // Query each association group for its members
384
- await this.refreshValues(ctx);
385
- // Skip the remaining Association CC interview in favor of Multi Channel Association if possible
386
- if (endpoint.supportsCC(CommandClasses["Multi Channel Association"])) {
384
+ /**
385
+ * Returns all the destinations of all association groups reported by the node/endpoint.
386
+ * This only works AFTER the interview process
387
+ */
388
+ static getAllDestinationsCached(ctx, endpoint) {
389
+ const ret = new Map();
390
+ const groupCount = this.getGroupCountCached(ctx, endpoint);
391
+ const valueDB = ctx.getValueDB(endpoint.nodeId);
392
+ for (let i = 1; i <= groupCount; i++) {
393
+ // Add all root destinations
394
+ const nodes = valueDB.getValue(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
395
+ ret.set(i,
396
+ // Filter out duplicates
397
+ distinct(nodes).map((nodeId) => ({ nodeId })));
398
+ }
399
+ return ret;
400
+ }
401
+ async interview(ctx) {
402
+ const node = this.getNode(ctx);
403
+ const endpoint = this.getEndpoint(ctx);
404
+ const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
405
+ priority: MessagePriority.NodeQuery,
406
+ });
387
407
  ctx.logNode(node.id, {
388
408
  endpoint: this.endpointIndex,
389
- message: `${this.constructor.name}: delaying configuration of lifeline associations until after Multi Channel Association interview...`,
409
+ message: `Interviewing ${this.ccName}...`,
390
410
  direction: "none",
391
411
  });
392
- this.setInterviewComplete(ctx, true);
393
- return;
394
- }
395
- // And set up lifeline associations
396
- await ccUtils.configureLifelineAssociations(ctx, endpoint);
397
- // Remember that the interview is complete
398
- this.setInterviewComplete(ctx, true);
399
- }
400
- async refreshValues(ctx) {
401
- const node = this.getNode(ctx);
402
- const endpoint = this.getEndpoint(ctx);
403
- const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
404
- priority: MessagePriority.NodeQuery,
405
- });
406
- const groupCount = AssociationCC_1.getGroupCountCached(ctx, endpoint);
407
- // Query each association group
408
- for (let groupId = 1; groupId <= groupCount; groupId++) {
412
+ // Even if Multi Channel Association is supported, we still need to query the number of
413
+ // normal association groups since some devices report more association groups than
414
+ // multi channel association groups
415
+ // Find out how many groups are supported
409
416
  ctx.logNode(node.id, {
410
417
  endpoint: this.endpointIndex,
411
- message: `querying association group #${groupId}...`,
418
+ message: "querying number of association groups...",
412
419
  direction: "outbound",
413
420
  });
414
- const group = await api.getGroup(groupId);
415
- if (group != undefined) {
416
- const logMessage = `received information for association group #${groupId}:
417
- maximum # of nodes: ${group.maxNodes}
418
- currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
421
+ const groupCount = await api.getGroupCount();
422
+ if (groupCount != undefined) {
419
423
  ctx.logNode(node.id, {
420
424
  endpoint: this.endpointIndex,
421
- message: logMessage,
425
+ message: `supports ${groupCount} association groups`,
422
426
  direction: "inbound",
423
427
  });
424
428
  }
429
+ else {
430
+ ctx.logNode(node.id, {
431
+ endpoint: this.endpointIndex,
432
+ message: "Querying association groups timed out, skipping interview...",
433
+ level: "warn",
434
+ });
435
+ return;
436
+ }
437
+ // Query each association group for its members
438
+ await this.refreshValues(ctx);
439
+ // Skip the remaining Association CC interview in favor of Multi Channel Association if possible
440
+ if (endpoint.supportsCC(CommandClasses["Multi Channel Association"])) {
441
+ ctx.logNode(node.id, {
442
+ endpoint: this.endpointIndex,
443
+ message: `${this.constructor.name}: delaying configuration of lifeline associations until after Multi Channel Association interview...`,
444
+ direction: "none",
445
+ });
446
+ this.setInterviewComplete(ctx, true);
447
+ return;
448
+ }
449
+ // And set up lifeline associations
450
+ await ccUtils.configureLifelineAssociations(ctx, endpoint);
451
+ // Remember that the interview is complete
452
+ this.setInterviewComplete(ctx, true);
425
453
  }
426
- }
427
- };
428
- AssociationCC = AssociationCC_1 = __decorate([
429
- commandClass(CommandClasses.Association),
430
- implementedVersion(4),
431
- ccValues(AssociationCCValues)
432
- ], AssociationCC);
454
+ async refreshValues(ctx) {
455
+ const node = this.getNode(ctx);
456
+ const endpoint = this.getEndpoint(ctx);
457
+ const api = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
458
+ priority: MessagePriority.NodeQuery,
459
+ });
460
+ const groupCount = AssociationCC.getGroupCountCached(ctx, endpoint);
461
+ // Query each association group
462
+ for (let groupId = 1; groupId <= groupCount; groupId++) {
463
+ ctx.logNode(node.id, {
464
+ endpoint: this.endpointIndex,
465
+ message: `querying association group #${groupId}...`,
466
+ direction: "outbound",
467
+ });
468
+ const group = await api.getGroup(groupId);
469
+ if (group != undefined) {
470
+ const logMessage = `received information for association group #${groupId}:
471
+ maximum # of nodes: ${group.maxNodes}
472
+ currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
473
+ ctx.logNode(node.id, {
474
+ endpoint: this.endpointIndex,
475
+ message: logMessage,
476
+ direction: "inbound",
477
+ });
478
+ }
479
+ }
480
+ }
481
+ };
482
+ return AssociationCC = _classThis;
483
+ })();
433
484
  export { AssociationCC };
434
- let AssociationCCSet = AssociationCCSet_1 = class AssociationCCSet extends AssociationCC {
435
- constructor(options) {
436
- super(options);
437
- if (options.groupId < 1) {
438
- throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
485
+ let AssociationCCSet = (() => {
486
+ let _classDecorators = [CCCommand(AssociationCommand.Set), useSupervision()];
487
+ let _classDescriptor;
488
+ let _classExtraInitializers = [];
489
+ let _classThis;
490
+ let _classSuper = AssociationCC;
491
+ var AssociationCCSet = class extends _classSuper {
492
+ static { _classThis = this; }
493
+ static {
494
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
495
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
496
+ AssociationCCSet = _classThis = _classDescriptor.value;
497
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
498
+ __runInitializers(_classThis, _classExtraInitializers);
439
499
  }
440
- if (options.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {
441
- throw new ZWaveError(`All node IDs must be between 1 and ${MAX_NODES}!`, ZWaveErrorCodes.Argument_Invalid);
500
+ constructor(options) {
501
+ super(options);
502
+ if (options.groupId < 1) {
503
+ throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
504
+ }
505
+ if (options.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {
506
+ throw new ZWaveError(`All node IDs must be between 1 and ${MAX_NODES}!`, ZWaveErrorCodes.Argument_Invalid);
507
+ }
508
+ this.groupId = options.groupId;
509
+ this.nodeIds = options.nodeIds;
442
510
  }
443
- this.groupId = options.groupId;
444
- this.nodeIds = options.nodeIds;
445
- }
446
- static from(raw, ctx) {
447
- validatePayload(raw.payload.length >= 2);
448
- const groupId = raw.payload[0];
449
- const nodeIds = [...raw.payload.subarray(1)];
450
- return new AssociationCCSet_1({
451
- nodeId: ctx.sourceNodeId,
452
- groupId,
453
- nodeIds,
454
- });
455
- }
456
- groupId;
457
- nodeIds;
458
- serialize(ctx) {
459
- this.payload = Bytes.from([this.groupId, ...this.nodeIds]);
460
- return super.serialize(ctx);
461
- }
462
- toLogEntry(ctx) {
463
- const message = {
464
- "group id": this.groupId || "all groups",
465
- "node ids": this.nodeIds.length
466
- ? this.nodeIds.join(", ")
467
- : "all nodes",
468
- };
469
- return {
470
- ...super.toLogEntry(ctx),
471
- message,
472
- };
473
- }
474
- };
475
- AssociationCCSet = AssociationCCSet_1 = __decorate([
476
- CCCommand(AssociationCommand.Set),
477
- useSupervision()
478
- ], AssociationCCSet);
511
+ static from(raw, ctx) {
512
+ validatePayload(raw.payload.length >= 2);
513
+ const groupId = raw.payload[0];
514
+ const nodeIds = [...raw.payload.subarray(1)];
515
+ return new this({
516
+ nodeId: ctx.sourceNodeId,
517
+ groupId,
518
+ nodeIds,
519
+ });
520
+ }
521
+ groupId;
522
+ nodeIds;
523
+ serialize(ctx) {
524
+ this.payload = Bytes.from([this.groupId, ...this.nodeIds]);
525
+ return super.serialize(ctx);
526
+ }
527
+ toLogEntry(ctx) {
528
+ const message = {
529
+ "group id": this.groupId || "all groups",
530
+ "node ids": this.nodeIds.length
531
+ ? this.nodeIds.join(", ")
532
+ : "all nodes",
533
+ };
534
+ return {
535
+ ...super.toLogEntry(ctx),
536
+ message,
537
+ };
538
+ }
539
+ };
540
+ return AssociationCCSet = _classThis;
541
+ })();
479
542
  export { AssociationCCSet };
480
- let AssociationCCRemove = AssociationCCRemove_1 = class AssociationCCRemove extends AssociationCC {
481
- constructor(options) {
482
- super(options);
483
- // When removing associations, we allow invalid node IDs.
484
- // See GH#3606 - it is possible that those exist.
485
- this.groupId = options.groupId;
486
- this.nodeIds = options.nodeIds;
487
- }
488
- static from(raw, ctx) {
489
- validatePayload(raw.payload.length >= 1);
490
- let groupId;
491
- if (raw.payload[0] !== 0) {
492
- groupId = raw.payload[0];
493
- }
494
- const nodeIds = [...raw.payload.subarray(1)];
495
- return new AssociationCCRemove_1({
496
- nodeId: ctx.sourceNodeId,
497
- groupId,
498
- nodeIds,
499
- });
500
- }
501
- groupId;
502
- nodeIds;
503
- serialize(ctx) {
504
- this.payload = Bytes.from([
505
- this.groupId || 0,
506
- ...(this.nodeIds || []),
507
- ]);
508
- return super.serialize(ctx);
509
- }
510
- toLogEntry(ctx) {
511
- const message = {
512
- "group id": this.groupId || "all groups",
513
- "node ids": this.nodeIds && this.nodeIds.length
514
- ? this.nodeIds.join(", ")
515
- : "all nodes",
516
- };
517
- return {
518
- ...super.toLogEntry(ctx),
519
- message,
520
- };
521
- }
522
- };
523
- AssociationCCRemove = AssociationCCRemove_1 = __decorate([
524
- CCCommand(AssociationCommand.Remove),
525
- useSupervision()
526
- ], AssociationCCRemove);
543
+ let AssociationCCRemove = (() => {
544
+ let _classDecorators = [CCCommand(AssociationCommand.Remove), useSupervision()];
545
+ let _classDescriptor;
546
+ let _classExtraInitializers = [];
547
+ let _classThis;
548
+ let _classSuper = AssociationCC;
549
+ var AssociationCCRemove = class extends _classSuper {
550
+ static { _classThis = this; }
551
+ static {
552
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
553
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
554
+ AssociationCCRemove = _classThis = _classDescriptor.value;
555
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
556
+ __runInitializers(_classThis, _classExtraInitializers);
557
+ }
558
+ constructor(options) {
559
+ super(options);
560
+ // When removing associations, we allow invalid node IDs.
561
+ // See GH#3606 - it is possible that those exist.
562
+ this.groupId = options.groupId;
563
+ this.nodeIds = options.nodeIds;
564
+ }
565
+ static from(raw, ctx) {
566
+ validatePayload(raw.payload.length >= 1);
567
+ let groupId;
568
+ if (raw.payload[0] !== 0) {
569
+ groupId = raw.payload[0];
570
+ }
571
+ const nodeIds = [...raw.payload.subarray(1)];
572
+ return new this({
573
+ nodeId: ctx.sourceNodeId,
574
+ groupId,
575
+ nodeIds,
576
+ });
577
+ }
578
+ groupId;
579
+ nodeIds;
580
+ serialize(ctx) {
581
+ this.payload = Bytes.from([
582
+ this.groupId || 0,
583
+ ...(this.nodeIds || []),
584
+ ]);
585
+ return super.serialize(ctx);
586
+ }
587
+ toLogEntry(ctx) {
588
+ const message = {
589
+ "group id": this.groupId || "all groups",
590
+ "node ids": this.nodeIds && this.nodeIds.length
591
+ ? this.nodeIds.join(", ")
592
+ : "all nodes",
593
+ };
594
+ return {
595
+ ...super.toLogEntry(ctx),
596
+ message,
597
+ };
598
+ }
599
+ };
600
+ return AssociationCCRemove = _classThis;
601
+ })();
527
602
  export { AssociationCCRemove };
528
- let AssociationCCReport = AssociationCCReport_1 = class AssociationCCReport extends AssociationCC {
529
- constructor(options) {
530
- super(options);
531
- this.groupId = options.groupId;
532
- this.maxNodes = options.maxNodes;
533
- this.nodeIds = options.nodeIds;
534
- this.reportsToFollow = options.reportsToFollow;
535
- }
536
- static from(raw, ctx) {
537
- validatePayload(raw.payload.length >= 3);
538
- const groupId = raw.payload[0];
539
- const maxNodes = raw.payload[1];
540
- const reportsToFollow = raw.payload[2];
541
- const nodeIds = [...raw.payload.subarray(3)];
542
- return new AssociationCCReport_1({
543
- nodeId: ctx.sourceNodeId,
544
- groupId,
545
- maxNodes,
546
- reportsToFollow,
547
- nodeIds,
548
- });
549
- }
550
- groupId;
551
- maxNodes;
552
- nodeIds;
553
- reportsToFollow;
554
- getPartialCCSessionId() {
555
- // Distinguish sessions by the association group ID
556
- return { groupId: this.groupId };
557
- }
558
- expectMoreMessages() {
559
- return this.reportsToFollow > 0;
560
- }
561
- mergePartialCCs(partials, _ctx) {
562
- // Concat the list of nodes
563
- this.nodeIds = [...partials, this]
564
- .map((report) => report.nodeIds)
565
- .reduce((prev, cur) => prev.concat(...cur), []);
566
- }
567
- serialize(ctx) {
568
- this.payload = Bytes.from([
569
- this.groupId,
570
- this.maxNodes,
571
- this.reportsToFollow,
572
- ...this.nodeIds,
573
- ]);
574
- return super.serialize(ctx);
575
- }
576
- toLogEntry(ctx) {
577
- return {
578
- ...super.toLogEntry(ctx),
579
- message: {
580
- "group id": this.groupId,
581
- "max # of nodes": this.maxNodes,
582
- "node IDs": this.nodeIds.join(", "),
583
- "reports to follow": this.reportsToFollow,
584
- },
585
- };
586
- }
587
- };
588
- __decorate([
589
- ccValue(AssociationCCValues.maxNodes, (self) => [self.groupId])
590
- ], AssociationCCReport.prototype, "maxNodes", void 0);
591
- __decorate([
592
- ccValue(AssociationCCValues.nodeIds, (self) => [self.groupId])
593
- ], AssociationCCReport.prototype, "nodeIds", void 0);
594
- AssociationCCReport = AssociationCCReport_1 = __decorate([
595
- CCCommand(AssociationCommand.Report)
596
- ], AssociationCCReport);
603
+ let AssociationCCReport = (() => {
604
+ let _classDecorators = [CCCommand(AssociationCommand.Report), ccValueProperty("maxNodes", AssociationCCValues.maxNodes, (self) => [self.groupId]), ccValueProperty("nodeIds", AssociationCCValues.nodeIds, (self) => [self.groupId])];
605
+ let _classDescriptor;
606
+ let _classExtraInitializers = [];
607
+ let _classThis;
608
+ let _classSuper = AssociationCC;
609
+ var AssociationCCReport = class extends _classSuper {
610
+ static { _classThis = this; }
611
+ static {
612
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
613
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
614
+ AssociationCCReport = _classThis = _classDescriptor.value;
615
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
616
+ __runInitializers(_classThis, _classExtraInitializers);
617
+ }
618
+ constructor(options) {
619
+ super(options);
620
+ this.groupId = options.groupId;
621
+ this.maxNodes = options.maxNodes;
622
+ this.nodeIds = options.nodeIds;
623
+ this.reportsToFollow = options.reportsToFollow;
624
+ }
625
+ static from(raw, ctx) {
626
+ validatePayload(raw.payload.length >= 3);
627
+ const groupId = raw.payload[0];
628
+ const maxNodes = raw.payload[1];
629
+ const reportsToFollow = raw.payload[2];
630
+ const nodeIds = [...raw.payload.subarray(3)];
631
+ return new this({
632
+ nodeId: ctx.sourceNodeId,
633
+ groupId,
634
+ maxNodes,
635
+ reportsToFollow,
636
+ nodeIds,
637
+ });
638
+ }
639
+ groupId;
640
+ maxNodes;
641
+ nodeIds;
642
+ reportsToFollow;
643
+ getPartialCCSessionId() {
644
+ // Distinguish sessions by the association group ID
645
+ return { groupId: this.groupId };
646
+ }
647
+ expectMoreMessages() {
648
+ return this.reportsToFollow > 0;
649
+ }
650
+ mergePartialCCs(partials, _ctx) {
651
+ // Concat the list of nodes
652
+ this.nodeIds = [...partials, this]
653
+ .map((report) => report.nodeIds)
654
+ .reduce((prev, cur) => prev.concat(...cur), []);
655
+ }
656
+ serialize(ctx) {
657
+ this.payload = Bytes.from([
658
+ this.groupId,
659
+ this.maxNodes,
660
+ this.reportsToFollow,
661
+ ...this.nodeIds,
662
+ ]);
663
+ return super.serialize(ctx);
664
+ }
665
+ toLogEntry(ctx) {
666
+ return {
667
+ ...super.toLogEntry(ctx),
668
+ message: {
669
+ "group id": this.groupId,
670
+ "max # of nodes": this.maxNodes,
671
+ "node IDs": this.nodeIds.join(", "),
672
+ "reports to follow": this.reportsToFollow,
673
+ },
674
+ };
675
+ }
676
+ };
677
+ return AssociationCCReport = _classThis;
678
+ })();
597
679
  export { AssociationCCReport };
598
- let AssociationCCGet = AssociationCCGet_1 = class AssociationCCGet extends AssociationCC {
599
- constructor(options) {
600
- super(options);
601
- if (options.groupId < 1) {
602
- throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
680
+ let AssociationCCGet = (() => {
681
+ let _classDecorators = [CCCommand(AssociationCommand.Get), expectedCCResponse(AssociationCCReport)];
682
+ let _classDescriptor;
683
+ let _classExtraInitializers = [];
684
+ let _classThis;
685
+ let _classSuper = AssociationCC;
686
+ var AssociationCCGet = class extends _classSuper {
687
+ static { _classThis = this; }
688
+ static {
689
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
690
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
691
+ AssociationCCGet = _classThis = _classDescriptor.value;
692
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
693
+ __runInitializers(_classThis, _classExtraInitializers);
603
694
  }
604
- this.groupId = options.groupId;
605
- }
606
- static from(raw, ctx) {
607
- validatePayload(raw.payload.length >= 1);
608
- const groupId = raw.payload[0];
609
- return new AssociationCCGet_1({
610
- nodeId: ctx.sourceNodeId,
611
- groupId,
612
- });
613
- }
614
- groupId;
615
- serialize(ctx) {
616
- this.payload = Bytes.from([this.groupId]);
617
- return super.serialize(ctx);
618
- }
619
- toLogEntry(ctx) {
620
- return {
621
- ...super.toLogEntry(ctx),
622
- message: { "group id": this.groupId },
623
- };
624
- }
625
- };
626
- AssociationCCGet = AssociationCCGet_1 = __decorate([
627
- CCCommand(AssociationCommand.Get),
628
- expectedCCResponse(AssociationCCReport)
629
- ], AssociationCCGet);
695
+ constructor(options) {
696
+ super(options);
697
+ if (options.groupId < 1) {
698
+ throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
699
+ }
700
+ this.groupId = options.groupId;
701
+ }
702
+ static from(raw, ctx) {
703
+ validatePayload(raw.payload.length >= 1);
704
+ const groupId = raw.payload[0];
705
+ return new this({
706
+ nodeId: ctx.sourceNodeId,
707
+ groupId,
708
+ });
709
+ }
710
+ groupId;
711
+ serialize(ctx) {
712
+ this.payload = Bytes.from([this.groupId]);
713
+ return super.serialize(ctx);
714
+ }
715
+ toLogEntry(ctx) {
716
+ return {
717
+ ...super.toLogEntry(ctx),
718
+ message: { "group id": this.groupId },
719
+ };
720
+ }
721
+ };
722
+ return AssociationCCGet = _classThis;
723
+ })();
630
724
  export { AssociationCCGet };
631
- let AssociationCCSupportedGroupingsReport = AssociationCCSupportedGroupingsReport_1 = class AssociationCCSupportedGroupingsReport extends AssociationCC {
632
- constructor(options) {
633
- super(options);
634
- this.groupCount = options.groupCount;
635
- }
636
- static from(raw, ctx) {
637
- validatePayload(raw.payload.length >= 1);
638
- const groupCount = raw.payload[0];
639
- return new AssociationCCSupportedGroupingsReport_1({
640
- nodeId: ctx.sourceNodeId,
641
- groupCount,
642
- });
643
- }
644
- groupCount;
645
- serialize(ctx) {
646
- this.payload = Bytes.from([this.groupCount]);
647
- return super.serialize(ctx);
648
- }
649
- toLogEntry(ctx) {
650
- return {
651
- ...super.toLogEntry(ctx),
652
- message: { "group count": this.groupCount },
653
- };
654
- }
655
- };
656
- __decorate([
657
- ccValue(AssociationCCValues.groupCount)
658
- ], AssociationCCSupportedGroupingsReport.prototype, "groupCount", void 0);
659
- AssociationCCSupportedGroupingsReport = AssociationCCSupportedGroupingsReport_1 = __decorate([
660
- CCCommand(AssociationCommand.SupportedGroupingsReport)
661
- ], AssociationCCSupportedGroupingsReport);
725
+ let AssociationCCSupportedGroupingsReport = (() => {
726
+ let _classDecorators = [CCCommand(AssociationCommand.SupportedGroupingsReport), ccValueProperty("groupCount", AssociationCCValues.groupCount)];
727
+ let _classDescriptor;
728
+ let _classExtraInitializers = [];
729
+ let _classThis;
730
+ let _classSuper = AssociationCC;
731
+ var AssociationCCSupportedGroupingsReport = class extends _classSuper {
732
+ static { _classThis = this; }
733
+ static {
734
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
735
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
736
+ AssociationCCSupportedGroupingsReport = _classThis = _classDescriptor.value;
737
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
738
+ __runInitializers(_classThis, _classExtraInitializers);
739
+ }
740
+ constructor(options) {
741
+ super(options);
742
+ this.groupCount = options.groupCount;
743
+ }
744
+ static from(raw, ctx) {
745
+ validatePayload(raw.payload.length >= 1);
746
+ const groupCount = raw.payload[0];
747
+ return new this({
748
+ nodeId: ctx.sourceNodeId,
749
+ groupCount,
750
+ });
751
+ }
752
+ groupCount;
753
+ serialize(ctx) {
754
+ this.payload = Bytes.from([this.groupCount]);
755
+ return super.serialize(ctx);
756
+ }
757
+ toLogEntry(ctx) {
758
+ return {
759
+ ...super.toLogEntry(ctx),
760
+ message: { "group count": this.groupCount },
761
+ };
762
+ }
763
+ };
764
+ return AssociationCCSupportedGroupingsReport = _classThis;
765
+ })();
662
766
  export { AssociationCCSupportedGroupingsReport };
663
- let AssociationCCSupportedGroupingsGet = class AssociationCCSupportedGroupingsGet extends AssociationCC {
664
- };
665
- AssociationCCSupportedGroupingsGet = __decorate([
666
- CCCommand(AssociationCommand.SupportedGroupingsGet),
667
- expectedCCResponse(AssociationCCSupportedGroupingsReport)
668
- ], AssociationCCSupportedGroupingsGet);
767
+ let AssociationCCSupportedGroupingsGet = (() => {
768
+ let _classDecorators = [CCCommand(AssociationCommand.SupportedGroupingsGet), expectedCCResponse(AssociationCCSupportedGroupingsReport)];
769
+ let _classDescriptor;
770
+ let _classExtraInitializers = [];
771
+ let _classThis;
772
+ let _classSuper = AssociationCC;
773
+ var AssociationCCSupportedGroupingsGet = class extends _classSuper {
774
+ static { _classThis = this; }
775
+ static {
776
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
777
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
778
+ AssociationCCSupportedGroupingsGet = _classThis = _classDescriptor.value;
779
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
780
+ __runInitializers(_classThis, _classExtraInitializers);
781
+ }
782
+ };
783
+ return AssociationCCSupportedGroupingsGet = _classThis;
784
+ })();
669
785
  export { AssociationCCSupportedGroupingsGet };
670
- let AssociationCCSpecificGroupReport = AssociationCCSpecificGroupReport_1 = class AssociationCCSpecificGroupReport extends AssociationCC {
671
- constructor(options) {
672
- super(options);
673
- this.group = options.group;
674
- }
675
- static from(raw, ctx) {
676
- validatePayload(raw.payload.length >= 1);
677
- const group = raw.payload[0];
678
- return new AssociationCCSpecificGroupReport_1({
679
- nodeId: ctx.sourceNodeId,
680
- group,
681
- });
682
- }
683
- group;
684
- serialize(ctx) {
685
- this.payload = Bytes.from([this.group]);
686
- return super.serialize(ctx);
687
- }
688
- toLogEntry(ctx) {
689
- return {
690
- ...super.toLogEntry(ctx),
691
- message: { group: this.group },
692
- };
693
- }
694
- };
695
- AssociationCCSpecificGroupReport = AssociationCCSpecificGroupReport_1 = __decorate([
696
- CCCommand(AssociationCommand.SpecificGroupReport)
697
- ], AssociationCCSpecificGroupReport);
786
+ let AssociationCCSpecificGroupReport = (() => {
787
+ let _classDecorators = [CCCommand(AssociationCommand.SpecificGroupReport)];
788
+ let _classDescriptor;
789
+ let _classExtraInitializers = [];
790
+ let _classThis;
791
+ let _classSuper = AssociationCC;
792
+ var AssociationCCSpecificGroupReport = class extends _classSuper {
793
+ static { _classThis = this; }
794
+ static {
795
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
796
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
797
+ AssociationCCSpecificGroupReport = _classThis = _classDescriptor.value;
798
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
799
+ __runInitializers(_classThis, _classExtraInitializers);
800
+ }
801
+ constructor(options) {
802
+ super(options);
803
+ this.group = options.group;
804
+ }
805
+ static from(raw, ctx) {
806
+ validatePayload(raw.payload.length >= 1);
807
+ const group = raw.payload[0];
808
+ return new this({
809
+ nodeId: ctx.sourceNodeId,
810
+ group,
811
+ });
812
+ }
813
+ group;
814
+ serialize(ctx) {
815
+ this.payload = Bytes.from([this.group]);
816
+ return super.serialize(ctx);
817
+ }
818
+ toLogEntry(ctx) {
819
+ return {
820
+ ...super.toLogEntry(ctx),
821
+ message: { group: this.group },
822
+ };
823
+ }
824
+ };
825
+ return AssociationCCSpecificGroupReport = _classThis;
826
+ })();
698
827
  export { AssociationCCSpecificGroupReport };
699
- let AssociationCCSpecificGroupGet = class AssociationCCSpecificGroupGet extends AssociationCC {
700
- };
701
- AssociationCCSpecificGroupGet = __decorate([
702
- CCCommand(AssociationCommand.SpecificGroupGet),
703
- expectedCCResponse(AssociationCCSpecificGroupReport)
704
- ], AssociationCCSpecificGroupGet);
828
+ let AssociationCCSpecificGroupGet = (() => {
829
+ let _classDecorators = [CCCommand(AssociationCommand.SpecificGroupGet), expectedCCResponse(AssociationCCSpecificGroupReport)];
830
+ let _classDescriptor;
831
+ let _classExtraInitializers = [];
832
+ let _classThis;
833
+ let _classSuper = AssociationCC;
834
+ var AssociationCCSpecificGroupGet = class extends _classSuper {
835
+ static { _classThis = this; }
836
+ static {
837
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
838
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
839
+ AssociationCCSpecificGroupGet = _classThis = _classDescriptor.value;
840
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
841
+ __runInitializers(_classThis, _classExtraInitializers);
842
+ }
843
+ };
844
+ return AssociationCCSpecificGroupGet = _classThis;
845
+ })();
705
846
  export { AssociationCCSpecificGroupGet };
706
847
  //# sourceMappingURL=AssociationCC.js.map