zwave-js 9.2.1 → 9.3.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 (524) hide show
  1. package/build/Controller.d.ts +2 -2
  2. package/build/Controller.d.ts.map +1 -1
  3. package/build/Controller.js +1 -1
  4. package/build/Controller.js.map +1 -1
  5. package/build/Driver.d.ts +3 -4
  6. package/build/Driver.d.ts.map +1 -1
  7. package/build/Driver.js +6 -7
  8. package/build/Driver.js.map +1 -1
  9. package/build/Utils.d.ts +2 -0
  10. package/build/Utils.d.ts.map +1 -1
  11. package/build/Utils.js +5 -1
  12. package/build/Utils.js.map +1 -1
  13. package/build/lib/commandclass/AlarmSensorCC.d.ts +6 -5
  14. package/build/lib/commandclass/AlarmSensorCC.d.ts.map +1 -1
  15. package/build/lib/commandclass/AlarmSensorCC.js +23 -23
  16. package/build/lib/commandclass/AlarmSensorCC.js.map +1 -1
  17. package/build/lib/commandclass/AssociationCC.d.ts +12 -11
  18. package/build/lib/commandclass/AssociationCC.d.ts.map +1 -1
  19. package/build/lib/commandclass/AssociationCC.js +47 -41
  20. package/build/lib/commandclass/AssociationCC.js.map +1 -1
  21. package/build/lib/commandclass/AssociationGroupInfoCC.d.ts +15 -14
  22. package/build/lib/commandclass/AssociationGroupInfoCC.d.ts.map +1 -1
  23. package/build/lib/commandclass/AssociationGroupInfoCC.js +56 -51
  24. package/build/lib/commandclass/AssociationGroupInfoCC.js.map +1 -1
  25. package/build/lib/commandclass/BarrierOperatorCC.d.ts +9 -8
  26. package/build/lib/commandclass/BarrierOperatorCC.d.ts.map +1 -1
  27. package/build/lib/commandclass/BarrierOperatorCC.js +28 -28
  28. package/build/lib/commandclass/BarrierOperatorCC.js.map +1 -1
  29. package/build/lib/commandclass/BasicCC.d.ts +5 -4
  30. package/build/lib/commandclass/BasicCC.d.ts.map +1 -1
  31. package/build/lib/commandclass/BasicCC.js +18 -18
  32. package/build/lib/commandclass/BasicCC.js.map +1 -1
  33. package/build/lib/commandclass/BatteryCC.d.ts +5 -4
  34. package/build/lib/commandclass/BatteryCC.d.ts.map +1 -1
  35. package/build/lib/commandclass/BatteryCC.js +17 -17
  36. package/build/lib/commandclass/BatteryCC.js.map +1 -1
  37. package/build/lib/commandclass/BinarySensorCC.d.ts +6 -5
  38. package/build/lib/commandclass/BinarySensorCC.d.ts.map +1 -1
  39. package/build/lib/commandclass/BinarySensorCC.js +24 -24
  40. package/build/lib/commandclass/BinarySensorCC.js.map +1 -1
  41. package/build/lib/commandclass/BinarySwitchCC.d.ts +5 -4
  42. package/build/lib/commandclass/BinarySwitchCC.d.ts.map +1 -1
  43. package/build/lib/commandclass/BinarySwitchCC.js +15 -15
  44. package/build/lib/commandclass/BinarySwitchCC.js.map +1 -1
  45. package/build/lib/commandclass/CRC16CC.d.ts +3 -3
  46. package/build/lib/commandclass/CRC16CC.d.ts.map +1 -1
  47. package/build/lib/commandclass/CRC16CC.js +5 -5
  48. package/build/lib/commandclass/CRC16CC.js.map +1 -1
  49. package/build/lib/commandclass/CentralSceneCC.d.ts +6 -5
  50. package/build/lib/commandclass/CentralSceneCC.d.ts.map +1 -1
  51. package/build/lib/commandclass/CentralSceneCC.js +23 -25
  52. package/build/lib/commandclass/CentralSceneCC.js.map +1 -1
  53. package/build/lib/commandclass/ClimateControlScheduleCC.d.ts +7 -7
  54. package/build/lib/commandclass/ClimateControlScheduleCC.d.ts.map +1 -1
  55. package/build/lib/commandclass/ClimateControlScheduleCC.js +12 -12
  56. package/build/lib/commandclass/ClimateControlScheduleCC.js.map +1 -1
  57. package/build/lib/commandclass/ClockCC.d.ts +5 -4
  58. package/build/lib/commandclass/ClockCC.d.ts.map +1 -1
  59. package/build/lib/commandclass/ClockCC.js +15 -15
  60. package/build/lib/commandclass/ClockCC.js.map +1 -1
  61. package/build/lib/commandclass/ColorSwitchCC.d.ts +10 -9
  62. package/build/lib/commandclass/ColorSwitchCC.d.ts.map +1 -1
  63. package/build/lib/commandclass/ColorSwitchCC.js +29 -29
  64. package/build/lib/commandclass/ColorSwitchCC.js.map +1 -1
  65. package/build/lib/commandclass/CommandClass.d.ts +17 -10
  66. package/build/lib/commandclass/CommandClass.d.ts.map +1 -1
  67. package/build/lib/commandclass/CommandClass.js +53 -27
  68. package/build/lib/commandclass/CommandClass.js.map +1 -1
  69. package/build/lib/commandclass/ConfigurationCC.d.ts +16 -15
  70. package/build/lib/commandclass/ConfigurationCC.d.ts.map +1 -1
  71. package/build/lib/commandclass/ConfigurationCC.js +66 -59
  72. package/build/lib/commandclass/ConfigurationCC.js.map +1 -1
  73. package/build/lib/commandclass/DoorLockCC.d.ts +8 -7
  74. package/build/lib/commandclass/DoorLockCC.d.ts.map +1 -1
  75. package/build/lib/commandclass/DoorLockCC.js +27 -27
  76. package/build/lib/commandclass/DoorLockCC.js.map +1 -1
  77. package/build/lib/commandclass/DoorLockLoggingCC.d.ts +6 -5
  78. package/build/lib/commandclass/DoorLockLoggingCC.d.ts.map +1 -1
  79. package/build/lib/commandclass/DoorLockLoggingCC.js +18 -18
  80. package/build/lib/commandclass/DoorLockLoggingCC.js.map +1 -1
  81. package/build/lib/commandclass/EntryControlCC.d.ts +8 -7
  82. package/build/lib/commandclass/EntryControlCC.d.ts.map +1 -1
  83. package/build/lib/commandclass/EntryControlCC.js +27 -27
  84. package/build/lib/commandclass/EntryControlCC.js.map +1 -1
  85. package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts +11 -11
  86. package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  87. package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js +20 -20
  88. package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js.map +1 -1
  89. package/build/lib/commandclass/HumidityControlModeCC.d.ts +6 -5
  90. package/build/lib/commandclass/HumidityControlModeCC.d.ts.map +1 -1
  91. package/build/lib/commandclass/HumidityControlModeCC.js +22 -22
  92. package/build/lib/commandclass/HumidityControlModeCC.js.map +1 -1
  93. package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts +4 -3
  94. package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts.map +1 -1
  95. package/build/lib/commandclass/HumidityControlOperatingStateCC.js +13 -13
  96. package/build/lib/commandclass/HumidityControlOperatingStateCC.js.map +1 -1
  97. package/build/lib/commandclass/HumidityControlSetpointCC.d.ts +11 -10
  98. package/build/lib/commandclass/HumidityControlSetpointCC.d.ts.map +1 -1
  99. package/build/lib/commandclass/HumidityControlSetpointCC.js +46 -46
  100. package/build/lib/commandclass/HumidityControlSetpointCC.js.map +1 -1
  101. package/build/lib/commandclass/IndicatorCC.d.ts +9 -8
  102. package/build/lib/commandclass/IndicatorCC.d.ts.map +1 -1
  103. package/build/lib/commandclass/IndicatorCC.js +37 -37
  104. package/build/lib/commandclass/IndicatorCC.js.map +1 -1
  105. package/build/lib/commandclass/IrrigationCC.d.ts +18 -17
  106. package/build/lib/commandclass/IrrigationCC.d.ts.map +1 -1
  107. package/build/lib/commandclass/IrrigationCC.js +51 -51
  108. package/build/lib/commandclass/IrrigationCC.js.map +1 -1
  109. package/build/lib/commandclass/LanguageCC.d.ts +5 -4
  110. package/build/lib/commandclass/LanguageCC.d.ts.map +1 -1
  111. package/build/lib/commandclass/LanguageCC.js +15 -15
  112. package/build/lib/commandclass/LanguageCC.js.map +1 -1
  113. package/build/lib/commandclass/LockCC.d.ts +5 -4
  114. package/build/lib/commandclass/LockCC.d.ts.map +1 -1
  115. package/build/lib/commandclass/LockCC.js +15 -15
  116. package/build/lib/commandclass/LockCC.js.map +1 -1
  117. package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts +11 -3
  118. package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts.map +1 -1
  119. package/build/lib/commandclass/ManufacturerProprietaryCC.js +44 -18
  120. package/build/lib/commandclass/ManufacturerProprietaryCC.js.map +1 -1
  121. package/build/lib/commandclass/ManufacturerSpecificCC.d.ts +5 -4
  122. package/build/lib/commandclass/ManufacturerSpecificCC.d.ts.map +1 -1
  123. package/build/lib/commandclass/ManufacturerSpecificCC.js +15 -15
  124. package/build/lib/commandclass/ManufacturerSpecificCC.js.map +1 -1
  125. package/build/lib/commandclass/MeterCC.d.ts +8 -7
  126. package/build/lib/commandclass/MeterCC.d.ts.map +1 -1
  127. package/build/lib/commandclass/MeterCC.js +49 -41
  128. package/build/lib/commandclass/MeterCC.js.map +1 -1
  129. package/build/lib/commandclass/MultiChannelAssociationCC.d.ts +12 -11
  130. package/build/lib/commandclass/MultiChannelAssociationCC.d.ts.map +1 -1
  131. package/build/lib/commandclass/MultiChannelAssociationCC.js +45 -43
  132. package/build/lib/commandclass/MultiChannelAssociationCC.js.map +1 -1
  133. package/build/lib/commandclass/MultiChannelCC.d.ts +15 -14
  134. package/build/lib/commandclass/MultiChannelCC.d.ts.map +1 -1
  135. package/build/lib/commandclass/MultiChannelCC.js +61 -61
  136. package/build/lib/commandclass/MultiChannelCC.js.map +1 -1
  137. package/build/lib/commandclass/MultiCommandCC.d.ts +3 -3
  138. package/build/lib/commandclass/MultiCommandCC.d.ts.map +1 -1
  139. package/build/lib/commandclass/MultiCommandCC.js +5 -5
  140. package/build/lib/commandclass/MultiCommandCC.js.map +1 -1
  141. package/build/lib/commandclass/MultilevelSensorCC.d.ts +8 -7
  142. package/build/lib/commandclass/MultilevelSensorCC.d.ts.map +1 -1
  143. package/build/lib/commandclass/MultilevelSensorCC.js +50 -50
  144. package/build/lib/commandclass/MultilevelSensorCC.js.map +1 -1
  145. package/build/lib/commandclass/MultilevelSwitchCC.d.ts +8 -7
  146. package/build/lib/commandclass/MultilevelSwitchCC.d.ts.map +1 -1
  147. package/build/lib/commandclass/MultilevelSwitchCC.js +31 -31
  148. package/build/lib/commandclass/MultilevelSwitchCC.js.map +1 -1
  149. package/build/lib/commandclass/NoOperationCC.d.ts +1 -1
  150. package/build/lib/commandclass/NoOperationCC.d.ts.map +1 -1
  151. package/build/lib/commandclass/NoOperationCC.js +2 -2
  152. package/build/lib/commandclass/NoOperationCC.js.map +1 -1
  153. package/build/lib/commandclass/NodeNamingCC.d.ts +7 -6
  154. package/build/lib/commandclass/NodeNamingCC.d.ts.map +1 -1
  155. package/build/lib/commandclass/NodeNamingCC.js +21 -21
  156. package/build/lib/commandclass/NodeNamingCC.js.map +1 -1
  157. package/build/lib/commandclass/NotificationCC.d.ts +10 -9
  158. package/build/lib/commandclass/NotificationCC.d.ts.map +1 -1
  159. package/build/lib/commandclass/NotificationCC.js +54 -54
  160. package/build/lib/commandclass/NotificationCC.js.map +1 -1
  161. package/build/lib/commandclass/PowerlevelCC.d.ts +5 -5
  162. package/build/lib/commandclass/PowerlevelCC.d.ts.map +1 -1
  163. package/build/lib/commandclass/PowerlevelCC.js +9 -9
  164. package/build/lib/commandclass/PowerlevelCC.js.map +1 -1
  165. package/build/lib/commandclass/ProtectionCC.d.ts +10 -9
  166. package/build/lib/commandclass/ProtectionCC.d.ts.map +1 -1
  167. package/build/lib/commandclass/ProtectionCC.js +33 -33
  168. package/build/lib/commandclass/ProtectionCC.js.map +1 -1
  169. package/build/lib/commandclass/SceneActivationCC.d.ts +2 -2
  170. package/build/lib/commandclass/SceneActivationCC.d.ts.map +1 -1
  171. package/build/lib/commandclass/SceneActivationCC.js +2 -2
  172. package/build/lib/commandclass/SceneActivationCC.js.map +1 -1
  173. package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts +5 -4
  174. package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts.map +1 -1
  175. package/build/lib/commandclass/SceneActuatorConfigurationCC.js +9 -9
  176. package/build/lib/commandclass/SceneActuatorConfigurationCC.js.map +1 -1
  177. package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts +7 -6
  178. package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts.map +1 -1
  179. package/build/lib/commandclass/SceneControllerConfigurationCC.js +32 -28
  180. package/build/lib/commandclass/SceneControllerConfigurationCC.js.map +1 -1
  181. package/build/lib/commandclass/Security2CC.d.ts +17 -26
  182. package/build/lib/commandclass/Security2CC.d.ts.map +1 -1
  183. package/build/lib/commandclass/Security2CC.js +68 -68
  184. package/build/lib/commandclass/Security2CC.js.map +1 -1
  185. package/build/lib/commandclass/SecurityCC.d.ts +11 -14
  186. package/build/lib/commandclass/SecurityCC.d.ts.map +1 -1
  187. package/build/lib/commandclass/SecurityCC.js +41 -41
  188. package/build/lib/commandclass/SecurityCC.js.map +1 -1
  189. package/build/lib/commandclass/SoundSwitchCC.d.ts +9 -8
  190. package/build/lib/commandclass/SoundSwitchCC.d.ts.map +1 -1
  191. package/build/lib/commandclass/SoundSwitchCC.js +27 -27
  192. package/build/lib/commandclass/SoundSwitchCC.js.map +1 -1
  193. package/build/lib/commandclass/SupervisionCC.d.ts +4 -4
  194. package/build/lib/commandclass/SupervisionCC.d.ts.map +1 -1
  195. package/build/lib/commandclass/SupervisionCC.js +9 -9
  196. package/build/lib/commandclass/SupervisionCC.js.map +1 -1
  197. package/build/lib/commandclass/ThermostatFanModeCC.d.ts +6 -5
  198. package/build/lib/commandclass/ThermostatFanModeCC.d.ts.map +1 -1
  199. package/build/lib/commandclass/ThermostatFanModeCC.js +22 -22
  200. package/build/lib/commandclass/ThermostatFanModeCC.js.map +1 -1
  201. package/build/lib/commandclass/ThermostatFanStateCC.d.ts +4 -3
  202. package/build/lib/commandclass/ThermostatFanStateCC.d.ts.map +1 -1
  203. package/build/lib/commandclass/ThermostatFanStateCC.js +13 -13
  204. package/build/lib/commandclass/ThermostatFanStateCC.js.map +1 -1
  205. package/build/lib/commandclass/ThermostatModeCC.d.ts +6 -5
  206. package/build/lib/commandclass/ThermostatModeCC.d.ts.map +1 -1
  207. package/build/lib/commandclass/ThermostatModeCC.js +22 -22
  208. package/build/lib/commandclass/ThermostatModeCC.js.map +1 -1
  209. package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts +4 -3
  210. package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts.map +1 -1
  211. package/build/lib/commandclass/ThermostatOperatingStateCC.js +13 -13
  212. package/build/lib/commandclass/ThermostatOperatingStateCC.js.map +1 -1
  213. package/build/lib/commandclass/ThermostatSetbackCC.d.ts +5 -4
  214. package/build/lib/commandclass/ThermostatSetbackCC.d.ts.map +1 -1
  215. package/build/lib/commandclass/ThermostatSetbackCC.js +15 -15
  216. package/build/lib/commandclass/ThermostatSetbackCC.js.map +1 -1
  217. package/build/lib/commandclass/ThermostatSetpointCC.d.ts +10 -9
  218. package/build/lib/commandclass/ThermostatSetpointCC.d.ts.map +1 -1
  219. package/build/lib/commandclass/ThermostatSetpointCC.js +48 -48
  220. package/build/lib/commandclass/ThermostatSetpointCC.js.map +1 -1
  221. package/build/lib/commandclass/TimeCC.d.ts +6 -5
  222. package/build/lib/commandclass/TimeCC.d.ts.map +1 -1
  223. package/build/lib/commandclass/TimeCC.js +15 -15
  224. package/build/lib/commandclass/TimeCC.js.map +1 -1
  225. package/build/lib/commandclass/TimeParametersCC.d.ts +4 -3
  226. package/build/lib/commandclass/TimeParametersCC.d.ts.map +1 -1
  227. package/build/lib/commandclass/TimeParametersCC.js +11 -11
  228. package/build/lib/commandclass/TimeParametersCC.js.map +1 -1
  229. package/build/lib/commandclass/TransportServiceCC.d.ts +7 -7
  230. package/build/lib/commandclass/TransportServiceCC.d.ts.map +1 -1
  231. package/build/lib/commandclass/TransportServiceCC.js +12 -12
  232. package/build/lib/commandclass/TransportServiceCC.js.map +1 -1
  233. package/build/lib/commandclass/UserCodeCC.d.ts +17 -16
  234. package/build/lib/commandclass/UserCodeCC.d.ts.map +1 -1
  235. package/build/lib/commandclass/UserCodeCC.js +58 -58
  236. package/build/lib/commandclass/UserCodeCC.js.map +1 -1
  237. package/build/lib/commandclass/VersionCC.d.ts +7 -6
  238. package/build/lib/commandclass/VersionCC.d.ts.map +1 -1
  239. package/build/lib/commandclass/VersionCC.js +28 -28
  240. package/build/lib/commandclass/VersionCC.js.map +1 -1
  241. package/build/lib/commandclass/WakeUpCC.d.ts +5 -5
  242. package/build/lib/commandclass/WakeUpCC.d.ts.map +1 -1
  243. package/build/lib/commandclass/WakeUpCC.js +24 -28
  244. package/build/lib/commandclass/WakeUpCC.js.map +1 -1
  245. package/build/lib/commandclass/ZWavePlusCC.d.ts +20 -14
  246. package/build/lib/commandclass/ZWavePlusCC.d.ts.map +1 -1
  247. package/build/lib/commandclass/ZWavePlusCC.js +119 -41
  248. package/build/lib/commandclass/ZWavePlusCC.js.map +1 -1
  249. package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts +8 -7
  250. package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts.map +1 -1
  251. package/build/lib/commandclass/manufacturerProprietary/Fibaro.js +21 -21
  252. package/build/lib/commandclass/manufacturerProprietary/Fibaro.js.map +1 -1
  253. package/build/lib/controller/Controller.d.ts +21 -14
  254. package/build/lib/controller/Controller.d.ts.map +1 -1
  255. package/build/lib/controller/Controller.js +129 -140
  256. package/build/lib/controller/Controller.js.map +1 -1
  257. package/build/lib/controller/Inclusion.d.ts +1 -1
  258. package/build/lib/controller/Inclusion.d.ts.map +1 -1
  259. package/build/lib/controller/MockControllerBehaviors.d.ts +4 -0
  260. package/build/lib/controller/MockControllerBehaviors.d.ts.map +1 -0
  261. package/build/lib/controller/MockControllerBehaviors.js +161 -0
  262. package/build/lib/controller/MockControllerBehaviors.js.map +1 -0
  263. package/build/lib/controller/NodeInformationFrame.d.ts +9 -0
  264. package/build/lib/controller/NodeInformationFrame.d.ts.map +1 -0
  265. package/build/lib/controller/NodeInformationFrame.js +53 -0
  266. package/build/lib/controller/NodeInformationFrame.js.map +1 -0
  267. package/build/lib/controller/ZWaveChipTypes.d.ts +10 -0
  268. package/build/lib/controller/ZWaveChipTypes.d.ts.map +1 -0
  269. package/build/lib/controller/ZWaveChipTypes.js +32 -0
  270. package/build/lib/controller/ZWaveChipTypes.js.map +1 -0
  271. package/build/lib/controller/utils.d.ts +3 -0
  272. package/build/lib/controller/utils.d.ts.map +1 -0
  273. package/build/lib/controller/utils.js +40 -0
  274. package/build/lib/controller/utils.js.map +1 -0
  275. package/build/lib/driver/CommandQueueMachine.d.ts +1 -1
  276. package/build/lib/driver/CommandQueueMachine.d.ts.map +1 -1
  277. package/build/lib/driver/CommandQueueMachine.js.map +1 -1
  278. package/build/lib/driver/Driver.d.ts +7 -4
  279. package/build/lib/driver/Driver.d.ts.map +1 -1
  280. package/build/lib/driver/Driver.js +89 -67
  281. package/build/lib/driver/Driver.js.map +1 -1
  282. package/build/lib/driver/DriverMock.d.ts +13 -0
  283. package/build/lib/driver/DriverMock.d.ts.map +1 -0
  284. package/build/lib/driver/DriverMock.js +53 -0
  285. package/build/lib/driver/DriverMock.js.map +1 -0
  286. package/build/lib/driver/MessageGenerators.d.ts +1 -1
  287. package/build/lib/driver/MessageGenerators.d.ts.map +1 -1
  288. package/build/lib/driver/MessageGenerators.js.map +1 -1
  289. package/build/lib/driver/NetworkCache.d.ts +1 -1
  290. package/build/lib/driver/NetworkCache.d.ts.map +1 -1
  291. package/build/lib/driver/NetworkCache.js +80 -38
  292. package/build/lib/driver/NetworkCache.js.map +1 -1
  293. package/build/lib/driver/SendThreadMachine.d.ts +2 -2
  294. package/build/lib/driver/SendThreadMachine.d.ts.map +1 -1
  295. package/build/lib/driver/SendThreadMachine.js +4 -4
  296. package/build/lib/driver/SendThreadMachine.js.map +1 -1
  297. package/build/lib/driver/SerialAPICommandMachine.d.ts +1 -1
  298. package/build/lib/driver/SerialAPICommandMachine.d.ts.map +1 -1
  299. package/build/lib/driver/SerialAPICommandMachine.js +6 -7
  300. package/build/lib/driver/SerialAPICommandMachine.js.map +1 -1
  301. package/build/lib/driver/StateMachineShared.d.ts +1 -1
  302. package/build/lib/driver/StateMachineShared.d.ts.map +1 -1
  303. package/build/lib/driver/StateMachineShared.js.map +1 -1
  304. package/build/lib/driver/Transaction.d.ts +2 -2
  305. package/build/lib/driver/Transaction.d.ts.map +1 -1
  306. package/build/lib/driver/Transaction.js +5 -5
  307. package/build/lib/driver/Transaction.js.map +1 -1
  308. package/build/lib/driver/TransactionMachine.d.ts +1 -1
  309. package/build/lib/driver/TransactionMachine.d.ts.map +1 -1
  310. package/build/lib/driver/TransactionMachine.js.map +1 -1
  311. package/build/lib/driver/ZWaveOptions.d.ts +1 -1
  312. package/build/lib/driver/ZWaveOptions.d.ts.map +1 -1
  313. package/build/lib/log/Driver.d.ts +1 -1
  314. package/build/lib/log/Driver.d.ts.map +1 -1
  315. package/build/lib/log/Driver.js +4 -4
  316. package/build/lib/log/Driver.js.map +1 -1
  317. package/build/lib/node/Endpoint.d.ts +3 -2
  318. package/build/lib/node/Endpoint.d.ts.map +1 -1
  319. package/build/lib/node/Endpoint.js +32 -31
  320. package/build/lib/node/Endpoint.js.map +1 -1
  321. package/build/lib/node/Node.d.ts +4 -13
  322. package/build/lib/node/Node.d.ts.map +1 -1
  323. package/build/lib/node/Node.js +64 -150
  324. package/build/lib/node/Node.js.map +1 -1
  325. package/build/lib/node/_Types.d.ts +2 -30
  326. package/build/lib/node/_Types.d.ts.map +1 -1
  327. package/build/lib/node/_Types.js +3 -33
  328. package/build/lib/node/_Types.js.map +1 -1
  329. package/build/lib/node/utils.d.ts +28 -0
  330. package/build/lib/node/utils.d.ts.map +1 -0
  331. package/build/lib/node/utils.js +187 -0
  332. package/build/lib/node/utils.js.map +1 -0
  333. package/build/lib/serialapi/_Types.d.ts +1 -14
  334. package/build/lib/serialapi/_Types.d.ts.map +1 -1
  335. package/build/lib/serialapi/_Types.js +2 -15
  336. package/build/lib/serialapi/_Types.js.map +1 -1
  337. package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts +4 -3
  338. package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts.map +1 -1
  339. package/build/lib/serialapi/application/ApplicationCommandRequest.js +15 -14
  340. package/build/lib/serialapi/application/ApplicationCommandRequest.js.map +1 -1
  341. package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts +6 -6
  342. package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts.map +1 -1
  343. package/build/lib/serialapi/application/ApplicationUpdateRequest.js +10 -11
  344. package/build/lib/serialapi/application/ApplicationUpdateRequest.js.map +1 -1
  345. package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts +4 -3
  346. package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts.map +1 -1
  347. package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js +14 -9
  348. package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js.map +1 -1
  349. package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts +23 -11
  350. package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts.map +1 -1
  351. package/build/lib/serialapi/application/SerialAPIStartedRequest.js +59 -36
  352. package/build/lib/serialapi/application/SerialAPIStartedRequest.js.map +1 -1
  353. package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts +17 -11
  354. package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts.map +1 -1
  355. package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js +40 -34
  356. package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js.map +1 -1
  357. package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts +11 -9
  358. package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts.map +1 -1
  359. package/build/lib/serialapi/capability/GetControllerVersionMessages.js +24 -24
  360. package/build/lib/serialapi/capability/GetControllerVersionMessages.js.map +1 -1
  361. package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts +3 -3
  362. package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts.map +1 -1
  363. package/build/lib/serialapi/capability/GetProtocolVersionMessages.js +9 -10
  364. package/build/lib/serialapi/capability/GetProtocolVersionMessages.js.map +1 -1
  365. package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts +17 -16
  366. package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts.map +1 -1
  367. package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js +39 -42
  368. package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js.map +1 -1
  369. package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts +26 -14
  370. package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts.map +1 -1
  371. package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js +138 -51
  372. package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js.map +1 -1
  373. package/build/lib/serialapi/capability/HardResetRequest.d.ts +12 -2
  374. package/build/lib/serialapi/capability/HardResetRequest.d.ts.map +1 -1
  375. package/build/lib/serialapi/capability/HardResetRequest.js +41 -11
  376. package/build/lib/serialapi/capability/HardResetRequest.js.map +1 -1
  377. package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts +22 -22
  378. package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts.map +1 -1
  379. package/build/lib/serialapi/capability/SerialAPISetupMessages.js +50 -51
  380. package/build/lib/serialapi/capability/SerialAPISetupMessages.js.map +1 -1
  381. package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts +22 -0
  382. package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts.map +1 -0
  383. package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js +60 -0
  384. package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js.map +1 -0
  385. package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts +13 -9
  386. package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts.map +1 -1
  387. package/build/lib/serialapi/memory/GetControllerIdMessages.js +31 -23
  388. package/build/lib/serialapi/memory/GetControllerIdMessages.js.map +1 -1
  389. package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts +3 -3
  390. package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts.map +1 -1
  391. package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js +9 -10
  392. package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js.map +1 -1
  393. package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts +5 -5
  394. package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts.map +1 -1
  395. package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js +12 -13
  396. package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js.map +1 -1
  397. package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts +4 -4
  398. package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts.map +1 -1
  399. package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js +11 -12
  400. package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js.map +1 -1
  401. package/build/lib/serialapi/misc/SoftResetRequest.d.ts +1 -1
  402. package/build/lib/serialapi/misc/SoftResetRequest.d.ts.map +1 -1
  403. package/build/lib/serialapi/misc/SoftResetRequest.js +4 -5
  404. package/build/lib/serialapi/misc/SoftResetRequest.js.map +1 -1
  405. package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts +8 -8
  406. package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts.map +1 -1
  407. package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js +17 -18
  408. package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js.map +1 -1
  409. package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts +7 -8
  410. package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts.map +1 -1
  411. package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js +19 -20
  412. package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js.map +1 -1
  413. package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts +7 -8
  414. package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts.map +1 -1
  415. package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js +19 -20
  416. package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js.map +1 -1
  417. package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts +7 -8
  418. package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts.map +1 -1
  419. package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js +19 -20
  420. package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js.map +1 -1
  421. package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts +7 -8
  422. package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts.map +1 -1
  423. package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js +19 -20
  424. package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js.map +1 -1
  425. package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts +20 -18
  426. package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts.map +1 -1
  427. package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js +72 -26
  428. package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js.map +1 -1
  429. package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts +4 -4
  430. package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts.map +1 -1
  431. package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js +11 -12
  432. package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js.map +1 -1
  433. package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts +9 -7
  434. package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts.map +1 -1
  435. package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js +18 -19
  436. package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js.map +1 -1
  437. package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts +4 -4
  438. package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts.map +1 -1
  439. package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js +11 -12
  440. package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js.map +1 -1
  441. package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts +7 -7
  442. package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts.map +1 -1
  443. package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js +18 -19
  444. package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js.map +1 -1
  445. package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts +6 -6
  446. package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts.map +1 -1
  447. package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js +13 -14
  448. package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js.map +1 -1
  449. package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts +7 -7
  450. package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts.map +1 -1
  451. package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js +17 -18
  452. package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js.map +1 -1
  453. package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts +5 -6
  454. package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts.map +1 -1
  455. package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js +12 -13
  456. package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js.map +1 -1
  457. package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts +6 -6
  458. package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts.map +1 -1
  459. package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js +14 -15
  460. package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js.map +1 -1
  461. package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts +7 -7
  462. package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts.map +1 -1
  463. package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js +21 -22
  464. package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js.map +1 -1
  465. package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts +4 -4
  466. package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts.map +1 -1
  467. package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js +12 -13
  468. package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js.map +1 -1
  469. package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts +4 -4
  470. package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts.map +1 -1
  471. package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js +12 -13
  472. package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js.map +1 -1
  473. package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts +4 -4
  474. package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts.map +1 -1
  475. package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js +12 -13
  476. package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js.map +1 -1
  477. package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts +4 -4
  478. package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts.map +1 -1
  479. package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js +12 -13
  480. package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js.map +1 -1
  481. package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts +3 -3
  482. package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts.map +1 -1
  483. package/build/lib/serialapi/nvm/GetNVMIdMessages.js +9 -10
  484. package/build/lib/serialapi/nvm/GetNVMIdMessages.js.map +1 -1
  485. package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts +8 -8
  486. package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts.map +1 -1
  487. package/build/lib/serialapi/nvm/NVMOperationsMessages.js +19 -20
  488. package/build/lib/serialapi/nvm/NVMOperationsMessages.js.map +1 -1
  489. package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts +13 -11
  490. package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts.map +1 -1
  491. package/build/lib/serialapi/transport/SendDataBridgeMessages.js +48 -44
  492. package/build/lib/serialapi/transport/SendDataBridgeMessages.js.map +1 -1
  493. package/build/lib/serialapi/transport/SendDataMessages.d.ts +13 -11
  494. package/build/lib/serialapi/transport/SendDataMessages.d.ts.map +1 -1
  495. package/build/lib/serialapi/transport/SendDataMessages.js +49 -43
  496. package/build/lib/serialapi/transport/SendDataMessages.js.map +1 -1
  497. package/build/lib/telemetry/deviceConfig.d.ts.map +1 -1
  498. package/build/lib/telemetry/deviceConfig.js +2 -3
  499. package/build/lib/telemetry/deviceConfig.js.map +1 -1
  500. package/package.json +9 -8
  501. package/build/lib/driver/FileSystem.d.ts +0 -11
  502. package/build/lib/driver/FileSystem.d.ts.map +0 -1
  503. package/build/lib/driver/FileSystem.js +0 -3
  504. package/build/lib/driver/FileSystem.js.map +0 -1
  505. package/build/lib/log/Controller.d.ts +0 -68
  506. package/build/lib/log/Controller.d.ts.map +0 -1
  507. package/build/lib/log/Controller.js +0 -221
  508. package/build/lib/log/Controller.js.map +0 -1
  509. package/build/lib/message/Constants.d.ts +0 -150
  510. package/build/lib/message/Constants.d.ts.map +0 -1
  511. package/build/lib/message/Constants.js +0 -176
  512. package/build/lib/message/Constants.js.map +0 -1
  513. package/build/lib/message/Message.d.ts +0 -172
  514. package/build/lib/message/Message.d.ts.map +0 -1
  515. package/build/lib/message/Message.js +0 -465
  516. package/build/lib/message/Message.js.map +0 -1
  517. package/build/lib/message/SuccessIndicator.d.ts +0 -16
  518. package/build/lib/message/SuccessIndicator.d.ts.map +0 -1
  519. package/build/lib/message/SuccessIndicator.js +0 -12
  520. package/build/lib/message/SuccessIndicator.js.map +0 -1
  521. package/build/lib/node/INodeQuery.d.ts +0 -7
  522. package/build/lib/node/INodeQuery.d.ts.map +0 -1
  523. package/build/lib/node/INodeQuery.js +0 -9
  524. package/build/lib/node/INodeQuery.js.map +0 -1
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ZWaveController = void 0;
13
13
  const core_1 = require("@zwave-js/core");
