@zwave-js/cc 13.10.1 → 14.0.0-beta.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 (293) hide show
  1. package/build/cc/AlarmSensorCC.d.ts +31 -20
  2. package/build/cc/AlarmSensorCC.d.ts.map +1 -1
  3. package/build/cc/AlarmSensorCC.js +106 -87
  4. package/build/cc/AlarmSensorCC.js.map +1 -1
  5. package/build/cc/AssociationCC.d.ts +38 -32
  6. package/build/cc/AssociationCC.d.ts.map +1 -1
  7. package/build/cc/AssociationCC.js +193 -176
  8. package/build/cc/AssociationCC.js.map +1 -1
  9. package/build/cc/AssociationGroupInfoCC.d.ts +42 -36
  10. package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  11. package/build/cc/AssociationGroupInfoCC.js +218 -200
  12. package/build/cc/AssociationGroupInfoCC.js.map +1 -1
  13. package/build/cc/BarrierOperatorCC.d.ts +41 -24
  14. package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
  15. package/build/cc/BarrierOperatorCC.js +143 -109
  16. package/build/cc/BarrierOperatorCC.js.map +1 -1
  17. package/build/cc/BasicCC.d.ts +22 -23
  18. package/build/cc/BasicCC.d.ts.map +1 -1
  19. package/build/cc/BasicCC.js +83 -77
  20. package/build/cc/BasicCC.js.map +1 -1
  21. package/build/cc/BatteryCC.d.ts +22 -14
  22. package/build/cc/BatteryCC.d.ts.map +1 -1
  23. package/build/cc/BatteryCC.js +116 -87
  24. package/build/cc/BatteryCC.js.map +1 -1
  25. package/build/cc/BinarySensorCC.d.ts +22 -19
  26. package/build/cc/BinarySensorCC.d.ts.map +1 -1
  27. package/build/cc/BinarySensorCC.js +103 -93
  28. package/build/cc/BinarySensorCC.js.map +1 -1
  29. package/build/cc/BinarySwitchCC.d.ts +20 -20
  30. package/build/cc/BinarySwitchCC.d.ts.map +1 -1
  31. package/build/cc/BinarySwitchCC.js +71 -59
  32. package/build/cc/BinarySwitchCC.js.map +1 -1
  33. package/build/cc/CRC16CC.d.ts +9 -9
  34. package/build/cc/CRC16CC.d.ts.map +1 -1
  35. package/build/cc/CRC16CC.js +36 -36
  36. package/build/cc/CRC16CC.js.map +1 -1
  37. package/build/cc/CentralSceneCC.d.ts +34 -16
  38. package/build/cc/CentralSceneCC.d.ts.map +1 -1
  39. package/build/cc/CentralSceneCC.js +116 -79
  40. package/build/cc/CentralSceneCC.js.map +1 -1
  41. package/build/cc/ClimateControlScheduleCC.d.ts +38 -21
  42. package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  43. package/build/cc/ClimateControlScheduleCC.js +113 -81
  44. package/build/cc/ClimateControlScheduleCC.js.map +1 -1
  45. package/build/cc/ClockCC.d.ts +18 -11
  46. package/build/cc/ClockCC.d.ts.map +1 -1
  47. package/build/cc/ClockCC.js +57 -43
  48. package/build/cc/ClockCC.js.map +1 -1
  49. package/build/cc/ColorSwitchCC.d.ts +37 -33
  50. package/build/cc/ColorSwitchCC.d.ts.map +1 -1
  51. package/build/cc/ColorSwitchCC.js +216 -189
  52. package/build/cc/ColorSwitchCC.js.map +1 -1
  53. package/build/cc/ConfigurationCC.d.ts +89 -74
  54. package/build/cc/ConfigurationCC.d.ts.map +1 -1
  55. package/build/cc/ConfigurationCC.js +541 -485
  56. package/build/cc/ConfigurationCC.js.map +1 -1
  57. package/build/cc/DeviceResetLocallyCC.d.ts +3 -3
  58. package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  59. package/build/cc/DeviceResetLocallyCC.js +14 -14
  60. package/build/cc/DeviceResetLocallyCC.js.map +1 -1
  61. package/build/cc/DoorLockCC.d.ts +66 -27
  62. package/build/cc/DoorLockCC.d.ts.map +1 -1
  63. package/build/cc/DoorLockCC.js +288 -197
  64. package/build/cc/DoorLockCC.js.map +1 -1
  65. package/build/cc/DoorLockLoggingCC.d.ts +23 -13
  66. package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
  67. package/build/cc/DoorLockLoggingCC.js +81 -63
  68. package/build/cc/DoorLockLoggingCC.js.map +1 -1
  69. package/build/cc/EnergyProductionCC.d.ts +16 -14
  70. package/build/cc/EnergyProductionCC.d.ts.map +1 -1
  71. package/build/cc/EnergyProductionCC.js +58 -52
  72. package/build/cc/EnergyProductionCC.js.map +1 -1
  73. package/build/cc/EntryControlCC.d.ts +44 -18
  74. package/build/cc/EntryControlCC.d.ts.map +1 -1
  75. package/build/cc/EntryControlCC.js +163 -112
  76. package/build/cc/EntryControlCC.js.map +1 -1
  77. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +69 -34
  78. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  79. package/build/cc/FirmwareUpdateMetaDataCC.js +311 -245
  80. package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  81. package/build/cc/HumidityControlModeCC.d.ts +24 -16
  82. package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
  83. package/build/cc/HumidityControlModeCC.js +80 -65
  84. package/build/cc/HumidityControlModeCC.js.map +1 -1
  85. package/build/cc/HumidityControlOperatingStateCC.d.ts +11 -7
  86. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  87. package/build/cc/HumidityControlOperatingStateCC.js +31 -22
  88. package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
  89. package/build/cc/HumidityControlSetpointCC.d.ts +68 -49
  90. package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  91. package/build/cc/HumidityControlSetpointCC.js +203 -181
  92. package/build/cc/HumidityControlSetpointCC.js.map +1 -1
  93. package/build/cc/InclusionControllerCC.d.ts +13 -11
  94. package/build/cc/InclusionControllerCC.d.ts.map +1 -1
  95. package/build/cc/InclusionControllerCC.js +49 -42
  96. package/build/cc/InclusionControllerCC.js.map +1 -1
  97. package/build/cc/IndicatorCC.d.ts +46 -39
  98. package/build/cc/IndicatorCC.d.ts.map +1 -1
  99. package/build/cc/IndicatorCC.js +298 -277
  100. package/build/cc/IndicatorCC.js.map +1 -1
  101. package/build/cc/IrrigationCC.d.ts +127 -57
  102. package/build/cc/IrrigationCC.d.ts.map +1 -1
  103. package/build/cc/IrrigationCC.js +496 -352
  104. package/build/cc/IrrigationCC.js.map +1 -1
  105. package/build/cc/LanguageCC.d.ts +17 -11
  106. package/build/cc/LanguageCC.d.ts.map +1 -1
  107. package/build/cc/LanguageCC.js +54 -44
  108. package/build/cc/LanguageCC.js.map +1 -1
  109. package/build/cc/LockCC.d.ts +16 -11
  110. package/build/cc/LockCC.d.ts.map +1 -1
  111. package/build/cc/LockCC.js +48 -38
  112. package/build/cc/LockCC.js.map +1 -1
  113. package/build/cc/ManufacturerProprietaryCC.d.ts +12 -11
  114. package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  115. package/build/cc/ManufacturerProprietaryCC.js +45 -50
  116. package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
  117. package/build/cc/ManufacturerSpecificCC.d.ts +20 -13
  118. package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  119. package/build/cc/ManufacturerSpecificCC.js +79 -63
  120. package/build/cc/ManufacturerSpecificCC.js.map +1 -1
  121. package/build/cc/MeterCC.d.ts +30 -26
  122. package/build/cc/MeterCC.d.ts.map +1 -1
  123. package/build/cc/MeterCC.js +236 -204
  124. package/build/cc/MeterCC.js.map +1 -1
  125. package/build/cc/MultiChannelAssociationCC.d.ts +31 -26
  126. package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  127. package/build/cc/MultiChannelAssociationCC.js +177 -168
  128. package/build/cc/MultiChannelAssociationCC.js.map +1 -1
  129. package/build/cc/MultiChannelCC.d.ts +70 -49
  130. package/build/cc/MultiChannelCC.d.ts.map +1 -1
  131. package/build/cc/MultiChannelCC.js +377 -318
  132. package/build/cc/MultiChannelCC.js.map +1 -1
  133. package/build/cc/MultiCommandCC.d.ts +9 -9
  134. package/build/cc/MultiCommandCC.d.ts.map +1 -1
  135. package/build/cc/MultiCommandCC.js +35 -36
  136. package/build/cc/MultiCommandCC.js.map +1 -1
  137. package/build/cc/MultilevelSensorCC.d.ts +38 -33
  138. package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
  139. package/build/cc/MultilevelSensorCC.js +172 -152
  140. package/build/cc/MultilevelSensorCC.js.map +1 -1
  141. package/build/cc/MultilevelSwitchCC.d.ts +29 -25
  142. package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
  143. package/build/cc/MultilevelSwitchCC.js +147 -127
  144. package/build/cc/MultilevelSwitchCC.js.map +1 -1
  145. package/build/cc/NoOperationCC.d.ts +0 -8
  146. package/build/cc/NoOperationCC.d.ts.map +1 -1
  147. package/build/cc/NoOperationCC.js +2 -11
  148. package/build/cc/NoOperationCC.js.map +1 -1
  149. package/build/cc/NodeNamingCC.d.ts +27 -17
  150. package/build/cc/NodeNamingCC.d.ts.map +1 -1
  151. package/build/cc/NodeNamingCC.js +86 -69
  152. package/build/cc/NodeNamingCC.js.map +1 -1
  153. package/build/cc/NotificationCC.d.ts +46 -43
  154. package/build/cc/NotificationCC.d.ts.map +1 -1
  155. package/build/cc/NotificationCC.js +317 -303
  156. package/build/cc/NotificationCC.js.map +1 -1
  157. package/build/cc/PowerlevelCC.d.ts +22 -18
  158. package/build/cc/PowerlevelCC.d.ts.map +1 -1
  159. package/build/cc/PowerlevelCC.js +125 -95
  160. package/build/cc/PowerlevelCC.js.map +1 -1
  161. package/build/cc/ProtectionCC.d.ts +49 -26
  162. package/build/cc/ProtectionCC.d.ts.map +1 -1
  163. package/build/cc/ProtectionCC.js +172 -126
  164. package/build/cc/ProtectionCC.js.map +1 -1
  165. package/build/cc/SceneActivationCC.d.ts +8 -7
  166. package/build/cc/SceneActivationCC.d.ts.map +1 -1
  167. package/build/cc/SceneActivationCC.js +28 -23
  168. package/build/cc/SceneActivationCC.js.map +1 -1
  169. package/build/cc/SceneActuatorConfigurationCC.d.ts +23 -15
  170. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  171. package/build/cc/SceneActuatorConfigurationCC.js +79 -62
  172. package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
  173. package/build/cc/SceneControllerConfigurationCC.d.ts +25 -17
  174. package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  175. package/build/cc/SceneControllerConfigurationCC.js +92 -78
  176. package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
  177. package/build/cc/ScheduleEntryLockCC.d.ts +86 -72
  178. package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  179. package/build/cc/ScheduleEntryLockCC.js +607 -455
  180. package/build/cc/ScheduleEntryLockCC.js.map +1 -1
  181. package/build/cc/Security2CC.d.ts +78 -87
  182. package/build/cc/Security2CC.d.ts.map +1 -1
  183. package/build/cc/Security2CC.js +798 -765
  184. package/build/cc/Security2CC.js.map +1 -1
  185. package/build/cc/SecurityCC.d.ts +47 -42
  186. package/build/cc/SecurityCC.d.ts.map +1 -1
  187. package/build/cc/SecurityCC.js +240 -218
  188. package/build/cc/SecurityCC.js.map +1 -1
  189. package/build/cc/SoundSwitchCC.d.ts +36 -29
  190. package/build/cc/SoundSwitchCC.d.ts.map +1 -1
  191. package/build/cc/SoundSwitchCC.js +180 -157
  192. package/build/cc/SoundSwitchCC.js.map +1 -1
  193. package/build/cc/SupervisionCC.d.ts +17 -14
  194. package/build/cc/SupervisionCC.d.ts.map +1 -1
  195. package/build/cc/SupervisionCC.js +86 -66
  196. package/build/cc/SupervisionCC.js.map +1 -1
  197. package/build/cc/ThermostatFanModeCC.d.ts +25 -15
  198. package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
  199. package/build/cc/ThermostatFanModeCC.js +79 -60
  200. package/build/cc/ThermostatFanModeCC.js.map +1 -1
  201. package/build/cc/ThermostatFanStateCC.d.ts +11 -7
  202. package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
  203. package/build/cc/ThermostatFanStateCC.js +31 -22
  204. package/build/cc/ThermostatFanStateCC.js.map +1 -1
  205. package/build/cc/ThermostatModeCC.d.ts +24 -21
  206. package/build/cc/ThermostatModeCC.d.ts.map +1 -1
  207. package/build/cc/ThermostatModeCC.js +106 -90
  208. package/build/cc/ThermostatModeCC.js.map +1 -1
  209. package/build/cc/ThermostatOperatingStateCC.d.ts +11 -7
  210. package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  211. package/build/cc/ThermostatOperatingStateCC.js +31 -22
  212. package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
  213. package/build/cc/ThermostatSetbackCC.d.ts +14 -13
  214. package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
  215. package/build/cc/ThermostatSetbackCC.js +64 -57
  216. package/build/cc/ThermostatSetbackCC.js.map +1 -1
  217. package/build/cc/ThermostatSetpointCC.d.ts +38 -57
  218. package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
  219. package/build/cc/ThermostatSetpointCC.js +200 -264
  220. package/build/cc/ThermostatSetpointCC.js.map +1 -1
  221. package/build/cc/TimeCC.d.ts +24 -20
  222. package/build/cc/TimeCC.d.ts.map +1 -1
  223. package/build/cc/TimeCC.js +119 -108
  224. package/build/cc/TimeCC.js.map +1 -1
  225. package/build/cc/TimeParametersCC.d.ts +18 -14
  226. package/build/cc/TimeParametersCC.d.ts.map +1 -1
  227. package/build/cc/TimeParametersCC.js +77 -69
  228. package/build/cc/TimeParametersCC.js.map +1 -1
  229. package/build/cc/TransportServiceCC.d.ts +29 -32
  230. package/build/cc/TransportServiceCC.d.ts.map +1 -1
  231. package/build/cc/TransportServiceCC.js +159 -161
  232. package/build/cc/TransportServiceCC.js.map +1 -1
  233. package/build/cc/UserCodeCC.d.ts +83 -66
  234. package/build/cc/UserCodeCC.d.ts.map +1 -1
  235. package/build/cc/UserCodeCC.js +449 -402
  236. package/build/cc/UserCodeCC.js.map +1 -1
  237. package/build/cc/VersionCC.d.ts +36 -20
  238. package/build/cc/VersionCC.d.ts.map +1 -1
  239. package/build/cc/VersionCC.js +190 -149
  240. package/build/cc/VersionCC.js.map +1 -1
  241. package/build/cc/WakeUpCC.d.ts +27 -13
  242. package/build/cc/WakeUpCC.d.ts.map +1 -1
  243. package/build/cc/WakeUpCC.js +105 -77
  244. package/build/cc/WakeUpCC.js.map +1 -1
  245. package/build/cc/WindowCoveringCC.d.ts +39 -27
  246. package/build/cc/WindowCoveringCC.d.ts.map +1 -1
  247. package/build/cc/WindowCoveringCC.js +169 -137
  248. package/build/cc/WindowCoveringCC.js.map +1 -1
  249. package/build/cc/ZWavePlusCC.d.ts +8 -7
  250. package/build/cc/ZWavePlusCC.d.ts.map +1 -1
  251. package/build/cc/ZWavePlusCC.js +44 -37
  252. package/build/cc/ZWavePlusCC.js.map +1 -1
  253. package/build/cc/ZWaveProtocolCC.d.ts +111 -84
  254. package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
  255. package/build/cc/ZWaveProtocolCC.js +583 -508
  256. package/build/cc/ZWaveProtocolCC.js.map +1 -1
  257. package/build/cc/index.d.ts +37 -34
  258. package/build/cc/index.d.ts.map +1 -1
  259. package/build/cc/index.js +6 -7
  260. package/build/cc/index.js.map +1 -1
  261. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +29 -24
  262. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  263. package/build/cc/manufacturerProprietary/FibaroCC.js +109 -112
  264. package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  265. package/build/index.d.ts +0 -1
  266. package/build/index.d.ts.map +1 -1
  267. package/build/index.js +0 -1
  268. package/build/index.js.map +1 -1
  269. package/build/lib/API.d.ts +21 -18
  270. package/build/lib/API.d.ts.map +1 -1
  271. package/build/lib/API.js +25 -49
  272. package/build/lib/API.js.map +1 -1
  273. package/build/lib/CommandClass.d.ts +51 -89
  274. package/build/lib/CommandClass.d.ts.map +1 -1
  275. package/build/lib/CommandClass.js +177 -249
  276. package/build/lib/CommandClass.js.map +1 -1
  277. package/build/lib/EncapsulatingCommandClass.d.ts +1 -15
  278. package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
  279. package/build/lib/EncapsulatingCommandClass.js.map +1 -1
  280. package/build/lib/ICommandClassContainer.d.ts +1 -8
  281. package/build/lib/ICommandClassContainer.d.ts.map +1 -1
  282. package/build/lib/ICommandClassContainer.js +0 -8
  283. package/build/lib/ICommandClassContainer.js.map +1 -1
  284. package/build/lib/Values.d.ts +3 -3
  285. package/build/lib/Values.d.ts.map +1 -1
  286. package/build/lib/_Types.d.ts.map +1 -1
  287. package/build/lib/_Types.js +1 -0
  288. package/build/lib/_Types.js.map +1 -1
  289. package/build/lib/utils.d.ts +14 -13
  290. package/build/lib/utils.d.ts.map +1 -1
  291. package/build/lib/utils.js +94 -92
  292. package/build/lib/utils.js.map +1 -1
  293. package/package.json +4 -5
