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
@@ -59,12 +59,7 @@ const _Types_1 = require("../commandclass/_Types");
59
59
  const Controller_1 = require("../controller/Controller");
60
60
  const Inclusion_1 = require("../controller/Inclusion");
61
61
  const _Types_2 = require("../controller/_Types");
62
- const Controller_2 = require("../log/Controller");
63
62
  const Driver_1 = require("../log/Driver");
64
- const Constants_1 = require("../message/Constants");
65
- const Message_1 = require("../message/Message");
66
- const SuccessIndicator_1 = require("../message/SuccessIndicator");
67
- const INodeQuery_1 = require("../node/INodeQuery");
68
63
  const _Types_3 = require("../node/_Types");
69
64
  const ApplicationCommandRequest_1 = require("../serialapi/application/ApplicationCommandRequest");
70
65
  const ApplicationUpdateRequest_1 = require("../serialapi/application/ApplicationUpdateRequest");
@@ -232,10 +227,9 @@ class Driver extends shared_1.TypedEventEmitter {
232
227
  // Initialize logging
233
228
  this._logContainer = new core_1.ZWaveLogContainer(this.options.logConfig);
234
229
  this._driverLog = new Driver_1.DriverLogger(this._logContainer);
235
- this._controllerLog = new Controller_2.ControllerLogger(this._logContainer);
230
+ this._controllerLog = new core_1.ControllerLogger(this._logContainer);
236
231
  // Initialize the cache
237
232
  this.cacheDir = this.options.storage.cacheDir;
238
- // TODO: Load provisioning list
239
233
  // Initialize config manager
240
234
  this.configManager = new config_1.ConfigManager({
241
235
  logContainer: this._logContainer,
@@ -412,6 +406,27 @@ class Driver extends shared_1.TypedEventEmitter {
412
406
  get securityManager2() {
413
407
  return this._securityManager2;
414
408
  }
409
+ /** @internal This is needed for the ZWaveHost interface */
410
+ get homeId() {
411
+ return this.controller.homeId;
412
+ }
413
+ /** @internal This is needed for the ZWaveHost interface */
414
+ get ownNodeId() {
415
+ return this.controller.ownNodeId;
416
+ }
417
+ /** @internal This is needed for the ZWaveHost interface */
418
+ get nodes() {
419
+ return this.controller.nodes;
420
+ }
421
+ getNodeUnsafe(msg) {
422
+ const nodeId = msg.getNodeId();
423
+ if (nodeId != undefined)
424
+ return this.controller.nodes.get(nodeId);
425
+ }
426
+ getValueDB(nodeId) {
427
+ const node = this.controller.nodes.getOrThrow(nodeId);
428
+ return node.valueDB;
429
+ }
415
430
  /** Updates the logging configuration without having to restart the driver. */
416
431
  updateLogConfig(config) {
417
432
  this._logContainer.updateConfiguration(config);
@@ -431,6 +446,7 @@ class Driver extends shared_1.TypedEventEmitter {
431
446
  }
432
447
  /** Start the driver */
433
448
  async start() {
449
+ var _a;
434
450
  // avoid starting twice
435
451
  if (this.wasDestroyed) {
436
452
  throw new core_1.ZWaveError("The driver was destroyed. Create a new instance and start that one.", core_1.ZWaveErrorCodes.Driver_Destroyed);
@@ -438,8 +454,9 @@ class Driver extends shared_1.TypedEventEmitter {
438
454
  if (this._wasStarted)
439
455
  return Promise.resolve();
440
456
  this._wasStarted = true;
441
- // Enforce that an error handler is attached
442
- if (this.listenerCount("error") === 0) {
457
+ // Enforce that an error handler is attached, except for testing with a mocked serialport
458
+ if (!this.options.testingHooks &&
459
+ this.listenerCount("error") === 0) {
443
460
  throw new core_1.ZWaveError(`Before starting the driver, a handler for the "error" event must be attached.`, core_1.ZWaveErrorCodes.Driver_NoErrorHandler);
444
461
  }
445
462
  const spOpenPromise = (0, deferred_promise_1.createDeferredPromise)();
@@ -460,7 +477,7 @@ class Driver extends shared_1.TypedEventEmitter {
460
477
  }
461
478
  else {
462
479
  this.driverLog.print(`opening serial port ${this.port}`);
463
- this.serial = new serial_1.ZWaveSerialPort(this.port, this._logContainer);
480
+ this.serial = new serial_1.ZWaveSerialPort(this.port, this._logContainer, (_a = this.options.testingHooks) === null || _a === void 0 ? void 0 : _a.serialPortBinding);
464
481
  }
465
482
  this.serial
466
483
  .on("data", this.serialport_onData.bind(this))
@@ -487,6 +504,7 @@ class Driver extends shared_1.TypedEventEmitter {
487
504
  // Everything async (inluding opening the serial port) must happen in the setImmediate callback
488
505
  // asynchronously open the serial port
489
506
  setImmediate(async () => {
507
+ var _a;
490
508
  try {
491
509
  await this.openSerialport();
492
510
  }
@@ -498,6 +516,10 @@ class Driver extends shared_1.TypedEventEmitter {
498
516
  this.driverLog.print("serial port opened");
499
517
  this._isOpen = true;
500
518
  spOpenPromise.resolve();
519
+ if (typeof ((_a = this.options.testingHooks) === null || _a === void 0 ? void 0 : _a.onSerialPortOpen) ===
520
+ "function") {
521
+ await this.options.testingHooks.onSerialPortOpen(this.serial);
522
+ }
501
523
  // Perform initialization sequence
502
524
  await this.writeHeader(serial_1.MessageHeaders.NAK);
503
525
  // Per the specs, this should be followed by a soft-reset but we need to be able
@@ -827,7 +849,7 @@ class Driver extends shared_1.TypedEventEmitter {
827
849
  }
828
850
  // Drop all pending messages that come from a previous interview attempt
829
851
  this.rejectTransactions((t) => t.message.getNodeId() === node.id &&
830
- (t.priority === Constants_1.MessagePriority.NodeQuery ||
852
+ (t.priority === serial_1.MessagePriority.NodeQuery ||
831
853
  t.tag === "interview"), "The interview was restarted", core_1.ZWaveErrorCodes.Controller_InterviewRestarted);
832
854
  const maxInterviewAttempts = this.options.attempts.nodeInterview;
833
855
  try {
@@ -1339,7 +1361,7 @@ class Driver extends shared_1.TypedEventEmitter {
1339
1361
  // Z-Wave 700 sticks are relatively fast, so we also wait for the Serial API started command
1340
1362
  // to bail early
1341
1363
  this.controllerLog.print("Waiting for the controller to reconnect...");
1342
- let waitResult = await this.waitForMessage((msg) => msg.functionType === Constants_1.FunctionType.SerialAPIStarted, 1500).catch(() => false);
1364
+ let waitResult = await this.waitForMessage((msg) => msg.functionType === serial_1.FunctionType.SerialAPIStarted, 1500).catch(() => false);
1343
1365
  if (waitResult) {
1344
1366
  // Serial API did start, maybe do something with the information?
1345
1367
  this.controllerLog.print("reconnected and restarted");
@@ -1357,7 +1379,7 @@ class Driver extends shared_1.TypedEventEmitter {
1357
1379
  }
1358
1380
  // Wait the configured amount of time for the Serial API started command to be received
1359
1381
  this.controllerLog.print("Waiting for the Serial API to start...");
1360
- waitResult = await this.waitForMessage((msg) => msg.functionType === Constants_1.FunctionType.SerialAPIStarted, this.options.timeouts.serialAPIStarted).catch(() => false);
1382
+ waitResult = await this.waitForMessage((msg) => msg.functionType === serial_1.FunctionType.SerialAPIStarted, this.options.timeouts.serialAPIStarted).catch(() => false);
1361
1383
  if (waitResult) {
1362
1384
  // Serial API did start, maybe do something with the information?
1363
1385
  this.controllerLog.print("Serial API started");
@@ -1401,7 +1423,8 @@ class Driver extends shared_1.TypedEventEmitter {
1401
1423
  */
1402
1424
  async hardReset() {
1403
1425
  this.ensureReady(true);
1404
- // Calling ensureReady with true ensures that _controller is defined
1426
+ // Update the controller NIF prior to hard resetting
1427
+ await this._controller.setControllerNIF();
1405
1428
  await this._controller.hardReset();
1406
1429
  // Clean up
1407
1430
  this.rejectTransactions(() => true, `The controller was hard-reset`);
@@ -1526,14 +1549,14 @@ class Driver extends shared_1.TypedEventEmitter {
1526
1549
  try {
1527
1550
  // Parse the message while remembering potential decoding errors in embedded CCs
1528
1551
  // This way we can log the invalid CC contents
1529
- msg = Message_1.Message.from(this, data);
1552
+ msg = serial_1.Message.from(this, data);
1530
1553
  // Then ensure there are no errors
1531
1554
  if ((0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
1532
1555
  (0, CommandClass_1.assertValidCCs)(msg);
1533
1556
  }
1534
1557
  if (!!this._controller) {
1535
1558
  if ((0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
1536
- (_c = msg.getNodeUnsafe()) === null || _c === void 0 ? void 0 : _c.incrementStatistics("commandsRX");
1559
+ (_c = this.getNodeUnsafe(msg)) === null || _c === void 0 ? void 0 : _c.incrementStatistics("commandsRX");
1537
1560
  }
1538
1561
  else {
1539
1562
  this._controller.incrementStatistics("messagesRX");
@@ -1553,14 +1576,13 @@ class Driver extends shared_1.TypedEventEmitter {
1553
1576
  await this.writeHeader(response);
1554
1577
  if (!!this._controller) {
1555
1578
  if ((0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
1556
- (_d = msg.getNodeUnsafe()) === null || _d === void 0 ? void 0 : _d.incrementStatistics("commandsDroppedRX");
1579
+ (_d = this.getNodeUnsafe(msg)) === null || _d === void 0 ? void 0 : _d.incrementStatistics("commandsDroppedRX");
1557
1580
  // Figure out if the command was received with supervision encapsulation
1558
1581
  const supervisionSessionId = SupervisionCC_1.SupervisionCC.getSessionId(msg.command);
1559
1582
  if (supervisionSessionId !== undefined &&
1560
1583
  msg.command instanceof CommandClass_1.InvalidCC) {
1561
1584
  // If it was, we need to notify the sender that we couldn't decode the command
1562
- await ((_e = msg
1563
- .getNodeUnsafe()) === null || _e === void 0 ? void 0 : _e.createAPI(core_1.CommandClasses.Supervision, false).sendReport({
1585
+ await ((_e = this.getNodeUnsafe(msg)) === null || _e === void 0 ? void 0 : _e.createAPI(core_1.CommandClasses.Supervision, false).sendReport({
1564
1586
  sessionId: supervisionSessionId,
1565
1587
  moreUpdatesFollow: false,
1566
1588
  status: _Types_1.SupervisionStatus.NoSupport,
@@ -1598,7 +1620,7 @@ class Driver extends shared_1.TypedEventEmitter {
1598
1620
  // and handle the encapsulation part normally
1599
1621
  if (msg.command instanceof
1600
1622
  SecurityCC_1.SecurityCCCommandEncapsulationNonceGet) {
1601
- void ((_g = msg.getNodeUnsafe()) === null || _g === void 0 ? void 0 : _g.handleSecurityNonceGet());
1623
+ void ((_g = this.getNodeUnsafe(msg)) === null || _g === void 0 ? void 0 : _g.handleSecurityNonceGet());
1602
1624
  }
1603
1625
  // Transport Service commands must be handled before assembling partial CCs
1604
1626
  if ((0, TransportServiceCC_1.isTransportServiceEncapsulation)(msg.command)) {
@@ -1808,7 +1830,7 @@ class Driver extends shared_1.TypedEventEmitter {
1808
1830
  * Returns `true` if the transaction failure was handled, `false` if it needs to be rejected.
1809
1831
  */
1810
1832
  handleMissingNodeACK(transaction) {
1811
- const node = transaction.message.getNodeUnsafe();
1833
+ const node = this.getNodeUnsafe(transaction.message);
1812
1834
  if (!node)
1813
1835
  return false; // This should never happen, but whatever
1814
1836
  const messagePart1 = (0, SendDataShared_1.isSendData)(transaction.message)
@@ -1955,7 +1977,7 @@ class Driver extends shared_1.TypedEventEmitter {
1955
1977
  });
1956
1978
  await this.sendCommand(cc, {
1957
1979
  maxSendAttempts: 1,
1958
- priority: Constants_1.MessagePriority.Nonce,
1980
+ priority: serial_1.MessagePriority.Nonce,
1959
1981
  });
1960
1982
  },
1961
1983
  sendSegmentsComplete: async () => {
@@ -1970,7 +1992,7 @@ class Driver extends shared_1.TypedEventEmitter {
1970
1992
  });
1971
1993
  await this.sendCommand(cc, {
1972
1994
  maxSendAttempts: 1,
1973
- priority: Constants_1.MessagePriority.Nonce,
1995
+ priority: serial_1.MessagePriority.Nonce,
1974
1996
  });
1975
1997
  },
1976
1998
  }, {
@@ -2012,7 +2034,7 @@ class Driver extends shared_1.TypedEventEmitter {
2012
2034
  });
2013
2035
  await this.sendCommand(cc, {
2014
2036
  maxSendAttempts: 1,
2015
- priority: Constants_1.MessagePriority.Nonce,
2037
+ priority: serial_1.MessagePriority.Nonce,
2016
2038
  });
2017
2039
  }
2018
2040
  }
@@ -2022,7 +2044,7 @@ class Driver extends shared_1.TypedEventEmitter {
2022
2044
  * @param msg The decoded message
2023
2045
  */
2024
2046
  async handleUnsolicitedMessage(msg) {
2025
- if (msg.type === Constants_1.MessageType.Request) {
2047
+ if (msg.type === serial_1.MessageType.Request) {
2026
2048
  // This is a request we might have registered handlers for
2027
2049
  try {
2028
2050
  await this.handleRequest(msg);
@@ -2057,7 +2079,7 @@ class Driver extends shared_1.TypedEventEmitter {
2057
2079
  : [];
2058
2080
  const entry = { invoke: handler, oneTime };
2059
2081
  handlers.push(entry);
2060
- this.driverLog.print(`added${oneTime ? " one-time" : ""} request handler for ${Constants_1.FunctionType[fnType]} (${(0, shared_1.num2hex)(fnType)})...
2082
+ this.driverLog.print(`added${oneTime ? " one-time" : ""} request handler for ${serial_1.FunctionType[fnType]} (${(0, shared_1.num2hex)(fnType)})...
2061
2083
  ${handlers.length} registered`);
2062
2084
  this.requestHandlers.set(fnType, handlers);
2063
2085
  }
@@ -2077,7 +2099,7 @@ ${handlers.length} registered`);
2077
2099
  break;
2078
2100
  }
2079
2101
  }
2080
- this.driverLog.print(`removed request handler for ${Constants_1.FunctionType[fnType]} (${fnType})...
2102
+ this.driverLog.print(`removed request handler for ${serial_1.FunctionType[fnType]} (${fnType})...
2081
2103
  ${handlers.length} left`);
2082
2104
  this.requestHandlers.set(fnType, handlers);
2083
2105
  }
@@ -2114,8 +2136,8 @@ ${handlers.length} left`);
2114
2136
  */
2115
2137
  async handleRequest(msg) {
2116
2138
  let handlers;
2117
- if ((0, INodeQuery_1.isNodeQuery)(msg) || (0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
2118
- const node = msg.getNodeUnsafe();
2139
+ if ((0, serial_1.isNodeQuery)(msg) || (0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
2140
+ const node = this.getNodeUnsafe(msg);
2119
2141
  if (node) {
2120
2142
  // We have received an unsolicited message from a dead node, bring it back to life
2121
2143
  if (node.status === _Types_3.NodeStatus.Dead) {
@@ -2134,7 +2156,7 @@ ${handlers.length} left`);
2134
2156
  if ((0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
2135
2157
  // For further actions, we are only interested in the innermost CC
2136
2158
  this.unwrapCommands(msg);
2137
- const node = msg.getNodeUnsafe();
2159
+ const node = this.getNodeUnsafe(msg);
2138
2160
  // If we receive an encrypted message but assume the node is insecure, change our assumption
2139
2161
  if ((node === null || node === void 0 ? void 0 : node.isSecure) === false &&
2140
2162
  (msg.command.ccId === core_1.CommandClasses.Security ||
@@ -2255,7 +2277,7 @@ ${handlers.length} left`);
2255
2277
  }
2256
2278
  else if (msg instanceof ApplicationUpdateRequest_1.ApplicationUpdateRequest) {
2257
2279
  if (msg instanceof ApplicationUpdateRequest_1.ApplicationUpdateRequestNodeInfoReceived) {
2258
- const node = msg.getNodeUnsafe();
2280
+ const node = this.getNodeUnsafe(msg);
2259
2281
  if (node) {
2260
2282
  this.controllerLog.logNode(node.id, {
2261
2283
  message: "Received updated node info",
@@ -2305,7 +2327,7 @@ ${handlers.length} left`);
2305
2327
  }
2306
2328
  else {
2307
2329
  // TODO: This deserves a nicer formatting
2308
- this.driverLog.print(`handling request ${Constants_1.FunctionType[msg.functionType]} (${msg.functionType})`);
2330
+ this.driverLog.print(`handling request ${serial_1.FunctionType[msg.functionType]} (${msg.functionType})`);
2309
2331
  handlers = this.requestHandlers.get(msg.functionType);
2310
2332
  }
2311
2333
  if (handlers != undefined && handlers.length > 0) {
@@ -2369,7 +2391,7 @@ ${handlers.length} left`);
2369
2391
  // 5.
2370
2392
  // When a node supports S2 and has a valid security class, the command
2371
2393
  // must be S2-encapsulated
2372
- const node = msg.command.getNode();
2394
+ const node = msg.command.getNode(this);
2373
2395
  if (node === null || node === void 0 ? void 0 : node.supportsCC(core_1.CommandClasses["Security 2"])) {
2374
2396
  const securityClass = node.getHighestSecurityClass();
2375
2397
  if (((securityClass != undefined &&
@@ -2402,9 +2424,9 @@ ${handlers.length} left`);
2402
2424
  handleSerialAPICommandResult(msg, options, result) {
2403
2425
  var _a, _b;
2404
2426
  // Update statistics
2405
- const node = msg.getNodeUnsafe();
2427
+ const node = this.getNodeUnsafe(msg);
2406
2428
  let success = true;
2407
- if ((0, SendDataShared_1.isSendData)(msg) || (0, INodeQuery_1.isNodeQuery)(msg)) {
2429
+ if ((0, SendDataShared_1.isSendData)(msg) || (0, serial_1.isNodeQuery)(msg)) {
2408
2430
  // This shouldn't happen, but just in case
2409
2431
  if (!node)
2410
2432
  return;
@@ -2428,8 +2450,8 @@ ${handlers.length} left`);
2428
2450
  if (success) {
2429
2451
  if (node.canSleep) {
2430
2452
  // Do not update the node status when we only responded to a nonce request
2431
- if (options.priority !== Constants_1.MessagePriority.Nonce &&
2432
- options.priority !== Constants_1.MessagePriority.Supervision) {
2453
+ if (options.priority !== serial_1.MessagePriority.Nonce &&
2454
+ options.priority !== serial_1.MessagePriority.Supervision) {
2433
2455
  // If the node is not meant to be kept awake, try to send it back to sleep
2434
2456
  if (!node.keepAwake) {
2435
2457
  setImmediate(() => this.debounceSendNodeToSleep(node));
@@ -2458,8 +2480,8 @@ ${handlers.length} left`);
2458
2480
  this.ensureReady();
2459
2481
  let node;
2460
2482
  // Don't send messages to dead nodes
2461
- if ((0, INodeQuery_1.isNodeQuery)(msg) || (0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
2462
- node = msg.getNodeUnsafe();
2483
+ if ((0, serial_1.isNodeQuery)(msg) || (0, ICommandClassContainer_1.isCommandClassContainer)(msg)) {
2484
+ node = this.getNodeUnsafe(msg);
2463
2485
  if (!(0, NoOperationCC_1.messageIsPing)(msg) && (node === null || node === void 0 ? void 0 : node.status) === _Types_3.NodeStatus.Dead) {
2464
2486
  // Instead of throwing immediately, try to ping the node first - if it responds, continue
2465
2487
  if (!(await node.ping())) {
@@ -2468,10 +2490,10 @@ ${handlers.length} left`);
2468
2490
  }
2469
2491
  }
2470
2492
  if (options.priority == undefined)
2471
- options.priority = (0, Message_1.getDefaultPriority)(msg);
2493
+ options.priority = (0, serial_1.getDefaultPriority)(msg);
2472
2494
  if (options.priority == undefined) {
2473
2495
  const className = msg.constructor.name;
2474
- const msgTypeName = Constants_1.FunctionType[msg.functionType];
2496
+ const msgTypeName = serial_1.FunctionType[msg.functionType];
2475
2497
  throw new core_1.ZWaveError(`No default priority has been defined for ${className} (${msgTypeName}), so you have to provide one for your message`, core_1.ZWaveErrorCodes.Driver_NoPriority);
2476
2498
  }
2477
2499
  if (options.supportCheck == undefined)
@@ -2479,7 +2501,7 @@ ${handlers.length} left`);
2479
2501
  if (options.supportCheck &&
2480
2502
  this._controller != undefined &&
2481
2503
  !this._controller.isFunctionSupported(msg.functionType)) {
2482
- throw new core_1.ZWaveError(`Your hardware does not support the ${Constants_1.FunctionType[msg.functionType]} function`, core_1.ZWaveErrorCodes.Driver_NotSupported);
2504
+ throw new core_1.ZWaveError(`Your hardware does not support the ${serial_1.FunctionType[msg.functionType]} function`, core_1.ZWaveErrorCodes.Driver_NotSupported);
2483
2505
  }
2484
2506
  // When sending a message to a node that is known to be sleeping,
2485
2507
  // the priority must be WakeUp, so the message gets deprioritized
@@ -2499,13 +2521,13 @@ ${handlers.length} left`);
2499
2521
  !(msg instanceof SendDataMessages_1.SendDataMulticastRequest) &&
2500
2522
  !(msg instanceof SendDataBridgeMessages_1.SendDataMulticastBridgeRequest) &&
2501
2523
  // Nonces and responses to Supervision Get have to be sent immediately
2502
- options.priority !== Constants_1.MessagePriority.Nonce &&
2503
- options.priority !== Constants_1.MessagePriority.Supervision) {
2504
- if (options.priority === Constants_1.MessagePriority.NodeQuery) {
2524
+ options.priority !== serial_1.MessagePriority.Nonce &&
2525
+ options.priority !== serial_1.MessagePriority.Supervision) {
2526
+ if (options.priority === serial_1.MessagePriority.NodeQuery) {
2505
2527
  // Remember that this transaction was part of an interview
2506
2528
  options.tag = "interview";
2507
2529
  }
2508
- options.priority = Constants_1.MessagePriority.WakeUp;
2530
+ options.priority = serial_1.MessagePriority.WakeUp;
2509
2531
  }
2510
2532
  // Create the transaction
2511
2533
  const { generator, resultPromise } = (0, MessageGenerators_1.createMessageGenerator)(this, msg, (msg, _result) => {
@@ -2554,24 +2576,24 @@ ${handlers.length} left`);
2554
2576
  if ((0, SendDataShared_1.isSendData)(msg)) {
2555
2577
  // For SendData messages, make sure the message is not a nonce
2556
2578
  maybeSendToSleep =
2557
- options.priority !== Constants_1.MessagePriority.Nonce &&
2558
- options.priority !== Constants_1.MessagePriority.Supervision &&
2579
+ options.priority !== serial_1.MessagePriority.Nonce &&
2580
+ options.priority !== serial_1.MessagePriority.Supervision &&
2559
2581
  // And that the result is either a response from the node
2560
2582
  // or a transmit report indicating success
2561
2583
  result &&
2562
2584
  (result.functionType ===
2563
- Constants_1.FunctionType.BridgeApplicationCommand ||
2585
+ serial_1.FunctionType.BridgeApplicationCommand ||
2564
2586
  result.functionType ===
2565
- Constants_1.FunctionType.ApplicationCommand ||
2587
+ serial_1.FunctionType.ApplicationCommand ||
2566
2588
  ((0, SendDataShared_1.isSendDataTransmitReport)(result) && result.isOK()));
2567
2589
  }
2568
2590
  else {
2569
2591
  // For other messages to the node, just check for successful completion. If the callback is not OK,
2570
2592
  // we might not be able to communicate with the node. Sending another message is not a good idea.
2571
2593
  maybeSendToSleep =
2572
- (0, INodeQuery_1.isNodeQuery)(msg) &&
2594
+ (0, serial_1.isNodeQuery)(msg) &&
2573
2595
  result &&
2574
- (0, SuccessIndicator_1.isSuccessIndicator)(result) &&
2596
+ (0, serial_1.isSuccessIndicator)(result) &&
2575
2597
  result.isOK();
2576
2598
  }
2577
2599
  if (maybeSendToSleep && node && node.canSleep && !node.keepAwake) {
@@ -2585,13 +2607,13 @@ ${handlers.length} left`);
2585
2607
  // If a controller command failed (that is not SendData), pass the response/callback through
2586
2608
  (e.code === core_1.ZWaveErrorCodes.Controller_ResponseNOK ||
2587
2609
  e.code === core_1.ZWaveErrorCodes.Controller_CallbackNOK) &&
2588
- e.context instanceof Message_1.Message &&
2610
+ e.context instanceof serial_1.Message &&
2589
2611
  // We need to check the function type here because context can be the transmit reports
2590
- e.context.functionType !== Constants_1.FunctionType.SendData &&
2591
- e.context.functionType !== Constants_1.FunctionType.SendDataMulticast &&
2592
- e.context.functionType !== Constants_1.FunctionType.SendDataBridge &&
2612
+ e.context.functionType !== serial_1.FunctionType.SendData &&
2613
+ e.context.functionType !== serial_1.FunctionType.SendDataMulticast &&
2614
+ e.context.functionType !== serial_1.FunctionType.SendDataBridge &&
2593
2615
  e.context.functionType !==
2594
- Constants_1.FunctionType.SendDataMulticastBridge) {
2616
+ serial_1.FunctionType.SendDataMulticastBridge) {
2595
2617
  (_a = this._controller) === null || _a === void 0 ? void 0 : _a.incrementStatistics("messagesDroppedTX");
2596
2618
  return e.context;
2597
2619
  }
@@ -2616,7 +2638,7 @@ ${handlers.length} left`);
2616
2638
  createSendDataMessage(command, options = {}) {
2617
2639
  let msg;
2618
2640
  if (command.isSinglecast()) {
2619
- if (this.controller.isFunctionSupported(Constants_1.FunctionType.SendDataBridge)) {
2641
+ if (this.controller.isFunctionSupported(serial_1.FunctionType.SendDataBridge)) {
2620
2642
  // Prioritize Bridge commands when they are supported
2621
2643
  msg = new SendDataBridgeMessages_1.SendDataBridgeRequest(this, { command });
2622
2644
  }
@@ -2625,7 +2647,7 @@ ${handlers.length} left`);
2625
2647
  }
2626
2648
  }
2627
2649
  else if (command.isMulticast()) {
2628
- if (this.controller.isFunctionSupported(Constants_1.FunctionType.SendDataMulticastBridge)) {
2650
+ if (this.controller.isFunctionSupported(serial_1.FunctionType.SendDataMulticastBridge)) {
2629
2651
  // Prioritize Bridge commands when they are supported
2630
2652
  msg = new SendDataBridgeMessages_1.SendDataMulticastBridgeRequest(this, { command });
2631
2653
  }
@@ -2697,7 +2719,7 @@ ${handlers.length} left`);
2697
2719
  throw new core_1.ZWaveError(`Sending a supervised command is only supported with singlecast!`, core_1.ZWaveErrorCodes.CC_NotSupported);
2698
2720
  }
2699
2721
  // Check if the target supports this command
2700
- if (!((_a = command.getNode()) === null || _a === void 0 ? void 0 : _a.supportsCC(core_1.CommandClasses.Supervision))) {
2722
+ if (!((_a = command.getNode(this)) === null || _a === void 0 ? void 0 : _a.supportsCC(core_1.CommandClasses.Supervision))) {
2701
2723
  throw new core_1.ZWaveError(`Node ${nodeId} does not support the Supervision CC!`, core_1.ZWaveErrorCodes.CC_NotSupported);
2702
2724
  }
2703
2725
  // Create the encapsulating CC so we have a session ID
@@ -2724,7 +2746,7 @@ ${handlers.length} left`);
2724
2746
  */
2725
2747
  async trySendCommandSupervised(command, options) {
2726
2748
  var _a;
2727
- if ((_a = command.getNode()) === null || _a === void 0 ? void 0 : _a.supportsCC(core_1.CommandClasses.Supervision)) {
2749
+ if ((_a = command.getNode(this)) === null || _a === void 0 ? void 0 : _a.supportsCC(core_1.CommandClasses.Supervision)) {
2728
2750
  return this.sendSupervisedCommand(command, options);
2729
2751
  }
2730
2752
  else {
@@ -2816,8 +2838,8 @@ ${handlers.length} left`);
2816
2838
  switch (true) {
2817
2839
  // Pings, nonces and Supervision Reports will block the send queue until wakeup, so they must be dropped
2818
2840
  case (0, NoOperationCC_1.messageIsPing)(msg):
2819
- case transaction.priority === Constants_1.MessagePriority.Nonce:
2820
- case transaction.priority === Constants_1.MessagePriority.Supervision:
2841
+ case transaction.priority === serial_1.MessagePriority.Nonce:
2842
+ case transaction.priority === serial_1.MessagePriority.Supervision:
2821
2843
  // We also don't want to immediately send the node to sleep when it wakes up
2822
2844
  case (0, ICommandClassContainer_1.isCommandClassContainer)(msg) &&
2823
2845
  msg.command instanceof WakeUpCC_1.WakeUpCCNoMoreInformation:
@@ -2836,7 +2858,7 @@ ${handlers.length} left`);
2836
2858
  };
2837
2859
  const requeue = {
2838
2860
  type: "requeue",
2839
- priority: Constants_1.MessagePriority.WakeUp,
2861
+ priority: serial_1.MessagePriority.WakeUp,
2840
2862
  };
2841
2863
  const requeueAndTagAsInterview = {
2842
2864
  ...requeue,
@@ -2849,7 +2871,7 @@ ${handlers.length} left`);
2849
2871
  // Drop all messages that are not allowed in the wakeup queue
2850
2872
  // For all other messages, change the priority to wakeup
2851
2873
  return this.mayMoveToWakeupQueue(transaction)
2852
- ? transaction.priority === Constants_1.MessagePriority.NodeQuery
2874
+ ? transaction.priority === serial_1.MessagePriority.NodeQuery
2853
2875
  ? requeueAndTagAsInterview
2854
2876
  : requeue
2855
2877
  : reject;
@@ -3012,14 +3034,14 @@ ${handlers.length} left`);
3012
3034
  /** Returns the preferred constructor to use for singlecast SendData commands */
3013
3035
  getSendDataSinglecastConstructor() {
3014
3036
  var _a;
3015
- return ((_a = this._controller) === null || _a === void 0 ? void 0 : _a.isFunctionSupported(Constants_1.FunctionType.SendDataBridge))
3037
+ return ((_a = this._controller) === null || _a === void 0 ? void 0 : _a.isFunctionSupported(serial_1.FunctionType.SendDataBridge))
3016
3038
  ? SendDataBridgeMessages_1.SendDataBridgeRequest
3017
3039
  : SendDataMessages_1.SendDataRequest;
3018
3040
  }
3019
3041
  /** Returns the preferred constructor to use for multicast SendData commands */
3020
3042
  getSendDataMulticastConstructor() {
3021
3043
  var _a;
3022
- return ((_a = this._controller) === null || _a === void 0 ? void 0 : _a.isFunctionSupported(Constants_1.FunctionType.SendDataMulticastBridge))
3044
+ return ((_a = this._controller) === null || _a === void 0 ? void 0 : _a.isFunctionSupported(serial_1.FunctionType.SendDataMulticastBridge))
3023
3045
  ? SendDataBridgeMessages_1.SendDataMulticastBridgeRequest
3024
3046
  : SendDataMessages_1.SendDataMulticastRequest;
3025
3047
  }