14
14
  const nvmedit_1 = require("@zwave-js/nvmedit");
15
+ const serial_1 = require("@zwave-js/serial");
15
16
  const shared_1 = require("@zwave-js/shared");
16
17
  const arrays_1 = require("alcalzone-shared/arrays");
17
18
  const async_1 = require("alcalzone-shared/async");
@@ -20,11 +21,13 @@ const crypto_1 = __importDefault(require("crypto"));
20
21
  const semver_1 = __importDefault(require("semver"));
21
22
  const util_1 = __importDefault(require("util"));
22
23
  const commandclass_1 = require("../commandclass");
24
+ const AssociationCC_1 = require("../commandclass/AssociationCC");
25
+ const AssociationGroupInfoCC_1 = require("../commandclass/AssociationGroupInfoCC");
23
26
  const ManufacturerSpecificCC_1 = require("../commandclass/ManufacturerSpecificCC");
27
+ const MultiChannelAssociationCC_1 = require("../commandclass/MultiChannelAssociationCC");
24
28
  const shared_2 = require("../commandclass/Security2/shared");
25
29
  const VersionCC_1 = require("../commandclass/VersionCC");
26
30
  const NetworkCache_1 = require("../driver/NetworkCache");
27
- const Constants_1 = require("../message/Constants");
28
31
  const DeviceClass_1 = require("../node/DeviceClass");