@@ -28,6 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  __setModuleDefault(result, mod);
29
29
  return result;
30
30
  };
31
+ var MultiChannelAssociationCCSet_1, MultiChannelAssociationCCRemove_1, MultiChannelAssociationCCReport_1, MultiChannelAssociationCCGet_1, MultiChannelAssociationCCSupportedGroupingsReport_1;
31
32
  Object.defineProperty(exports, "__esModule", { value: true });
32
33
  exports.MultiChannelAssociationCCSupportedGroupingsGet = exports.MultiChannelAssociationCCSupportedGroupingsReport = exports.MultiChannelAssociationCCGet = exports.MultiChannelAssociationCCReport = exports.MultiChannelAssociationCCRemove = exports.MultiChannelAssociationCCSet = exports.MultiChannelAssociationCC = exports.MultiChannelAssociationCCAPI = exports.MultiChannelAssociationCCValues = void 0;
33
34
  function __assertType(argName, typeName, boundHasError) {
@@ -466,22 +467,22 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
466
467
  */
467
468
  async getGroupCount() {
468
469
  this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.SupportedGroupingsGet);
469
- const cc = new MultiChannelAssociationCCSupportedGroupingsGet(this.applHost, {
470
+ const cc = new MultiChannelAssociationCCSupportedGroupingsGet({
470
471
  nodeId: this.endpoint.nodeId,
471
- endpoint: this.endpoint.index,
472
+ endpointIndex: this.endpoint.index,
472
473
  });
473
- const response = await this.applHost.sendCommand(cc, this.commandOptions);
474
+ const response = await this.host.sendCommand(cc, this.commandOptions);
474
475
  return response?.groupCount;
475
476
  }
476
477
  async reportGroupCount(groupCount) {
477
478
  __assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
478
479
  this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.SupportedGroupingsReport);
479
- const cc = new MultiChannelAssociationCCSupportedGroupingsReport(this.applHost, {
480
+ const cc = new MultiChannelAssociationCCSupportedGroupingsReport({
480
481
  nodeId: this.endpoint.nodeId,
481
- endpoint: this.endpoint.index,
482
+ endpointIndex: this.endpoint.index,
482
483
  groupCount,
483
484
  });
484
- await this.applHost.sendCommand(cc, this.commandOptions);
485
+ await this.host.sendCommand(cc, this.commandOptions);
485
486
  }
486
487
  /**
487
488
  * Returns information about an association group.
@@ -489,12 +490,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
489
490
  async getGroup(groupId) {
490
491
  __assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
491
492
  this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Get);
492
- const cc = new MultiChannelAssociationCCGet(this.applHost, {
493
+ const cc = new MultiChannelAssociationCCGet({
493
494
  nodeId: this.endpoint.nodeId,
494
- endpoint: this.endpoint.index,
495
+ endpointIndex: this.endpoint.index,
495
496
  groupId,
496
497
  });
497
- const response = await this.applHost.sendCommand(cc, this.commandOptions);
498
+ const response = await this.host.sendCommand(cc, this.commandOptions);
498
499
  if (response) {
499
500
  return (0, safe_2.pick)(response, ["maxNodes", "nodeIds", "endpoints"]);
500
501
  }
@@ -502,12 +503,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
502
503
  async sendReport(options) {
503
504
  __assertType("options", "MultiChannelAssociationCCReportOptions", __assertType__MultiChannelAssociationCCReportOptions.bind(void 0, options));
504
505
  this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Report);
505
- const cc = new MultiChannelAssociationCCReport(this.applHost, {
506
+ const cc = new MultiChannelAssociationCCReport({
506
507
  nodeId: this.endpoint.nodeId,
507
- endpoint: this.endpoint.index,
508
+ endpointIndex: this.endpoint.index,
508
509
  ...options,
509
510
  });
510
- await this.applHost.sendCommand(cc, this.commandOptions);
511
+ await this.host.sendCommand(cc, this.commandOptions);
511
512
  }
512
513
  /**
513
514
  * Adds new nodes or endpoints to an association group
@@ -515,12 +516,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
515
516
  async addDestinations(options) {
516
517
  __assertType("options", "MultiChannelAssociationCCSetOptions", __assertType__MultiChannelAssociationCCSetOptions.bind(void 0, options));
517
518
  this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Set);
518
- const cc = new MultiChannelAssociationCCSet(this.applHost, {
519
+ const cc = new MultiChannelAssociationCCSet({
519
520
  nodeId: this.endpoint.nodeId,
520
- endpoint: this.endpoint.index,
521
+ endpointIndex: this.endpoint.index,
521
522
  ...options,
522
523
  });
523
- return this.applHost.sendCommand(cc, this.commandOptions);
524
+ return this.host.sendCommand(cc, this.commandOptions);
524
525
  }
525
526
  /**
526
527
  * Removes nodes or endpoints from an association group
@@ -532,11 +533,11 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
532
533
  // V1 does not support omitting the group, manually remove the destination from all groups
533
534
  // We don't want to do too much work, so find out which groups the destination is in
534
535
  const currentDestinations = MultiChannelAssociationCC
535
- .getAllDestinationsCached(this.applHost, this.endpoint);
536
+ .getAllDestinationsCached(this.host, this.endpoint);
536
537
  for (const [group, destinations] of currentDestinations) {
537
- const cc = new MultiChannelAssociationCCRemove(this.applHost, {
538
+ const cc = new MultiChannelAssociationCCRemove({
538
539
  nodeId: this.endpoint.nodeId,
539
- endpoint: this.endpoint.index,
540
+ endpointIndex: this.endpoint.index,
540
541
  groupId: group,
541
542
  nodeIds: destinations
542
543
  .filter((d) => d.endpoint != undefined)
@@ -544,16 +545,19 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
544
545
  endpoints: destinations.filter((d) => d.endpoint != undefined),
545
546
  });
546
547
  // TODO: evaluate intermediate supervision results
547
- await this.applHost.sendCommand(cc, this.commandOptions);
548
+ await this.host.sendCommand(cc, this.commandOptions);
548
549
  }
549
550
  }
551
+ else if (options.groupId && options.groupId < 0) {
552
+ throw new safe_1.ZWaveError("The group id must not be negative!", safe_1.ZWaveErrorCodes.Argument_Invalid);
553
+ }
550
554
  else {
551
- const cc = new MultiChannelAssociationCCRemove(this.applHost, {
555
+ const cc = new MultiChannelAssociationCCRemove({
552
556
  nodeId: this.endpoint.nodeId,
553
- endpoint: this.endpoint.index,
557
+ endpointIndex: this.endpoint.index,
554
558
  ...options,
555
559
  });
556
- return this.applHost.sendCommand(cc, this.commandOptions);
560
+ return this.host.sendCommand(cc, this.commandOptions);
557
561
  }
558
562
  }
559
563
  };
@@ -577,28 +581,28 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
577
581
  * Returns the number of association groups reported by the node/endpoint.
578
582
  * This only works AFTER the interview process
579
583
  */
580
- static getGroupCountCached(applHost, endpoint) {
581
- return (applHost
584
+ static getGroupCountCached(ctx, endpoint) {
585
+ return ctx
582
586
  .getValueDB(endpoint.nodeId)
583
- .getValue(exports.MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0);
587
+ .getValue(exports.MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
584
588
  }
585
589
  /**
586
590
  * Returns the number of nodes an association group supports.
587
591
  * This only works AFTER the interview process
588
592
  */
589
- static getMaxNodesCached(applHost, endpoint, groupId) {
590
- return (applHost
593
+ static getMaxNodesCached(ctx, endpoint, groupId) {
594
+ return ctx
591
595
  .getValueDB(endpoint.nodeId)
592
- .getValue(exports.MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0);
596
+ .getValue(exports.MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0;
593
597
  }
594
598
  /**
595
599
  * Returns all the destinations of all association groups reported by the node/endpoint.
596
600
  * This only works AFTER the interview process
597
601
  */
598
- static getAllDestinationsCached(applHost, endpoint) {
602
+ static getAllDestinationsCached(ctx, endpoint) {
599
603
  const ret = new Map();
600
- const groupCount = this.getGroupCountCached(applHost, endpoint);
601
- const valueDB = applHost.getValueDB(endpoint.nodeId);
604
+ const groupCount = this.getGroupCountCached(ctx, endpoint);
605
+ const valueDB = ctx.getValueDB(endpoint.nodeId);
602
606
  for (let i = 1; i <= groupCount; i++) {
603
607
  const groupDestinations = [];
604
608
  // Add all node destinations
@@ -628,31 +632,31 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
628
632
  }
629
633
  return ret;
630
634
  }
631
- async interview(applHost) {
632
- const node = this.getNode(applHost);
633
- const endpoint = this.getEndpoint(applHost);
634
- const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], applHost, endpoint);
635
- applHost.controllerLog.logNode(node.id, {
635
+ async interview(ctx) {
636
+ const node = this.getNode(ctx);
637
+ const endpoint = this.getEndpoint(ctx);
638
+ const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], ctx, endpoint);
639
+ ctx.logNode(node.id, {
636
640
  endpoint: this.endpointIndex,
637
641
  message: `Interviewing ${this.ccName}...`,
638
642
  direction: "none",
639
643
  });
640
644
  // First find out how many groups are supported as multi channel
641
- applHost.controllerLog.logNode(node.id, {
645
+ ctx.logNode(node.id, {
642
646
  endpoint: this.endpointIndex,
643
647
  message: "querying number of multi channel association groups...",
644
648
  direction: "outbound",
645
649
  });
646
650
  const mcGroupCount = await mcAPI.getGroupCount();
647
651
  if (mcGroupCount != undefined) {
648
- applHost.controllerLog.logNode(node.id, {
652
+ ctx.logNode(node.id, {
649
653
  endpoint: this.endpointIndex,
650
654
  message: `supports ${mcGroupCount} multi channel association groups`,
651
655
  direction: "inbound",
652
656
  });
653
657
  }
654
658
  else {
655
- applHost.controllerLog.logNode(node.id, {
659
+ ctx.logNode(node.id, {
656
660
  endpoint: this.endpointIndex,
657
661
  message: "Querying multi channel association groups timed out, skipping interview...",
658
662
  level: "warn",
@@ -660,28 +664,28 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
660
664
  return;
661
665
  }
662
666
  // Query each association group for its members
663
- await this.refreshValues(applHost);
667
+ await this.refreshValues(ctx);
664
668
  // And set up lifeline associations
665
- await ccUtils.configureLifelineAssociations(applHost, endpoint);
669
+ await ccUtils.configureLifelineAssociations(ctx, endpoint);
666
670
  // Remember that the interview is complete
667
- this.setInterviewComplete(applHost, true);
671
+ this.setInterviewComplete(ctx, true);
668
672
  }
669
- async refreshValues(applHost) {
670
- const node = this.getNode(applHost);
671
- const endpoint = this.getEndpoint(applHost);
672
- const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], applHost, endpoint).withOptions({
673
+ async refreshValues(ctx) {
674
+ const node = this.getNode(ctx);
675
+ const endpoint = this.getEndpoint(ctx);
676
+ const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], ctx, endpoint).withOptions({
673
677
  priority: safe_1.MessagePriority.NodeQuery,
674
678
  });
675
- const assocAPI = API_1.CCAPI.create(safe_1.CommandClasses.Association, applHost, endpoint).withOptions({
679
+ const assocAPI = API_1.CCAPI.create(safe_1.CommandClasses.Association, ctx, endpoint).withOptions({
676
680
  priority: safe_1.MessagePriority.NodeQuery,
677
681
  });
678
- const mcGroupCount = this.getValue(applHost, exports.MultiChannelAssociationCCValues.groupCount) ?? 0;
682
+ const mcGroupCount = this.getValue(ctx, exports.MultiChannelAssociationCCValues.groupCount) ?? 0;
679
683
  // Some devices report more association groups than multi channel association groups, so we need this info here
680
- const assocGroupCount = this.getValue(applHost, AssociationCC_1.AssociationCCValues.groupCount)
684
+ const assocGroupCount = this.getValue(ctx, AssociationCC_1.AssociationCCValues.groupCount)
681
685
  || mcGroupCount;
682
686
  // Then query each multi channel association group
683
687
  for (let groupId = 1; groupId <= mcGroupCount; groupId++) {
684
- applHost.controllerLog.logNode(node.id, {
688
+ ctx.logNode(node.id, {
685
689
  endpoint: this.endpointIndex,
686
690
  message: `querying multi channel association group #${groupId}...`,
687
691
  direction: "outbound",
@@ -702,7 +706,7 @@ currently assigned endpoints: ${group.endpoints
702
706
  }
703
707
  })
704
708
  .join("")}`;
705
- applHost.controllerLog.logNode(node.id, {
709
+ ctx.logNode(node.id, {
706
710
  endpoint: this.endpointIndex,
707
711
  message: logMessage,
708
712
  direction: "inbound",
@@ -710,13 +714,13 @@ currently assigned endpoints: ${group.endpoints
710
714
  }
711
715
  // Check if there are more non-multi-channel association groups we haven't queried yet
712
716
  if (assocAPI.isSupported() && assocGroupCount > mcGroupCount) {
713
- applHost.controllerLog.logNode(node.id, {
717
+ ctx.logNode(node.id, {
714
718
  endpoint: this.endpointIndex,
715
719
  message: `querying additional non-multi-channel association groups...`,
716
720
  direction: "outbound",
717
721
  });
718
722
  for (let groupId = mcGroupCount + 1; groupId <= assocGroupCount; groupId++) {
719
- applHost.controllerLog.logNode(node.id, {
723
+ ctx.logNode(node.id, {
720
724
  endpoint: this.endpointIndex,
721
725
  message: `querying association group #${groupId}...`,
722
726
  direction: "outbound",
@@ -727,7 +731,7 @@ currently assigned endpoints: ${group.endpoints
727
731
  const logMessage = `received information for association group #${groupId}:
728
732
  maximum # of nodes: ${group.maxNodes}
729
733
  currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
730
- applHost.controllerLog.logNode(node.id, {
734
+ ctx.logNode(node.id, {
731
735
  endpoint: this.endpointIndex,
732
736
  message: logMessage,
733
737
  direction: "inbound",
@@ -742,41 +746,44 @@ exports.MultiChannelAssociationCC = MultiChannelAssociationCC = __decorate([
742
746
  (0, CommandClassDecorators_1.implementedVersion)(5),
743
747
  (0, CommandClassDecorators_1.ccValues)(exports.MultiChannelAssociationCCValues)
744
748
  ], MultiChannelAssociationCC);
745
- let MultiChannelAssociationCCSet = class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {
746
- constructor(host, options) {
747
- super(host, options);
748
- if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
749
- (0, safe_1.validatePayload)(this.payload.length >= 1);
750
- this.groupId = this.payload[0];
751
- ({ nodeIds: this.nodeIds, endpoints: this.endpoints } =
752
- deserializeMultiChannelAssociationDestination(this.payload.subarray(1)));
753
- }
754
- else {
755
- if (options.groupId < 1) {
756
- throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
757
- }
758
- this.groupId = options.groupId;
759
- this.nodeIds = ("nodeIds" in options && options.nodeIds) || [];
760
- if (this.nodeIds.some((n) => n < 1 || n > safe_1.MAX_NODES)) {
761
- throw new safe_1.ZWaveError(`All node IDs must be between 1 and ${safe_1.MAX_NODES}!`, safe_1.ZWaveErrorCodes.Argument_Invalid);
762
- }
763
- this.endpoints = ("endpoints" in options && options.endpoints)
764
- || [];
765
- }
749
+ let MultiChannelAssociationCCSet = MultiChannelAssociationCCSet_1 = class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {
750
+ constructor(options) {
751
+ super(options);
752
+ if (options.groupId < 1) {
753
+ throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
754
+ }
755
+ this.groupId = options.groupId;
756
+ this.nodeIds = ("nodeIds" in options && options.nodeIds) || [];
757
+ if (this.nodeIds.some((n) => n < 1 || n > safe_1.MAX_NODES)) {
758
+ throw new safe_1.ZWaveError(`All node IDs must be between 1 and ${safe_1.MAX_NODES}!`, safe_1.ZWaveErrorCodes.Argument_Invalid);
759
+ }
760
+ this.endpoints = ("endpoints" in options && options.endpoints)
761
+ || [];
762
+ }
763
+ static from(raw, ctx) {
764
+ (0, safe_1.validatePayload)(raw.payload.length >= 1);
765
+ const groupId = raw.payload[0];
766
+ const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
767
+ return new MultiChannelAssociationCCSet_1({
768
+ nodeId: ctx.sourceNodeId,
769
+ groupId,
770
+ nodeIds,
771
+ endpoints,
772
+ });
766
773
  }
767
774
  groupId;
768
775
  nodeIds;
769
776
  endpoints;
770
- serialize() {
777
+ serialize(ctx) {
771
778
  this.payload = Buffer.concat([
772
779
  Buffer.from([this.groupId]),
773
780
  serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints),
774
781
  ]);
775
- return super.serialize();
782
+ return super.serialize(ctx);
776
783
  }
777
- toLogEntry(host) {
784
+ toLogEntry(ctx) {
778
785
  return {
779
- ...super.toLogEntry(host),
786
+ ...super.toLogEntry(ctx),
780
787
  message: {
781
788
  "group id": this.groupId,
782
789
  "node ids": this.nodeIds.join(", "),
@@ -786,48 +793,41 @@ let MultiChannelAssociationCCSet = class MultiChannelAssociationCCSet extends Mu
786
793
  }
787
794
  };
788
795
  exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet;
789
- exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet = __decorate([
796
+ exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet = MultiChannelAssociationCCSet_1 = __decorate([
790
797
  (0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Set),
791
798
  (0, CommandClassDecorators_1.useSupervision)()
792
799
  ], MultiChannelAssociationCCSet);
793
- let MultiChannelAssociationCCRemove = class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {
794
- constructor(host, options) {
795
- super(host, options);
796
- if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
797
- (0, safe_1.validatePayload)(this.payload.length >= 1);
798
- this.groupId = this.payload[0];
799
- ({ nodeIds: this.nodeIds, endpoints: this.endpoints } =
800
- deserializeMultiChannelAssociationDestination(this.payload.subarray(1)));
801
- }
802
- else {
803
- // Validate options
804
- if (!options.groupId) {
805
- if (this.version === 1) {
806
- throw new safe_1.ZWaveError(`Node ${this
807
- .nodeId} only supports MultiChannelAssociationCC V1 which requires the group Id to be set`, safe_1.ZWaveErrorCodes.Argument_Invalid);
808
- }
809
- }
810
- else if (options.groupId < 0) {
811
- throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
812
- }
813
- // When removing associations, we allow invalid node IDs.
814
- // See GH#3606 - it is possible that those exist.
815
- this.groupId = options.groupId;
816
- this.nodeIds = options.nodeIds;
817
- this.endpoints = options.endpoints;
818
- }
800
+ let MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove_1 = class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {
801
+ constructor(options) {
802
+ super(options);
803
+ // When removing associations, we allow invalid node IDs.
804
+ // See GH#3606 - it is possible that those exist.
805
+ this.groupId = options.groupId;
806
+ this.nodeIds = options.nodeIds;
807
+ this.endpoints = options.endpoints;
808
+ }
809
+ static from(raw, ctx) {
810
+ (0, safe_1.validatePayload)(raw.payload.length >= 1);
811
+ const groupId = raw.payload[0];
812
+ const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
813
+ return new MultiChannelAssociationCCRemove_1({
814
+ nodeId: ctx.sourceNodeId,
815
+ groupId,
816
+ nodeIds,
817
+ endpoints,
818
+ });
819
819
  }
820
820
  groupId;
821
821
  nodeIds;
822
822
  endpoints;
823
- serialize() {
823
+ serialize(ctx) {
824
824
  this.payload = Buffer.concat([
825
825
  Buffer.from([this.groupId || 0]),
826
826
  serializeMultiChannelAssociationDestination(this.nodeIds || [], this.endpoints || []),
827
827
  ]);
828
- return super.serialize();
828
+ return super.serialize(ctx);
829
829
  }
830
- toLogEntry(host) {
830
+ toLogEntry(ctx) {
831
831
  const message = {
832
832
  "group id": this.groupId || "(all groups)",
833
833
  };
@@ -838,34 +838,39 @@ let MultiChannelAssociationCCRemove = class MultiChannelAssociationCCRemove exte
838
838
  message.endpoints = endpointAddressesToString(this.endpoints);
839
839
  }
840
840
  return {
841
- ...super.toLogEntry(host),
841
+ ...super.toLogEntry(ctx),
842
842
  message,
843
843
  };
844
844
  }
845
845
  };
846
846
  exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove;
847
- exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove = __decorate([
847
+ exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove_1 = __decorate([
848
848
  (0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Remove),
849
849
  (0, CommandClassDecorators_1.useSupervision)()
850
850
  ], MultiChannelAssociationCCRemove);
851
- let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {
852
- constructor(host, options) {
853
- super(host, options);
854
- if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
855
- (0, safe_1.validatePayload)(this.payload.length >= 3);
856
- this.groupId = this.payload[0];
857
- this.maxNodes = this.payload[1];
858
- this.reportsToFollow = this.payload[2];
859
- ({ nodeIds: this.nodeIds, endpoints: this.endpoints } =
860
- deserializeMultiChannelAssociationDestination(this.payload.subarray(3)));
861
- }
862
- else {
863
- this.groupId = options.groupId;
864
- this.maxNodes = options.maxNodes;
865
- this.nodeIds = options.nodeIds;
866
- this.endpoints = options.endpoints;
867
- this.reportsToFollow = options.reportsToFollow;
868
- }
851
+ let MultiChannelAssociationCCReport = MultiChannelAssociationCCReport_1 = class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {
852
+ constructor(options) {
853
+ super(options);
854
+ this.groupId = options.groupId;
855
+ this.maxNodes = options.maxNodes;
856
+ this.nodeIds = options.nodeIds;
857
+ this.endpoints = options.endpoints;
858
+ this.reportsToFollow = options.reportsToFollow;
859
+ }
860
+ static from(raw, ctx) {
861
+ (0, safe_1.validatePayload)(raw.payload.length >= 3);
862
+ const groupId = raw.payload[0];
863
+ const maxNodes = raw.payload[1];
864
+ const reportsToFollow = raw.payload[2];
865
+ const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(3));
866
+ return new MultiChannelAssociationCCReport_1({
867
+ nodeId: ctx.sourceNodeId,
868
+ groupId,
869
+ maxNodes,
870
+ nodeIds,
871
+ endpoints,
872
+ reportsToFollow,
873
+ });
869
874
  }
870
875
  groupId;
871
876
  maxNodes;
@@ -879,7 +884,7 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
879
884
  expectMoreMessages() {
880
885
  return this.reportsToFollow > 0;
881
886
  }
882
- mergePartialCCs(applHost, partials) {
887
+ mergePartialCCs(partials, _ctx) {
883
888
  // Concat the list of nodes
884
889
  this.nodeIds = [...partials, this]
885
890
  .map((report) => [...report.nodeIds])
@@ -889,7 +894,7 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
889
894
  .map((report) => [...report.endpoints])
890
895
  .reduce((prev, cur) => prev.concat(...cur), []);
891
896
  }
892
- serialize() {
897
+ serialize(ctx) {
893
898
  const destinations = serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints);
894
899
  this.payload = Buffer.concat([
895
900
  Buffer.from([
@@ -899,11 +904,11 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
899
904
  ]),
900
905
  destinations,
901
906
  ]);
902
- return super.serialize();
907
+ return super.serialize(ctx);
903
908
  }
904
- toLogEntry(host) {
909
+ toLogEntry(ctx) {
905
910
  return {
906
- ...super.toLogEntry(host),
911
+ ...super.toLogEntry(ctx),
907
912
  message: {
908
913
  "group id": this.groupId,
909
914
  "maximum # of nodes": this.maxNodes,
@@ -923,59 +928,63 @@ __decorate([
923
928
  __decorate([
924
929
  (0, CommandClassDecorators_1.ccValue)(exports.MultiChannelAssociationCCValues.endpoints, (self) => [self.groupId])
925
930
  ], MultiChannelAssociationCCReport.prototype, "endpoints", void 0);
926
- exports.MultiChannelAssociationCCReport = MultiChannelAssociationCCReport = __decorate([
931
+ exports.MultiChannelAssociationCCReport = MultiChannelAssociationCCReport = MultiChannelAssociationCCReport_1 = __decorate([
927
932
  (0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Report)
928
933
  ], MultiChannelAssociationCCReport);
929
- let MultiChannelAssociationCCGet = class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {
930
- constructor(host, options) {
931
- super(host, options);
932
- if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
933
- (0, safe_1.validatePayload)(this.payload.length >= 1);
934
- this.groupId = this.payload[0];
935
- }
936
- else {
937
- if (options.groupId < 1) {
938
- throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
939
- }
940
- this.groupId = options.groupId;
941
- }
934
+ let MultiChannelAssociationCCGet = MultiChannelAssociationCCGet_1 = class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {
935
+ constructor(options) {
936
+ super(options);
937
+ if (options.groupId < 1) {
938
+ throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
939
+ }
940
+ this.groupId = options.groupId;
941
+ }
942
+ static from(raw, ctx) {
943
+ (0, safe_1.validatePayload)(raw.payload.length >= 1);
944
+ const groupId = raw.payload[0];
945
+ return new MultiChannelAssociationCCGet_1({
946
+ nodeId: ctx.sourceNodeId,
947
+ groupId,
948
+ });
942
949
  }
943
950
  groupId;
944
- serialize() {
951
+ serialize(ctx) {
945
952
  this.payload = Buffer.from([this.groupId]);
946
- return super.serialize();
953
+ return super.serialize(ctx);
947
954
  }
948
- toLogEntry(host) {
955
+ toLogEntry(ctx) {
949
956
  return {
950
- ...super.toLogEntry(host),
957
+ ...super.toLogEntry(ctx),
951
958
  message: { "group id": this.groupId },
952
959
  };
953
960
  }
954
961
  };
955
962
  exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet;
956
- exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet = __decorate([
963
+ exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet = MultiChannelAssociationCCGet_1 = __decorate([
957
964
  (0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Get),
958
965
  (0, CommandClassDecorators_1.expectedCCResponse)(MultiChannelAssociationCCReport)
959
966
  ], MultiChannelAssociationCCGet);
960
- let MultiChannelAssociationCCSupportedGroupingsReport = class MultiChannelAssociationCCSupportedGroupingsReport extends MultiChannelAssociationCC {
961
- constructor(host, options) {
962
- super(host, options);
963
- if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
964
- (0, safe_1.validatePayload)(this.payload.length >= 1);
965
- this.groupCount = this.payload[0];
966
- }
967
- else {
968
- this.groupCount = options.groupCount;
969
- }
967
+ let MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport_1 = class MultiChannelAssociationCCSupportedGroupingsReport extends MultiChannelAssociationCC {
968
+ constructor(options) {
969
+ super(options);
970
+ this.groupCount = options.groupCount;
971
+ }
972
+ static from(raw, ctx) {
973
+ (0, safe_1.validatePayload)(raw.payload.length >= 1);
974
+ const groupCount = raw.payload[0];
975
+ return new MultiChannelAssociationCCSupportedGroupingsReport_1({
976
+ nodeId: ctx.sourceNodeId,
977
+ groupCount,
978
+ });
970
979
  }
971
980
  groupCount;
972
- serialize() {
981
+ serialize(ctx) {
973
982
  this.payload = Buffer.from([this.groupCount]);
974
- return super.serialize();
983
+ return super.serialize(ctx);
975
984
  }
976
- toLogEntry(host) {
985
+ toLogEntry(ctx) {
977
986
  return {
978
- ...super.toLogEntry(host),
987
+ ...super.toLogEntry(ctx),
979
988
  message: { "group count": this.groupCount },
980
989
  };
981
990
  }
@@ -984,7 +993,7 @@ exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociat
984
993
  __decorate([
985
994
  (0, CommandClassDecorators_1.ccValue)(exports.MultiChannelAssociationCCValues.groupCount)
986
995
  ], MultiChannelAssociationCCSupportedGroupingsReport.prototype, "groupCount", void 0);
987
- exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport = __decorate([
996
+ exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport_1 = __decorate([
988
997
  (0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.SupportedGroupingsReport)
989
998
  ], MultiChannelAssociationCCSupportedGroupingsReport);
990
999
  let MultiChannelAssociationCCSupportedGroupingsGet = class MultiChannelAssociationCCSupportedGroupingsGet extends MultiChannelAssociationCC {