29
32
  const Node_1 = require("../node/Node");
30
33
  const VirtualNode_1 = require("../node/VirtualNode");
@@ -36,6 +39,7 @@ const GetSerialApiCapabilitiesMessages_1 = require("../serialapi/capability/GetS
36
39
  const GetSerialApiInitDataMessages_1 = require("../serialapi/capability/GetSerialApiInitDataMessages");
37
40
  const HardResetRequest_1 = require("../serialapi/capability/HardResetRequest");
38
41
  const SerialAPISetupMessages_1 = require("../serialapi/capability/SerialAPISetupMessages");
42
+ const SetApplicationNodeInformationRequest_1 = require("../serialapi/capability/SetApplicationNodeInformationRequest");
39
43
  const GetControllerIdMessages_1 = require("../serialapi/memory/GetControllerIdMessages");
40
44
  const GetBackgroundRSSIMessages_1 = require("../serialapi/misc/GetBackgroundRSSIMessages");
41
45
  const SetRFReceiveModeMessages_1 = require("../serialapi/misc/SetRFReceiveModeMessages");
@@ -63,6 +67,8 @@ const _Types_2 = require("../serialapi/_Types");
63
67
  const ControllerStatistics_1 = require("./ControllerStatistics");
64
68
  const Features_1 = require("./Features");
65
69
  const Inclusion_1 = require("./Inclusion");
70
+ const NodeInformationFrame_1 = require("./NodeInformationFrame");
71
+ const utils_1 = require("./utils");
66
72
  const ZWaveSDKVersions_1 = require("./ZWaveSDKVersions");
67
73
  let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
68
74
  /** @internal */
@@ -75,18 +81,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
75
81
  this._includeController = false;
76
82
  this._unprovisionRemovedNode = false;
77
83
  this._healNetworkProgress = new Map();
78
- this._nodes = new Map();
79
- this._nodes.getOrThrow = function (nodeId) {
80
- const node = this.get(nodeId);
81
- if (!node) {
82
- throw new core_1.ZWaveError(`Node ${nodeId} was not found!`, core_1.ZWaveErrorCodes.Controller_NodeNotFound);
83
- }
84
- return node;
85
- }.bind(this._nodes);
84
+ this._nodes = (0, shared_1.createThrowingMap)((nodeId) => {
85
+ throw new core_1.ZWaveError(`Node ${nodeId} was not found!`, core_1.ZWaveErrorCodes.Controller_NodeNotFound);
86
+ });
86
87
  // register message handlers
87
- driver.registerRequestHandler(Constants_1.FunctionType.AddNodeToNetwork, this.handleAddNodeStatusReport.bind(this));
88
- driver.registerRequestHandler(Constants_1.FunctionType.RemoveNodeFromNetwork, this.handleRemoveNodeStatusReport.bind(this));
89
- driver.registerRequestHandler(Constants_1.FunctionType.ReplaceFailedNode, this.handleReplaceNodeStatusReport.bind(this));
88
+ driver.registerRequestHandler(serial_1.FunctionType.AddNodeToNetwork, this.handleAddNodeStatusReport.bind(this));
89
+ driver.registerRequestHandler(serial_1.FunctionType.RemoveNodeFromNetwork, this.handleRemoveNodeStatusReport.bind(this));
90
+ driver.registerRequestHandler(serial_1.FunctionType.ReplaceFailedNode, this.handleReplaceNodeStatusReport.bind(this));
90
91
  }
91
92
  get type() {
92
93
  return this._type;
@@ -94,6 +95,12 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
94
95
  get sdkVersion() {
95
96
  return this._sdkVersion;
96
97
  }
98
+ get zwaveApiVersion() {
99
+ return this._zwaveApiVersion;
100
+ }
101
+ get zwaveChipType() {
102
+ return this._zwaveChipType;
103
+ }
97
104
  /** A 32bit number identifying the current network */
98
105
  get homeId() {
99
106
  return this._homeId;
@@ -102,8 +109,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
102
109
  get ownNodeId() {
103
110
  return this._ownNodeId;
104
111
  }
112
+ get isPrimary() {
113
+ return this._isPrimary;
114
+ }
115
+ /** @deprecated Use {@link isPrimary} instead */
105
116
  get isSecondary() {
106
- return this._isSecondary;
117
+ if (typeof this._isPrimary === "boolean")
118
+ return !this._isPrimary;
107
119
  }
108
120
  get isUsingHomeIdFromOtherNetwork() {
109
121
  return this._isUsingHomeIdFromOtherNetwork;
@@ -114,11 +126,24 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
114
126
  get wasRealPrimary() {
115
127
  return this._wasRealPrimary;
116
128
  }
129
+ get isSIS() {
130
+ return this._isSIS;
131
+ }
132
+ get isSUC() {
133
+ return this._isSUC;
134
+ }
135
+ /** @deprecated Use {@link isSUC} instead */
117
136
  get isStaticUpdateController() {
118
- return this._isStaticUpdateController;
137
+ return this._isSUC;
138
+ }
139
+ get nodeType() {
140
+ return this._nodeType;
119
141
  }
142
+ /** @deprecated Use the {@link nodeType} property to check for Controller vs. End Node instead */
120
143
  get isSlave() {
121
- return this._isSlave;
144
+ if (this._nodeType != undefined) {
145
+ return this._nodeType !== core_1.NodeType.Controller;
146
+ }
122
147
  }
123
148
  /** Checks if the SDK version is greater than the given one */
124
149
  sdkVersionGt(version) {
@@ -257,6 +282,8 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
257
282
  provisionSmartStartNode(entry) {
258
283
  // Make sure the controller supports SmartStart
259
284
  this.assertFeature(Features_1.ZWaveFeature.SmartStart);
285
+ // And that the entry contains valid data
286
+ (0, utils_1.assertProvisioningEntry)(entry);
260
287
  const provisioningList = [...this.provisioningList];
261
288
  const index = provisioningList.findIndex((e) => e.dsk === entry.dsk);
262
289
  if (index === -1) {
@@ -332,9 +359,11 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
332
359
  };
333
360
  });
334
361
  }
335
- /** Returns whether the SmartStart provisioning list contains entries that have not been included yet */
362
+ /** Returns whether the SmartStart provisioning list contains active entries that have not been included yet */
336
363
  hasPlannedProvisioningEntries() {
337
- return this.provisioningList.some((e) => !this.getNodeByDSK(e.dsk));
364
+ return this.provisioningList.some((e) => (e.status == undefined ||
365
+ e.status === Inclusion_1.ProvisioningEntryStatus.Active) &&
366
+ !this.getNodeByDSK(e.dsk));
338
367
  }
339
368
  /**
340
369
  * @internal
@@ -384,7 +413,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
384
413
  product type: ${(0, shared_1.num2hex)(this._productType)}
385
414
  product ID: ${(0, shared_1.num2hex)(this._productId)}
386
415
  supported functions: ${this._supportedFunctionTypes
387
- .map((fn) => `\n · ${Constants_1.FunctionType[fn]} (${(0, shared_1.num2hex)(fn)})`)
416
+ .map((fn) => `\n · ${serial_1.FunctionType[fn]} (${(0, shared_1.num2hex)(fn)})`)
388
417
  .join("")}`);
389
418
  }
390
419
  /**
@@ -398,13 +427,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
398
427
  const version = await this.driver.sendMessage(new GetControllerVersionMessages_1.GetControllerVersionRequest(this.driver), {
399
428
  supportCheck: false,
400
429
  });
401
- this._sdkVersion = version.sdkVersion;
430
+ this._sdkVersion = version.libraryVersion;
402
431
  this._type = version.controllerType;
403
432
  this.driver.controllerLog.print(`received version info:
404
433
  controller type: ${(0, shared_1.getEnumMemberName)(_Types_2.ZWaveLibraryTypes, this._type)}
405
434
  library version: ${this._sdkVersion}`);
406
435
  // If supported, get more fine-grained version info
407
- if (this.isFunctionSupported(Constants_1.FunctionType.GetProtocolVersion)) {
436
+ if (this.isFunctionSupported(serial_1.FunctionType.GetProtocolVersion)) {
408
437
  this.driver.controllerLog.print(`querying protocol version info...`);
409
438
  const protocol = await this.driver.sendMessage(new GetProtocolVersionMessages_1.GetProtocolVersionRequest(this.driver));
410
439
  // Overwrite the SDK version with the more fine grained protocol version. We can assume this to be
@@ -434,20 +463,20 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
434
463
  const ctrlCaps = await this.driver.sendMessage(new GetControllerCapabilitiesMessages_1.GetControllerCapabilitiesRequest(this.driver), {
435
464
  supportCheck: false,
436
465
  });
437
- this._isSecondary = ctrlCaps.isSecondary;
466
+ this._isPrimary = !ctrlCaps.isSecondary;
438
467
  this._isUsingHomeIdFromOtherNetwork =
439
468
  ctrlCaps.isUsingHomeIdFromOtherNetwork;
440
469
  this._isSISPresent = ctrlCaps.isSISPresent;
441
470
  this._wasRealPrimary = ctrlCaps.wasRealPrimary;
442
- this._isStaticUpdateController = ctrlCaps.isStaticUpdateController;
471
+ this._isSUC = ctrlCaps.isStaticUpdateController;
443
472
  this.driver.controllerLog.print(`received controller capabilities:
444
- controller role: ${this._isSecondary ? "secondary" : "primary"}
445
- is in other network: ${this._isUsingHomeIdFromOtherNetwork}
446
- is SIS present: ${this._isSISPresent}
447
- was real primary: ${this._wasRealPrimary}
448
- is a SUC: ${this._isStaticUpdateController}`);
473
+ controller role: ${this._isPrimary ? "primary" : "secondary"}
474
+ is the SUC: ${this._isSUC}
475
+ started this network: ${!this._isUsingHomeIdFromOtherNetwork}
476
+ SIS is present: ${this._isSISPresent}
477
+ was real primary: ${this._wasRealPrimary}`);
449
478
  // Figure out which sub commands of SerialAPISetup are supported
450
- if (this.isFunctionSupported(Constants_1.FunctionType.SerialAPISetup)) {
479
+ if (this.isFunctionSupported(serial_1.FunctionType.SerialAPISetup)) {
451
480
  this.driver.controllerLog.print(`querying serial API setup capabilities...`);
452
481
  const setupCaps = await this.driver.sendMessage(new SerialAPISetupMessages_1.SerialAPISetup_GetSupportedCommandsRequest(this.driver));
453
482
  this._supportedSerialAPISetupCommands = setupCaps.supportedCommands;
@@ -481,9 +510,9 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
481
510
  }
482
511
  // There needs to be a SUC/SIS in the network. If not, we promote ourselves to one if the following conditions are met:
483
512
  // We are the primary controller, but we are not SUC, there is no SUC and there is no SIS
484
- if (!this._isSecondary &&
513
+ if (this._isPrimary &&
485
514
  this._sucNodeId === 0 &&
486
- !this._isStaticUpdateController &&
515
+ !this._isSUC &&
487
516
  !this._isSISPresent) {
488
517
  this.driver.controllerLog.print(`There is no SUC/SIS in the network - promoting ourselves...`);
489
518
  try {
@@ -499,23 +528,30 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
499
528
  }
500
529
  // if it's a bridge controller, request the virtual nodes
501
530
  if (this.type === _Types_2.ZWaveLibraryTypes["Bridge Controller"] &&
502
- this.isFunctionSupported(Constants_1.FunctionType.FUNC_ID_ZW_GET_VIRTUAL_NODES)) {
531
+ this.isFunctionSupported(serial_1.FunctionType.FUNC_ID_ZW_GET_VIRTUAL_NODES)) {
503
532
  // TODO: send FUNC_ID_ZW_GET_VIRTUAL_NODES message
504
533
  }
505
- // Request information about all nodes with the GetInitData message
506
- this.driver.controllerLog.print(`querying node information...`);
534
+ // Request additional information about the controller/Z-Wave chip
535
+ this.driver.controllerLog.print(`querying additional controller information...`);
507
536
  const initData = await this.driver.sendMessage(new GetSerialApiInitDataMessages_1.GetSerialApiInitDataRequest(this.driver));
508
- // override the information we might already have
509
- this._isSecondary = initData.isSecondary;
510
- this._isStaticUpdateController = initData.isStaticUpdateController;
511
537
  // and remember the new info
512
- this._isSlave = initData.isSlave;
538
+ this._zwaveApiVersion = initData.zwaveApiVersion;
539
+ this._zwaveChipType = initData.zwaveChipType;
540
+ this._isPrimary = initData.isPrimary;
541
+ this._isSIS = initData.isSIS;
542
+ this._nodeType = initData.nodeType;
513
543
  this._supportsTimers = initData.supportsTimers;
514
544
  // ignore the initVersion, no clue what to do with it
515
- this.driver.controllerLog.print(`received node information:
516
- controller role: ${this._isSecondary ? "secondary" : "primary"}
517
- controller is a SUC: ${this._isStaticUpdateController}
518
- controller is a slave: ${this._isSlave}
545
+ this.driver.controllerLog.print(`received additional controller information:
546
+ Z-Wave API version: ${this._zwaveApiVersion.version} (${this._zwaveApiVersion.kind})${this._zwaveChipType
547
+ ? `
548
+ Z-Wave chip type: ${typeof this._zwaveChipType === "string"
549
+ ? this._zwaveChipType
550
+ : `unknown (type: ${(0, shared_1.num2hex)(this._zwaveChipType.type)}, version: ${(0, shared_1.num2hex)(this._zwaveChipType.version)})`}`
551
+ : ""}
552
+ node type ${(0, shared_1.getEnumMemberName)(core_1.NodeType, this._nodeType)}
553
+ controller role: ${this._isPrimary ? "primary" : "secondary"}
554
+ controller is the SIS: ${this._isSIS}
519
555
  controller supports timers: ${this._supportsTimers}
520
556
  nodes in the network: ${initData.nodeIds.join(", ")}`);
521
557
  // Index the value DB for optimal performance
@@ -547,7 +583,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
547
583
  controllerValueDB.setMetadata((0, VersionCC_1.getSDKVersionValueId)(), (0, VersionCC_1.getSDKVersionMetadata)());
548
584
  controllerValueDB.setValue((0, VersionCC_1.getSDKVersionValueId)(), this._sdkVersion);
549
585
  if (this.type !== _Types_2.ZWaveLibraryTypes["Bridge Controller"] &&
550
- this.isFunctionSupported(Constants_1.FunctionType.SetSerialApiTimeouts)) {
586
+ this.isFunctionSupported(serial_1.FunctionType.SetSerialApiTimeouts)) {
551
587
  const { ack, byte } = this.driver.options.timeouts;
552
588
  this.driver.controllerLog.print(`setting serial API timeouts: ack = ${ack} ms, byte = ${byte} ms`);
553
589
  const resp = await this.driver.sendMessage(new SetSerialApiTimeoutsMessages_1.SetSerialApiTimeoutsRequest(this.driver, {
@@ -556,85 +592,44 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
556
592
  }));
557
593
  this.driver.controllerLog.print(`serial API timeouts overwritten. The old values were: ack = ${resp.oldAckTimeout} ms, byte = ${resp.oldByteTimeout} ms`);
558
594
  }
559
- // TODO: Tell the Z-Wave stick what kind of application this is
560
- // The Z-Wave Application Layer MUST use the \ref ApplicationNodeInformation
561
- // function to generate the Node Information frame and to save information about
562
- // node capabilities. All Z Wave application related fields of the Node Information
563
- // structure MUST be initialized by this function.
564
- // Afterwards, a hard reset is required, so we need to move this into another method
565
- // if (
566
- // this.isFunctionSupported(
567
- // FunctionType.FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION,
568
- // )
569
- // ) {
570
- // this.driver.controllerLog.print(`sending application info...`);
571
- // // TODO: Generate this list dynamically
572
- // // A list of all CCs the controller will respond to
573
- // const supportedCCs = [CommandClasses.Time];
574
- // // Turn the CCs into buffers and concat them
575
- // const supportedCCBuffer = Buffer.concat(
576
- // supportedCCs.map(cc =>
577
- // cc >= 0xf1
578
- // ? // extended CC
579
- // Buffer.from([cc >>> 8, cc & 0xff])
580
- // : // normal CC
581
- // Buffer.from([cc]),
582
- // ),
583
- // );
584
- // const appInfoMsg = new Message(this.driver, {
585
- // type: MessageType.Request,
586
- // functionType:
587
- // FunctionType.FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION,
588
- // payload: Buffer.concat([
589
- // Buffer.from([
590
- // 0x01, // APPLICATION_NODEINFO_LISTENING
591
- // GenericDeviceClasses["Static Controller"],
592
- // 0x01, // specific static PC controller
593
- // supportedCCBuffer.length, // length of supported CC list
594
- // ]),
595
- // // List of supported CCs
596
- // supportedCCBuffer,
597
- // ]),
598
- // });
599
- // await this.driver.sendMessage(appInfoMsg, {
600
- // priority: MessagePriority.Controller,
601
- // supportCheck: false,
602
- // });
603
- // }
604
595
  this.driver.controllerLog.print("Interview completed");
605
596
  }
606
597
  createValueDBForNode(nodeId, ownKeys) {
607
598
  return new core_1.ValueDB(nodeId, this.driver.valueDB, this.driver.metadataDB, ownKeys);
608
599
  }
600
+ /**
601
+ * Sets the NIF of the controller to the Gateway device type and to include the CCs supported by Z-Wave JS.
602
+ * Warning: This only works when followed up by a hard-reset, so don't call this directly
603
+ * @internal
604
+ */
605
+ async setControllerNIF() {
606
+ this.driver.controllerLog.print("Updating the controller NIF...");
607
+ await this.driver.sendMessage(new SetApplicationNodeInformationRequest_1.SetApplicationNodeInformationRequest(this.driver, {
608
+ isListening: true,
609
+ ...(0, NodeInformationFrame_1.determineNIF)(),
610
+ }));
611
+ }
609
612
  /**
610
613
  * Performs a hard reset on the controller. This wipes out all configuration!
611
614
  * Warning: The driver needs to re-interview the controller, so don't call this directly
612
615
  * @internal
613
616
  */
614
- hardReset() {
615
- this.driver.controllerLog.print("performing hard reset...");
616
- return new Promise(async (resolve, reject) => {
617
- // handle the incoming message
618
- const handler = (_msg) => {
619
- this.driver.controllerLog.print(` hard reset succeeded`);
620
- // Clean up
621
- this._nodes.forEach((node) => node.removeAllListeners());
622
- this._nodes.clear();
623
- resolve();
624
- return true;
625
- };
626
- this.driver.registerRequestHandler(Constants_1.FunctionType.HardReset, handler, true);
627
- // begin the reset process
628
- try {
629
- await this.driver.sendMessage(new HardResetRequest_1.HardResetRequest(this.driver), { supportCheck: false });
630
- }
631
- catch (e) {
632
- // in any case unregister the handler
633
- this.driver.controllerLog.print(` hard reset failed: ${(0, shared_1.getErrorMessage)(e)}`, "error");
634
- this.driver.unregisterRequestHandler(Constants_1.FunctionType.HardReset, handler);
635
- reject(e);
636
- }
637
- });
617
+ async hardReset() {
618
+ // begin the reset process
619
+ try {
620
+ this.driver.controllerLog.print("performing hard reset...");
621
+ await this.driver.sendMessage(new HardResetRequest_1.HardResetRequest(this.driver), {
622
+ supportCheck: false,
623
+ });
624
+ this.driver.controllerLog.print(`hard reset succeeded`);
625
+ // Clean up
626
+ this._nodes.forEach((node) => node.removeAllListeners());
627
+ this._nodes.clear();
628
+ }
629
+ catch (e) {
630
+ this.driver.controllerLog.print(`hard reset failed: ${(0, shared_1.getErrorMessage)(e)}`, "error");
631
+ throw e;
632
+ }
638
633
  }
639
634
  get inclusionState() {
640
635
  return this._inclusionState;
@@ -1495,7 +1490,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
1495
1490
  version: supportedVersion,
1496
1491
  });
1497
1492
  const instance = node.createCCInstance(core_1.CommandClasses["Wake Up"]);
1498
- await instance.interview();
1493
+ await instance.interview(this.driver);
1499
1494
  }
1500
1495
  }
1501
1496
  catch (e) {
@@ -2209,41 +2204,40 @@ ${associatedNodes.join(", ")}`,
2209
2204
  let assocInstance;
2210
2205
  let mcInstance;
2211
2206
  if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
2212
- assocInstance = endpoint.createCCInstanceUnsafe(core_1.CommandClasses.Association);
2207
+ assocInstance = AssociationCC_1.AssociationCC;
2213
2208
  }
2214
2209
  else {
2215
2210
  throw new core_1.ZWaveError(`Node ${nodeId}${endpointIndex > 0 ? `, endpoint ${endpointIndex}` : ""} does not support associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
2216
2211
  }
2217
2212
  if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
2218
- mcInstance =
2219
- endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
2213
+ mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
2220
2214
  }
2221
- const assocGroupCount = (_b = assocInstance.getGroupCountCached()) !== null && _b !== void 0 ? _b : 0;
2222
- const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached()) !== null && _c !== void 0 ? _c : 0;
2215
+ const assocGroupCount = (_b = assocInstance.getGroupCountCached(this.driver, endpoint)) !== null && _b !== void 0 ? _b : 0;
2216
+ const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached(this.driver, endpoint)) !== null && _c !== void 0 ? _c : 0;
2223
2217
  const groupCount = Math.max(assocGroupCount, mcGroupCount);
2224
2218
  const ret = new Map();
2225
2219
  if (endpoint.supportsCC(core_1.CommandClasses["Association Group Information"])) {
2226
2220
  // We can read all information we need from the AGI CC
2227
- const agiInstance = endpoint.createCCInstance(core_1.CommandClasses["Association Group Information"]);
2221
+ const agiInstance = AssociationGroupInfoCC_1.AssociationGroupInfoCC;
2228
2222
  for (let group = 1; group <= groupCount; group++) {
2229
2223
  const assocConfig = (_d = node.deviceConfig) === null || _d === void 0 ? void 0 : _d.getAssociationConfigForEndpoint(endpointIndex, group);
2230
2224
  const multiChannel = !!mcInstance && group <= mcGroupCount;
2231
2225
  ret.set(group, {
2232
2226
  maxNodes: (multiChannel
2233
2227
  ? mcInstance
2234
- : assocInstance).getMaxNodesCached(group) || 1,
2228
+ : assocInstance).getMaxNodesCached(this.driver, endpoint, group) || 1,
2235
2229
  // AGI implies Z-Wave+ where group 1 is the lifeline
2236
2230
  isLifeline: group === 1,
2237
2231
  label:
2238
2232
  // prefer the configured label if we have one
2239
2233
  (_f = (_e = assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.label) !== null && _e !== void 0 ? _e :
2240
2234
  // the ones reported by AGI are sometimes pretty bad
2241
- agiInstance.getGroupNameCached(group)) !== null && _f !== void 0 ? _f :
2235
+ agiInstance.getGroupNameCached(this.driver, endpoint, group)) !== null && _f !== void 0 ? _f :
2242
2236
  // but still better than "unnamed"
2243
2237
  `Unnamed group ${group}`,
2244
2238
  multiChannel,
2245
- profile: agiInstance.getGroupProfileCached(group),
2246
- issuedCommands: agiInstance.getIssuedCommandsCached(group),
2239
+ profile: agiInstance.getGroupProfileCached(this.driver, endpoint, group),
2240
+ issuedCommands: agiInstance.getIssuedCommandsCached(this.driver, endpoint, group),
2247
2241
  });
2248
2242
  }
2249
2243
  }
@@ -2255,7 +2249,7 @@ ${associatedNodes.join(", ")}`,
2255
2249
  ret.set(group, {
2256
2250
  maxNodes: (multiChannel
2257
2251
  ? mcInstance
2258
- : assocInstance).getMaxNodesCached(group) ||
2252
+ : assocInstance).getMaxNodesCached(this.driver, endpoint, group) ||
2259
2253
  (assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.maxNodes) ||
2260
2254
  1,
2261
2255
  isLifeline: (_h = assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.isLifeline) !== null && _h !== void 0 ? _h : group === 1,
@@ -2291,8 +2285,7 @@ ${associatedNodes.join(", ")}`,
2291
2285
  const endpoint = node.getEndpointOrThrow(endpointIndex);
2292
2286
  const ret = new Map();
2293
2287
  if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
2294
- const cc = endpoint.createCCInstanceUnsafe(core_1.CommandClasses.Association);
2295
- const destinations = cc.getAllDestinationsCached();
2288
+ const destinations = AssociationCC_1.AssociationCC.getAllDestinationsCached(this.driver, endpoint);
2296
2289
  for (const [groupId, assocs] of destinations) {
2297
2290
  ret.set(groupId, assocs);
2298
2291
  }
@@ -2302,8 +2295,7 @@ ${associatedNodes.join(", ")}`,
2302
2295
  }
2303
2296
  // Merge the "normal" destinations with multi channel destinations
2304
2297
  if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
2305
- const cc = endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
2306
- const destinations = cc.getAllDestinationsCached();
2298
+ const destinations = MultiChannelAssociationCC_1.MultiChannelAssociationCC.getAllDestinationsCached(this.driver, endpoint);
2307
2299
  for (const [groupId, assocs] of destinations) {
2308
2300
  if (ret.has(groupId)) {
2309
2301
  const normalAssociations = ret.get(groupId);
@@ -2367,9 +2359,7 @@ ${associatedNodes.join(", ")}`,
2367
2359
  // The following checks don't apply to Lifeline associations
2368
2360
  if (destination.nodeId === this._ownNodeId)
2369
2361
  return true;
2370
- const groupCommandList = endpoint
2371
- .createCCInstanceInternal(core_1.CommandClasses["Association Group Information"])
2372
- .getIssuedCommandsCached(group);
2362
+ const groupCommandList = AssociationGroupInfoCC_1.AssociationGroupInfoCC.getIssuedCommandsCached(this.driver, endpoint, group);
2373
2363
  if (!groupCommandList || !groupCommandList.size) {
2374
2364
  // We don't know which CCs this group controls, just allow it
2375
2365
  return true;
@@ -2404,20 +2394,19 @@ ${associatedNodes.join(", ")}`,
2404
2394
  .map((a) => a.nodeId));
2405
2395
  const endpointAssociations = destinations.filter((a) => a.endpoint != undefined);
2406
2396
  if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
2407
- assocInstance = endpoint.createCCInstanceUnsafe(core_1.CommandClasses.Association);
2397
+ assocInstance = AssociationCC_1.AssociationCC;
2408
2398
  }
2409
2399
  else if (nodeAssociations.length > 0) {
2410
2400
  throw new core_1.ZWaveError(`Node ${nodeAndEndpointString} does not support associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
2411
2401
  }
2412
2402
  if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
2413
- mcInstance =
2414
- endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
2403
+ mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
2415
2404
  }
2416
2405
  else if (endpointAssociations.length > 0) {
2417
2406
  throw new core_1.ZWaveError(`Node ${nodeAndEndpointString} does not support multi channel associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
2418
2407
  }
2419
- const assocGroupCount = (_b = assocInstance === null || assocInstance === void 0 ? void 0 : assocInstance.getGroupCountCached()) !== null && _b !== void 0 ? _b : 0;
2420
- const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached()) !== null && _c !== void 0 ? _c : 0;
2408
+ const assocGroupCount = (_b = assocInstance === null || assocInstance === void 0 ? void 0 : assocInstance.getGroupCountCached(this.driver, endpoint)) !== null && _b !== void 0 ? _b : 0;
2409
+ const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached(this.driver, endpoint)) !== null && _c !== void 0 ? _c : 0;
2421
2410
  const groupCount = Math.max(assocGroupCount, mcGroupCount);
2422
2411
  if (group > groupCount) {
2423
2412
  throw new core_1.ZWaveError(`Group ${group} does not exist on node ${nodeAndEndpointString}`, core_1.ZWaveErrorCodes.AssociationCC_InvalidGroup);
@@ -2487,9 +2476,8 @@ ${associatedNodes.join(", ")}`,
2487
2476
  // To remove a multi channel association, we need to make sure that the group exists
2488
2477
  // and the node supports multi channel associations
2489
2478
  if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
2490
- mcInstance =
2491
- endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
2492
- if (group <= mcInstance.getGroupCountCached()) {
2479
+ mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
2480
+ if (group <= mcInstance.getGroupCountCached(this.driver, endpoint)) {
2493
2481
  groupExistsAsMultiChannel = true;
2494
2482
  }
2495
2483
  }
@@ -2499,8 +2487,9 @@ ${associatedNodes.join(", ")}`,
2499
2487
  // To remove a normal association, we need to make sure that the group exists either as a normal association
2500
2488
  // or as a multi channel association
2501
2489
  if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
2502
- assocInstance = endpoint.createCCInstanceUnsafe(core_1.CommandClasses.Association);
2503
- if (group <= assocInstance.getGroupCountCached()) {
2490
+ assocInstance = AssociationCC_1.AssociationCC;
2491
+ if (group <=
2492
+ assocInstance.getGroupCountCached(this.driver, endpoint)) {
2504
2493
  groupExistsAsNodeAssociation = true;
2505
2494
  }
2506
2495
  }