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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +381 -266
  2. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  3. package/build/cjs/cc/AssociationCC.js +669 -503
  4. package/build/cjs/cc/AssociationCC.js.map +3 -3
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  7. package/build/cjs/cc/BarrierOperatorCC.js +595 -429
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  9. package/build/cjs/cc/BasicCC.js +354 -260
  10. package/build/cjs/cc/BasicCC.js.map +3 -3
  11. package/build/cjs/cc/BatteryCC.js +427 -345
  12. package/build/cjs/cc/BatteryCC.js.map +3 -3
  13. package/build/cjs/cc/BinarySensorCC.js +391 -276
  14. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  15. package/build/cjs/cc/BinarySwitchCC.js +347 -253
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.js +160 -85
  18. package/build/cjs/cc/CRC16CC.js.map +3 -3
  19. package/build/cjs/cc/CentralSceneCC.js +459 -324
  20. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  21. package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  23. package/build/cjs/cc/ClockCC.js +254 -150
  24. package/build/cjs/cc/ClockCC.js.map +3 -3
  25. package/build/cjs/cc/ColorSwitchCC.js +758 -610
  26. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  27. package/build/cjs/cc/ConfigurationCC.js +1700 -1453
  28. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  29. package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
  30. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  31. package/build/cjs/cc/DoorLockCC.js +904 -777
  32. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  33. package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
  34. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  35. package/build/cjs/cc/EnergyProductionCC.js +249 -160
  36. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  37. package/build/cjs/cc/EntryControlCC.js +619 -458
  38. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  39. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
  40. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  41. package/build/cjs/cc/HailCC.js +57 -11
  42. package/build/cjs/cc/HailCC.js.map +2 -2
  43. package/build/cjs/cc/HumidityControlModeCC.js +359 -233
  44. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  45. package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
  46. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  47. package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
  48. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  49. package/build/cjs/cc/InclusionControllerCC.js +205 -114
  50. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  51. package/build/cjs/cc/IndicatorCC.js +897 -736
  52. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  53. package/build/cjs/cc/IrrigationCC.js +1651 -1405
  54. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  55. package/build/cjs/cc/LanguageCC.js +268 -171
  56. package/build/cjs/cc/LanguageCC.js.map +3 -3
  57. package/build/cjs/cc/LockCC.js +254 -154
  58. package/build/cjs/cc/LockCC.js.map +3 -3
  59. package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
  60. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  61. package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
  62. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  63. package/build/cjs/cc/MeterCC.js +827 -707
  64. package/build/cjs/cc/MeterCC.js.map +3 -3
  65. package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
  66. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  67. package/build/cjs/cc/MultiChannelCC.js +1037 -819
  68. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  69. package/build/cjs/cc/MultiCommandCC.js +172 -97
  70. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  71. package/build/cjs/cc/MultilevelSensorCC.js +589 -449
  72. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  73. package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
  74. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  75. package/build/cjs/cc/NoOperationCC.js +89 -27
  76. package/build/cjs/cc/NoOperationCC.js.map +2 -2
  77. package/build/cjs/cc/NodeNamingCC.js +417 -277
  78. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  79. package/build/cjs/cc/NotificationCC.js +972 -818
  80. package/build/cjs/cc/NotificationCC.js.map +3 -3
  81. package/build/cjs/cc/PowerlevelCC.js +450 -303
  82. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  83. package/build/cjs/cc/ProtectionCC.js +686 -494
  84. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  85. package/build/cjs/cc/SceneActivationCC.js +165 -97
  86. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  87. package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
  88. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  89. package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
  90. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  91. package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
  92. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  93. package/build/cjs/cc/Security2CC.js +1483 -1219
  94. package/build/cjs/cc/Security2CC.js.map +3 -3
  95. package/build/cjs/cc/SecurityCC.js +839 -619
  96. package/build/cjs/cc/SecurityCC.js.map +3 -3
  97. package/build/cjs/cc/SoundSwitchCC.js +707 -515
  98. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  99. package/build/cjs/cc/SupervisionCC.js +327 -237
  100. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  101. package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
  102. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  103. package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
  104. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  105. package/build/cjs/cc/ThermostatModeCC.js +425 -302
  106. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  107. package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
  108. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  109. package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
  110. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  111. package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
  112. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  113. package/build/cjs/cc/TimeCC.js +515 -353
  114. package/build/cjs/cc/TimeCC.js.map +3 -3
  115. package/build/cjs/cc/TimeParametersCC.js +302 -202
  116. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  117. package/build/cjs/cc/TransportServiceCC.js +433 -315
  118. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  119. package/build/cjs/cc/UserCodeCC.js +1385 -1102
  120. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  121. package/build/cjs/cc/VersionCC.js +696 -562
  122. package/build/cjs/cc/VersionCC.js.map +3 -3
  123. package/build/cjs/cc/WakeUpCC.js +499 -346
  124. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  125. package/build/cjs/cc/WindowCoveringCC.js +626 -478
  126. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  127. package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
  128. package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
  129. package/build/cjs/cc/ZWavePlusCC.js +233 -159
  130. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  131. package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
  132. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  133. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  134. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  135. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
  136. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  137. package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
  138. package/build/cjs/lib/CommandClassDecorators.js +19 -20
  139. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  140. package/build/cjs/lib/Security2/Extension.d.ts +1 -1
  141. package/build/cjs/lib/Security2/Extension.js +217 -126
  142. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  143. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/AlarmSensorCC.js +389 -291
  145. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  146. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  147. package/build/esm/cc/AssociationCC.js +678 -537
  148. package/build/esm/cc/AssociationCC.js.map +1 -1
  149. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  150. package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
  151. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  152. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  153. package/build/esm/cc/BarrierOperatorCC.js +634 -493
  154. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  155. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  156. package/build/esm/cc/BasicCC.js +380 -302
  157. package/build/esm/cc/BasicCC.js.map +1 -1
  158. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  159. package/build/esm/cc/BatteryCC.js +449 -384
  160. package/build/esm/cc/BatteryCC.js.map +1 -1
  161. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  162. package/build/esm/cc/BinarySensorCC.js +395 -297
  163. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  164. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  165. package/build/esm/cc/BinarySwitchCC.js +353 -274
  166. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  167. package/build/esm/cc/CRC16CC.js +162 -98
  168. package/build/esm/cc/CRC16CC.js.map +1 -1
  169. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  170. package/build/esm/cc/CentralSceneCC.js +465 -351
  171. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  172. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  173. package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
  174. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  175. package/build/esm/cc/ClockCC.js +248 -159
  176. package/build/esm/cc/ClockCC.js.map +1 -1
  177. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  178. package/build/esm/cc/ColorSwitchCC.js +802 -677
  179. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  180. package/build/esm/cc/ConfigurationCC.js +1899 -1687
  181. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  182. package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
  183. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  184. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  185. package/build/esm/cc/DoorLockCC.js +951 -849
  186. package/build/esm/cc/DoorLockCC.js.map +1 -1
  187. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  188. package/build/esm/cc/DoorLockLoggingCC.js +316 -218
  189. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  190. package/build/esm/cc/EnergyProductionCC.js +240 -164
  191. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  192. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  193. package/build/esm/cc/EntryControlCC.js +629 -493
  194. package/build/esm/cc/EntryControlCC.js.map +1 -1
  195. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  196. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
  197. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  198. package/build/esm/cc/HailCC.js +51 -12
  199. package/build/esm/cc/HailCC.js.map +1 -1
  200. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  201. package/build/esm/cc/HumidityControlModeCC.js +357 -250
  202. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  203. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  204. package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
  205. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  206. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  207. package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
  208. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  209. package/build/esm/cc/InclusionControllerCC.js +197 -119
  210. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  211. package/build/esm/cc/IndicatorCC.js +973 -835
  212. package/build/esm/cc/IndicatorCC.js.map +1 -1
  213. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  214. package/build/esm/cc/IrrigationCC.js +1697 -1496
  215. package/build/esm/cc/IrrigationCC.js.map +1 -1
  216. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  217. package/build/esm/cc/LanguageCC.js +266 -184
  218. package/build/esm/cc/LanguageCC.js.map +1 -1
  219. package/build/esm/cc/LockCC.d.ts.map +1 -1
  220. package/build/esm/cc/LockCC.js +247 -162
  221. package/build/esm/cc/LockCC.js.map +1 -1
  222. package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
  223. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  224. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  225. package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
  226. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  227. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  228. package/build/esm/cc/MeterCC.js +896 -795
  229. package/build/esm/cc/MeterCC.js.map +1 -1
  230. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  231. package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
  232. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  233. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  234. package/build/esm/cc/MultiChannelCC.js +1106 -921
  235. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  236. package/build/esm/cc/MultiCommandCC.js +166 -102
  237. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  238. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  239. package/build/esm/cc/MultilevelSensorCC.js +616 -497
  240. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  241. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  242. package/build/esm/cc/MultilevelSwitchCC.js +621 -496
  243. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  244. package/build/esm/cc/NoOperationCC.js +82 -29
  245. package/build/esm/cc/NoOperationCC.js.map +1 -1
  246. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  247. package/build/esm/cc/NodeNamingCC.js +413 -294
  248. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  249. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  250. package/build/esm/cc/NotificationCC.js +1097 -966
  251. package/build/esm/cc/NotificationCC.js.map +1 -1
  252. package/build/esm/cc/PowerlevelCC.js +437 -311
  253. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  254. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  255. package/build/esm/cc/ProtectionCC.js +704 -543
  256. package/build/esm/cc/ProtectionCC.js.map +1 -1
  257. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  258. package/build/esm/cc/SceneActivationCC.js +157 -100
  259. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  260. package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
  261. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  262. package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
  263. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  264. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  265. package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
  266. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  267. package/build/esm/cc/Security2CC.js +1633 -1406
  268. package/build/esm/cc/Security2CC.js.map +1 -1
  269. package/build/esm/cc/SecurityCC.js +876 -687
  270. package/build/esm/cc/SecurityCC.js.map +1 -1
  271. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  272. package/build/esm/cc/SoundSwitchCC.js +689 -526
  273. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  274. package/build/esm/cc/SupervisionCC.js +349 -272
  275. package/build/esm/cc/SupervisionCC.js.map +1 -1
  276. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  277. package/build/esm/cc/ThermostatFanModeCC.js +388 -284
  278. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  279. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  280. package/build/esm/cc/ThermostatFanStateCC.js +184 -111
  281. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  282. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  283. package/build/esm/cc/ThermostatModeCC.js +435 -331
  284. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  285. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  286. package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
  287. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  288. package/build/esm/cc/ThermostatSetbackCC.js +274 -185
  289. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  290. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  291. package/build/esm/cc/ThermostatSetpointCC.js +674 -543
  292. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  293. package/build/esm/cc/TimeCC.js +499 -360
  294. package/build/esm/cc/TimeCC.js.map +1 -1
  295. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  296. package/build/esm/cc/TimeParametersCC.js +296 -211
  297. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  298. package/build/esm/cc/TransportServiceCC.js +464 -363
  299. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  300. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  301. package/build/esm/cc/UserCodeCC.js +1443 -1205
  302. package/build/esm/cc/UserCodeCC.js.map +1 -1
  303. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  304. package/build/esm/cc/VersionCC.js +744 -635
  305. package/build/esm/cc/VersionCC.js.map +1 -1
  306. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  307. package/build/esm/cc/WakeUpCC.js +494 -364
  308. package/build/esm/cc/WakeUpCC.js.map +1 -1
  309. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  310. package/build/esm/cc/WindowCoveringCC.js +655 -530
  311. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  312. package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
  313. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  314. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  315. package/build/esm/cc/ZWavePlusCC.js +223 -162
  316. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  317. package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
  318. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  319. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  320. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  321. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
  322. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  323. package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
  324. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  325. package/build/esm/lib/CommandClassDecorators.js +24 -24
  326. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  327. package/build/esm/lib/Security2/Extension.d.ts +1 -1
  328. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  329. package/build/esm/lib/Security2/Extension.js +207 -123
  330. package/build/esm/lib/Security2/Extension.js.map +1 -1
  331. package/package.json +6 -6
@@ -39,13 +39,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
39
39
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
40
40
  var import_Values = require("../lib/Values.js");
41
41
  var import_Types = require("../lib/_Types.js");
42
- var __decorate = function(decorators, target, key, desc) {
43
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
45
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
46
- return c > 3 && r && Object.defineProperty(target, key, r), r;
42
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
43
+ function accept(f) {
44
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
45
+ return f;
46
+ }
47
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
48
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
49
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
50
+ var _, done = false;
51
+ for (var i = decorators.length - 1; i >= 0; i--) {
52
+ var context = {};
53
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
54
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
55
+ context.addInitializer = function(f) {
56
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
57
+ extraInitializers.push(accept(f || null));
58
+ };
59
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
60
+ if (kind === "accessor") {
61
+ if (result === void 0) continue;
62
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
63
+ if (_ = accept(result.get)) descriptor.get = _;
64
+ if (_ = accept(result.set)) descriptor.set = _;
65
+ if (_ = accept(result.init)) initializers.unshift(_);
66
+ } else if (_ = accept(result)) {
67
+ if (kind === "field") initializers.unshift(_);
68
+ else descriptor[key] = _;
69
+ }
70
+ }
71
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
72
+ done = true;
73
+ };
74
+ var __runInitializers = function(thisArg, initializers, value) {
75
+ var useValue = arguments.length > 2;
76
+ for (var i = 0; i < initializers.length; i++) {
77
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
78
+ }
79
+ return useValue ? value : void 0;
47
80
  };
48
- var VersionCCReport_1, VersionCCCommandClassReport_1, VersionCCCommandClassGet_1, VersionCCCapabilitiesReport_1, VersionCCZWaveSoftwareReport_1;
49
81
  function __assertType(argName, typeName, boundHasError) {
50
82
  const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
51
83
  if (boundHasError()) {
@@ -205,612 +237,714 @@ function parseVersion(buffer) {
205
237
  return "unused";
206
238
  return `${buffer[0]}.${buffer[1]}.${buffer[2]}`;
207
239
  }
208
- let VersionCCAPI = class VersionCCAPI2 extends import_API.PhysicalCCAPI {
209
- supportsCommand(cmd) {
210
- switch (cmd) {
211
- case import_Types.VersionCommand.Get:
212
- case import_Types.VersionCommand.Report:
213
- case import_Types.VersionCommand.CommandClassGet:
214
- case import_Types.VersionCommand.CommandClassReport:
215
- return true;
216
- // This is mandatory
217
- case import_Types.VersionCommand.CapabilitiesGet:
218
- case import_Types.VersionCommand.CapabilitiesReport:
219
- case import_Types.VersionCommand.ZWaveSoftwareReport:
220
- return this.version >= 3;
221
- case import_Types.VersionCommand.ZWaveSoftwareGet: {
222
- return this.getValueDB().getValue(VersionCCValues.supportsZWaveSoftwareGet.endpoint(this.endpoint.index));
240
+ let VersionCCAPI = (() => {
241
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Version)];
242
+ let _classDescriptor;
243
+ let _classExtraInitializers = [];
244
+ let _classThis;
245
+ let _classSuper = import_API.PhysicalCCAPI;
246
+ var VersionCCAPI2 = class extends _classSuper {
247
+ static {
248
+ _classThis = this;
249
+ }
250
+ static {
251
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
252
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
253
+ VersionCCAPI2 = _classThis = _classDescriptor.value;
254
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
255
+ __runInitializers(_classThis, _classExtraInitializers);
256
+ }
257
+ supportsCommand(cmd) {
258
+ switch (cmd) {
259
+ case import_Types.VersionCommand.Get:
260
+ case import_Types.VersionCommand.Report:
261
+ case import_Types.VersionCommand.CommandClassGet:
262
+ case import_Types.VersionCommand.CommandClassReport:
263
+ return true;
264
+ // This is mandatory
265
+ case import_Types.VersionCommand.CapabilitiesGet:
266
+ case import_Types.VersionCommand.CapabilitiesReport:
267
+ case import_Types.VersionCommand.ZWaveSoftwareReport:
268
+ return this.version >= 3;
269
+ case import_Types.VersionCommand.ZWaveSoftwareGet: {
270
+ return this.getValueDB().getValue(VersionCCValues.supportsZWaveSoftwareGet.endpoint(this.endpoint.index));
271
+ }
223
272
  }
273
+ return super.supportsCommand(cmd);
224
274
  }
225
- return super.supportsCommand(cmd);
226
- }
227
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
228
- async get() {
229
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.Get);
230
- const cc = new VersionCCGet({
231
- nodeId: this.endpoint.nodeId,
232
- endpointIndex: this.endpoint.index
233
- });
234
- const response = await this.host.sendCommand(cc, this.commandOptions);
235
- if (response) {
236
- return (0, import_safe3.pick)(response, [
237
- "libraryType",
238
- "protocolVersion",
239
- "firmwareVersions",
240
- "hardwareVersion"
241
- ]);
275
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
276
+ async get() {
277
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.Get);
278
+ const cc = new VersionCCGet({
279
+ nodeId: this.endpoint.nodeId,
280
+ endpointIndex: this.endpoint.index
281
+ });
282
+ const response = await this.host.sendCommand(cc, this.commandOptions);
283
+ if (response) {
284
+ return (0, import_safe3.pick)(response, [
285
+ "libraryType",
286
+ "protocolVersion",
287
+ "firmwareVersions",
288
+ "hardwareVersion"
289
+ ]);
290
+ }
242
291
  }
243
- }
244
- async sendReport(options) {
245
- __assertType("options", "VersionCCReportOptions", __assertType__VersionCCReportOptions.bind(void 0, options));
246
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.Report);
247
- const cc = new VersionCCReport({
248
- nodeId: this.endpoint.nodeId,
249
- endpointIndex: this.endpoint.index,
250
- ...options
251
- });
252
- await this.host.sendCommand(cc, this.commandOptions);
253
- }
254
- async getCCVersion(requestedCC) {
255
- __assertType("requestedCC", "CommandClasses", __assertType__number.bind(void 0, requestedCC));
256
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CommandClassGet);
257
- const cc = new VersionCCCommandClassGet({
258
- nodeId: this.endpoint.nodeId,
259
- endpointIndex: this.endpoint.index,
260
- requestedCC
261
- });
262
- const response = await this.host.sendCommand(cc, this.commandOptions);
263
- return response?.ccVersion;
264
- }
265
- async reportCCVersion(requestedCC) {
266
- __assertType("requestedCC", "CommandClasses", __assertType__number.bind(void 0, requestedCC));
267
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CommandClassReport);
268
- let ccVersion;
269
- switch (requestedCC) {
270
- case import_safe.CommandClasses["Z-Wave Protocol"]:
271
- case import_safe.CommandClasses["Z-Wave Long Range"]:
272
- ccVersion = 0;
273
- break;
274
- case import_safe.CommandClasses.Hail:
275
- case import_safe.CommandClasses["Manufacturer Proprietary"]:
276
- ccVersion = 0;
277
- break;
278
- default:
279
- ccVersion = (0, import_CommandClassDecorators.getImplementedVersion)(requestedCC);
280
- break;
281
- }
282
- const cc = new VersionCCCommandClassReport({
283
- nodeId: this.endpoint.nodeId,
284
- endpointIndex: this.endpoint.index,
285
- requestedCC,
286
- ccVersion
287
- });
288
- await this.host.sendCommand(cc, this.commandOptions);
289
- }
290
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
291
- async getCapabilities() {
292
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CapabilitiesGet);
293
- const cc = new VersionCCCapabilitiesGet({
294
- nodeId: this.endpoint.nodeId,
295
- endpointIndex: this.endpoint.index
296
- });
297
- const response = await this.host.sendCommand(cc, this.commandOptions);
298
- if (response) {
299
- return (0, import_safe3.pick)(response, ["supportsZWaveSoftwareGet"]);
292
+ async sendReport(options) {
293
+ __assertType("options", "VersionCCReportOptions", __assertType__VersionCCReportOptions.bind(void 0, options));
294
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.Report);
295
+ const cc = new VersionCCReport({
296
+ nodeId: this.endpoint.nodeId,
297
+ endpointIndex: this.endpoint.index,
298
+ ...options
299
+ });
300
+ await this.host.sendCommand(cc, this.commandOptions);
300
301
  }
301
- }
302
- async reportCapabilities() {
303
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CapabilitiesReport);
304
- const cc = new VersionCCCapabilitiesReport({
305
- nodeId: this.endpoint.nodeId,
306
- endpointIndex: this.endpoint.index,
307
- // At this time, we do not support responding to Z-Wave Software Get
308
- supportsZWaveSoftwareGet: false
309
- });
310
- await this.host.sendCommand(cc, this.commandOptions);
311
- }
312
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
313
- async getZWaveSoftware() {
314
- this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.ZWaveSoftwareGet);
315
- const cc = new VersionCCZWaveSoftwareGet({
316
- nodeId: this.endpoint.nodeId,
317
- endpointIndex: this.endpoint.index
318
- });
319
- const response = await this.host.sendCommand(cc, this.commandOptions);
320
- if (response) {
321
- return (0, import_safe3.pick)(response, [
322
- "sdkVersion",
323
- "applicationFrameworkAPIVersion",
324
- "applicationFrameworkBuildNumber",
325
- "hostInterfaceVersion",
326
- "hostInterfaceBuildNumber",
327
- "zWaveProtocolVersion",
328
- "zWaveProtocolBuildNumber",
329
- "applicationVersion",
330
- "applicationBuildNumber"
331
- ]);
302
+ async getCCVersion(requestedCC) {
303
+ __assertType("requestedCC", "CommandClasses", __assertType__number.bind(void 0, requestedCC));
304
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CommandClassGet);
305
+ const cc = new VersionCCCommandClassGet({
306
+ nodeId: this.endpoint.nodeId,
307
+ endpointIndex: this.endpoint.index,
308
+ requestedCC
309
+ });
310
+ const response = await this.host.sendCommand(cc, this.commandOptions);
311
+ return response?.ccVersion;
332
312
  }
333
- }
334
- };
335
- VersionCCAPI = __decorate([
336
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Version)
337
- ], VersionCCAPI);
338
- let VersionCC = class VersionCC2 extends import_CommandClass.CommandClass {
339
- determineRequiredCCInterviews() {
340
- return [import_safe.CommandClasses["Manufacturer Specific"]];
341
- }
342
- async interview(ctx) {
343
- const node = this.getNode(ctx);
344
- const endpoint = this.getEndpoint(ctx);
345
- const api = import_API.CCAPI.create(import_safe.CommandClasses.Version, ctx, node).withOptions({
346
- priority: import_safe.MessagePriority.NodeQuery
347
- });
348
- ctx.logNode(node.id, {
349
- endpoint: this.endpointIndex,
350
- message: `Interviewing ${this.ccName}...`,
351
- direction: "none"
352
- });
353
- const queryCCVersion = async (cc) => {
354
- const maxImplemented = (0, import_CommandClassDecorators.getImplementedVersion)(cc);
355
- if (maxImplemented === 0) {
356
- ctx.logNode(node.id, ` skipping query for ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}) because max implemented version is ${maxImplemented}`);
357
- return;
313
+ async reportCCVersion(requestedCC) {
314
+ __assertType("requestedCC", "CommandClasses", __assertType__number.bind(void 0, requestedCC));
315
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CommandClassReport);
316
+ let ccVersion;
317
+ switch (requestedCC) {
318
+ case import_safe.CommandClasses["Z-Wave Protocol"]:
319
+ case import_safe.CommandClasses["Z-Wave Long Range"]:
320
+ ccVersion = 0;
321
+ break;
322
+ case import_safe.CommandClasses.Hail:
323
+ case import_safe.CommandClasses["Manufacturer Proprietary"]:
324
+ ccVersion = 0;
325
+ break;
326
+ default:
327
+ ccVersion = (0, import_CommandClassDecorators.getImplementedVersion)(requestedCC);
328
+ break;
329
+ }
330
+ const cc = new VersionCCCommandClassReport({
331
+ nodeId: this.endpoint.nodeId,
332
+ endpointIndex: this.endpoint.index,
333
+ requestedCC,
334
+ ccVersion
335
+ });
336
+ await this.host.sendCommand(cc, this.commandOptions);
337
+ }
338
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
339
+ async getCapabilities() {
340
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CapabilitiesGet);
341
+ const cc = new VersionCCCapabilitiesGet({
342
+ nodeId: this.endpoint.nodeId,
343
+ endpointIndex: this.endpoint.index
344
+ });
345
+ const response = await this.host.sendCommand(cc, this.commandOptions);
346
+ if (response) {
347
+ return (0, import_safe3.pick)(response, ["supportsZWaveSoftwareGet"]);
348
+ }
349
+ }
350
+ async reportCapabilities() {
351
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CapabilitiesReport);
352
+ const cc = new VersionCCCapabilitiesReport({
353
+ nodeId: this.endpoint.nodeId,
354
+ endpointIndex: this.endpoint.index,
355
+ // At this time, we do not support responding to Z-Wave Software Get
356
+ supportsZWaveSoftwareGet: false
357
+ });
358
+ await this.host.sendCommand(cc, this.commandOptions);
359
+ }
360
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
361
+ async getZWaveSoftware() {
362
+ this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.ZWaveSoftwareGet);
363
+ const cc = new VersionCCZWaveSoftwareGet({
364
+ nodeId: this.endpoint.nodeId,
365
+ endpointIndex: this.endpoint.index
366
+ });
367
+ const response = await this.host.sendCommand(cc, this.commandOptions);
368
+ if (response) {
369
+ return (0, import_safe3.pick)(response, [
370
+ "sdkVersion",
371
+ "applicationFrameworkAPIVersion",
372
+ "applicationFrameworkBuildNumber",
373
+ "hostInterfaceVersion",
374
+ "hostInterfaceBuildNumber",
375
+ "zWaveProtocolVersion",
376
+ "zWaveProtocolBuildNumber",
377
+ "applicationVersion",
378
+ "applicationBuildNumber"
379
+ ]);
358
380
  }
381
+ }
382
+ };
383
+ return VersionCCAPI2 = _classThis;
384
+ })();
385
+ let VersionCC = (() => {
386
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Version), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(VersionCCValues)];
387
+ let _classDescriptor;
388
+ let _classExtraInitializers = [];
389
+ let _classThis;
390
+ let _classSuper = import_CommandClass.CommandClass;
391
+ var VersionCC2 = class extends _classSuper {
392
+ static {
393
+ _classThis = this;
394
+ }
395
+ static {
396
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
397
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
398
+ VersionCC2 = _classThis = _classDescriptor.value;
399
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
400
+ __runInitializers(_classThis, _classExtraInitializers);
401
+ }
402
+ determineRequiredCCInterviews() {
403
+ return [import_safe.CommandClasses["Manufacturer Specific"]];
404
+ }
405
+ async interview(ctx) {
406
+ const node = this.getNode(ctx);
407
+ const endpoint = this.getEndpoint(ctx);
408
+ const api = import_API.CCAPI.create(import_safe.CommandClasses.Version, ctx, node).withOptions({
409
+ priority: import_safe.MessagePriority.NodeQuery
410
+ });
359
411
  ctx.logNode(node.id, {
360
412
  endpoint: this.endpointIndex,
361
- message: ` querying the CC version for ${(0, import_safe.getCCName)(cc)}...`,
362
- direction: "outbound"
413
+ message: `Interviewing ${this.ccName}...`,
414
+ direction: "none"
363
415
  });
364
- const supportedVersion = await api.getCCVersion(cc);
365
- if (supportedVersion != void 0) {
366
- let logMessage;
367
- if (supportedVersion > 0) {
368
- if (cc === import_safe.CommandClasses.Basic) {
369
- endpoint.addCC(cc, { version: supportedVersion });
370
- } else {
371
- endpoint.addCC(cc, {
372
- isSupported: true,
373
- version: supportedVersion
374
- });
375
- }
376
- logMessage = ` supports CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}) in version ${supportedVersion}`;
377
- } else {
378
- if (cc === import_safe.CommandClasses.Version || cc === import_safe.CommandClasses["Manufacturer Specific"]) {
379
- logMessage = ` claims NOT to support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}), but it must. Assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`;
380
- endpoint.addCC(cc, { version: 1 });
381
- } else if (cc === import_safe.CommandClasses.Security && node.hasSecurityClass(import_safe.SecurityClass.S0_Legacy) || cc === import_safe.CommandClasses["Security 2"] && import_safe.securityClassOrder.some((sc) => (0, import_safe.securityClassIsS2)(sc) && node.hasSecurityClass(sc))) {
382
- logMessage = ` claims NOT to support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}), but it is known to support it. Assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`;
383
- endpoint.addCC(cc, { version: 1 });
384
- } else {
385
- logMessage = ` does NOT support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)})`;
386
- endpoint.removeCC(cc);
387
- }
416
+ const queryCCVersion = async (cc) => {
417
+ const maxImplemented = (0, import_CommandClassDecorators.getImplementedVersion)(cc);
418
+ if (maxImplemented === 0) {
419
+ ctx.logNode(node.id, ` skipping query for ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}) because max implemented version is ${maxImplemented}`);
420
+ return;
388
421
  }
389
422
  ctx.logNode(node.id, {
390
423
  endpoint: this.endpointIndex,
391
- message: logMessage
424
+ message: ` querying the CC version for ${(0, import_safe.getCCName)(cc)}...`,
425
+ direction: "outbound"
392
426
  });
393
- } else {
427
+ const supportedVersion = await api.getCCVersion(cc);
428
+ if (supportedVersion != void 0) {
429
+ let logMessage;
430
+ if (supportedVersion > 0) {
431
+ if (cc === import_safe.CommandClasses.Basic) {
432
+ endpoint.addCC(cc, { version: supportedVersion });
433
+ } else {
434
+ endpoint.addCC(cc, {
435
+ isSupported: true,
436
+ version: supportedVersion
437
+ });
438
+ }
439
+ logMessage = ` supports CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}) in version ${supportedVersion}`;
440
+ } else {
441
+ if (cc === import_safe.CommandClasses.Version || cc === import_safe.CommandClasses["Manufacturer Specific"]) {
442
+ logMessage = ` claims NOT to support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}), but it must. Assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`;
443
+ endpoint.addCC(cc, { version: 1 });
444
+ } else if (cc === import_safe.CommandClasses.Security && node.hasSecurityClass(import_safe.SecurityClass.S0_Legacy) || cc === import_safe.CommandClasses["Security 2"] && import_safe.securityClassOrder.some((sc) => (0, import_safe.securityClassIsS2)(sc) && node.hasSecurityClass(sc))) {
445
+ logMessage = ` claims NOT to support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)}), but it is known to support it. Assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`;
446
+ endpoint.addCC(cc, { version: 1 });
447
+ } else {
448
+ logMessage = ` does NOT support CC ${import_safe.CommandClasses[cc]} (${(0, import_safe3.num2hex)(cc)})`;
449
+ endpoint.removeCC(cc);
450
+ }
451
+ }
452
+ ctx.logNode(node.id, {
453
+ endpoint: this.endpointIndex,
454
+ message: logMessage
455
+ });
456
+ } else {
457
+ ctx.logNode(node.id, {
458
+ endpoint: this.endpointIndex,
459
+ message: `CC version query for ${(0, import_safe.getCCName)(cc)} timed out - assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`,
460
+ level: "warn"
461
+ });
462
+ endpoint.addCC(cc, { version: 1 });
463
+ }
464
+ };
465
+ if (this.endpointIndex === 0) {
466
+ await queryCCVersion(import_safe.CommandClasses.Version);
394
467
  ctx.logNode(node.id, {
395
468
  endpoint: this.endpointIndex,
396
- message: `CC version query for ${(0, import_safe.getCCName)(cc)} timed out - assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`,
397
- level: "warn"
469
+ message: "querying node versions...",
470
+ direction: "outbound"
398
471
  });
399
- endpoint.addCC(cc, { version: 1 });
400
- }
401
- };
402
- if (this.endpointIndex === 0) {
403
- await queryCCVersion(import_safe.CommandClasses.Version);
404
- ctx.logNode(node.id, {
405
- endpoint: this.endpointIndex,
406
- message: "querying node versions...",
407
- direction: "outbound"
408
- });
409
- const versionGetResponse = await api.get();
410
- if (versionGetResponse) {
411
- let logMessage = `received response for node versions:
472
+ const versionGetResponse = await api.get();
473
+ if (versionGetResponse) {
474
+ let logMessage = `received response for node versions:
412
475
  library type: ${import_safe.ZWaveLibraryTypes[versionGetResponse.libraryType]} (${(0, import_safe3.num2hex)(versionGetResponse.libraryType)})
413
476
  protocol version: ${versionGetResponse.protocolVersion}
414
477
  firmware versions: ${versionGetResponse.firmwareVersions.join(", ")}`;
415
- if (versionGetResponse.hardwareVersion != void 0) {
416
- logMessage += `
478
+ if (versionGetResponse.hardwareVersion != void 0) {
479
+ logMessage += `
417
480
  hardware version: ${versionGetResponse.hardwareVersion}`;
481
+ }
482
+ ctx.logNode(node.id, {
483
+ endpoint: this.endpointIndex,
484
+ message: logMessage,
485
+ direction: "inbound"
486
+ });
418
487
  }
419
- ctx.logNode(node.id, {
420
- endpoint: this.endpointIndex,
421
- message: logMessage,
422
- direction: "inbound"
423
- });
424
488
  }
425
- }
426
- ctx.logNode(node.id, {
427
- endpoint: this.endpointIndex,
428
- message: "querying CC versions...",
429
- direction: "outbound"
430
- });
431
- {
432
- const cc = import_safe.CommandClasses.Basic;
433
- if (this.endpointIndex === 0 || node.getCCVersion(cc) === 0) {
434
- await queryCCVersion(cc);
435
- }
436
- }
437
- for (const [cc] of endpoint.getCCs()) {
438
- if (cc === import_safe.CommandClasses.Version)
439
- continue;
440
- if (cc === import_safe.CommandClasses.Basic)
441
- continue;
442
- if (this.endpointIndex > 0 && node.getCCVersion(cc) > 0)
443
- continue;
444
- await queryCCVersion(cc);
445
- }
446
- if (this.endpointIndex === 0 && api.version >= 3) {
447
489
  ctx.logNode(node.id, {
448
490
  endpoint: this.endpointIndex,
449
- message: "querying if Z-Wave Software Get is supported...",
491
+ message: "querying CC versions...",
450
492
  direction: "outbound"
451
493
  });
452
- const capsResponse = await api.getCapabilities();
453
- if (capsResponse) {
454
- const { supportsZWaveSoftwareGet } = capsResponse;
494
+ {
495
+ const cc = import_safe.CommandClasses.Basic;
496
+ if (this.endpointIndex === 0 || node.getCCVersion(cc) === 0) {
497
+ await queryCCVersion(cc);
498
+ }
499
+ }
500
+ for (const [cc] of endpoint.getCCs()) {
501
+ if (cc === import_safe.CommandClasses.Version)
502
+ continue;
503
+ if (cc === import_safe.CommandClasses.Basic)
504
+ continue;
505
+ if (this.endpointIndex > 0 && node.getCCVersion(cc) > 0)
506
+ continue;
507
+ await queryCCVersion(cc);
508
+ }
509
+ if (this.endpointIndex === 0 && api.version >= 3) {
455
510
  ctx.logNode(node.id, {
456
511
  endpoint: this.endpointIndex,
457
- message: `Z-Wave Software Get is${supportsZWaveSoftwareGet ? "" : " not"} supported`,
458
- direction: "inbound"
512
+ message: "querying if Z-Wave Software Get is supported...",
513
+ direction: "outbound"
459
514
  });
460
- if (supportsZWaveSoftwareGet) {
461
- ctx.logNode(node.id, {
462
- endpoint: this.endpointIndex,
463
- message: "querying Z-Wave software versions...",
464
- direction: "outbound"
465
- });
466
- await api.getZWaveSoftware();
515
+ const capsResponse = await api.getCapabilities();
516
+ if (capsResponse) {
517
+ const { supportsZWaveSoftwareGet } = capsResponse;
467
518
  ctx.logNode(node.id, {
468
519
  endpoint: this.endpointIndex,
469
- message: "received Z-Wave software versions",
520
+ message: `Z-Wave Software Get is${supportsZWaveSoftwareGet ? "" : " not"} supported`,
470
521
  direction: "inbound"
471
522
  });
523
+ if (supportsZWaveSoftwareGet) {
524
+ ctx.logNode(node.id, {
525
+ endpoint: this.endpointIndex,
526
+ message: "querying Z-Wave software versions...",
527
+ direction: "outbound"
528
+ });
529
+ await api.getZWaveSoftware();
530
+ ctx.logNode(node.id, {
531
+ endpoint: this.endpointIndex,
532
+ message: "received Z-Wave software versions",
533
+ direction: "inbound"
534
+ });
535
+ }
472
536
  }
473
537
  }
538
+ this.setInterviewComplete(ctx, true);
474
539
  }
475
- this.setInterviewComplete(ctx, true);
476
- }
477
- };
478
- VersionCC = __decorate([
479
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Version),
480
- (0, import_CommandClassDecorators.implementedVersion)(3),
481
- (0, import_CommandClassDecorators.ccValues)(VersionCCValues)
482
- ], VersionCC);
483
- let VersionCCReport = VersionCCReport_1 = class VersionCCReport2 extends VersionCC {
484
- constructor(options) {
485
- super(options);
486
- if (!/^\d+\.\d+(\.\d+)?$/.test(options.protocolVersion)) {
487
- throw new import_safe.ZWaveError(`protocolVersion must be a string in the format "major.minor" or "major.minor.patch", received "${options.protocolVersion}"`, import_safe.ZWaveErrorCodes.Argument_Invalid);
488
- } else if (!options.firmwareVersions.every((fw) => /^\d+\.\d+(\.\d+)?$/.test(fw))) {
489
- throw new import_safe.ZWaveError(`firmwareVersions must be an array of strings in the format "major.minor" or "major.minor.patch", received "${JSON.stringify(options.firmwareVersions)}"`, import_safe.ZWaveErrorCodes.Argument_Invalid);
490
- }
491
- this.libraryType = options.libraryType;
492
- this.protocolVersion = options.protocolVersion;
493
- this.firmwareVersions = options.firmwareVersions;
494
- this.hardwareVersion = options.hardwareVersion;
495
- }
496
- static from(raw, ctx) {
497
- (0, import_safe.validatePayload)(raw.payload.length >= 5);
498
- const libraryType = raw.payload[0];
499
- const protocolVersion = `${raw.payload[1]}.${raw.payload[2]}`;
500
- const firmwareVersions = [`${raw.payload[3]}.${raw.payload[4]}`];
501
- let hardwareVersion;
502
- if (raw.payload.length >= 7) {
503
- hardwareVersion = raw.payload[5];
504
- const additionalFirmwares = raw.payload[6];
505
- (0, import_safe.validatePayload)(raw.payload.length >= 7 + 2 * additionalFirmwares);
506
- for (let i = 0; i < additionalFirmwares; i++) {
507
- firmwareVersions.push(`${raw.payload[7 + 2 * i]}.${raw.payload[7 + 2 * i + 1]}`);
540
+ };
541
+ return VersionCC2 = _classThis;
542
+ })();
543
+ let VersionCCReport = (() => {
544
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("libraryType", VersionCCValues.libraryType), (0, import_CommandClassDecorators.ccValueProperty)("protocolVersion", VersionCCValues.protocolVersion), (0, import_CommandClassDecorators.ccValueProperty)("firmwareVersions", VersionCCValues.firmwareVersions), (0, import_CommandClassDecorators.ccValueProperty)("hardwareVersion", VersionCCValues.hardwareVersion)];
545
+ let _classDescriptor;
546
+ let _classExtraInitializers = [];
547
+ let _classThis;
548
+ let _classSuper = VersionCC;
549
+ var VersionCCReport2 = class extends _classSuper {
550
+ static {
551
+ _classThis = this;
552
+ }
553
+ static {
554
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
555
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
556
+ VersionCCReport2 = _classThis = _classDescriptor.value;
557
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
558
+ __runInitializers(_classThis, _classExtraInitializers);
559
+ }
560
+ constructor(options) {
561
+ super(options);
562
+ if (!/^\d+\.\d+(\.\d+)?$/.test(options.protocolVersion)) {
563
+ throw new import_safe.ZWaveError(`protocolVersion must be a string in the format "major.minor" or "major.minor.patch", received "${options.protocolVersion}"`, import_safe.ZWaveErrorCodes.Argument_Invalid);
564
+ } else if (!options.firmwareVersions.every((fw) => /^\d+\.\d+(\.\d+)?$/.test(fw))) {
565
+ throw new import_safe.ZWaveError(`firmwareVersions must be an array of strings in the format "major.minor" or "major.minor.patch", received "${JSON.stringify(options.firmwareVersions)}"`, import_safe.ZWaveErrorCodes.Argument_Invalid);
508
566
  }
567
+ this.libraryType = options.libraryType;
568
+ this.protocolVersion = options.protocolVersion;
569
+ this.firmwareVersions = options.firmwareVersions;
570
+ this.hardwareVersion = options.hardwareVersion;
509
571
  }
510
- return new VersionCCReport_1({
511
- nodeId: ctx.sourceNodeId,
512
- libraryType,
513
- protocolVersion,
514
- firmwareVersions,
515
- hardwareVersion
516
- });
517
- }
518
- libraryType;
519
- protocolVersion;
520
- firmwareVersions;
521
- hardwareVersion;
522
- serialize(ctx) {
523
- this.payload = import_safe2.Bytes.from([
524
- this.libraryType,
525
- ...this.protocolVersion.split(".").map((n) => parseInt(n)).slice(0, 2),
526
- ...this.firmwareVersions[0].split(".").map((n) => parseInt(n)).slice(0, 2),
527
- this.hardwareVersion ?? 0,
528
- this.firmwareVersions.length - 1
529
- ]);
530
- if (this.firmwareVersions.length > 1) {
531
- const firmwaresBuffer = new import_safe2.Bytes((this.firmwareVersions.length - 1) * 2);
532
- for (let i = 1; i < this.firmwareVersions.length; i++) {
533
- const [major, minor] = this.firmwareVersions[i].split(".").map((n) => parseInt(n));
534
- firmwaresBuffer[2 * (i - 1)] = major;
535
- firmwaresBuffer[2 * (i - 1) + 1] = minor;
572
+ static from(raw, ctx) {
573
+ (0, import_safe.validatePayload)(raw.payload.length >= 5);
574
+ const libraryType = raw.payload[0];
575
+ const protocolVersion = `${raw.payload[1]}.${raw.payload[2]}`;
576
+ const firmwareVersions = [`${raw.payload[3]}.${raw.payload[4]}`];
577
+ let hardwareVersion;
578
+ if (raw.payload.length >= 7) {
579
+ hardwareVersion = raw.payload[5];
580
+ const additionalFirmwares = raw.payload[6];
581
+ (0, import_safe.validatePayload)(raw.payload.length >= 7 + 2 * additionalFirmwares);
582
+ for (let i = 0; i < additionalFirmwares; i++) {
583
+ firmwareVersions.push(`${raw.payload[7 + 2 * i]}.${raw.payload[7 + 2 * i + 1]}`);
584
+ }
536
585
  }
537
- this.payload = import_safe2.Bytes.concat([this.payload, firmwaresBuffer]);
586
+ return new this({
587
+ nodeId: ctx.sourceNodeId,
588
+ libraryType,
589
+ protocolVersion,
590
+ firmwareVersions,
591
+ hardwareVersion
592
+ });
538
593
  }
539
- return super.serialize(ctx);
540
- }
541
- toLogEntry(ctx) {
542
- const message = {
543
- "library type": (0, import_safe3.getEnumMemberName)(import_safe.ZWaveLibraryTypes, this.libraryType),
544
- "protocol version": this.protocolVersion,
545
- "firmware versions": this.firmwareVersions.join(", ")
546
- };
547
- if (this.hardwareVersion != void 0) {
548
- message["hardware version"] = this.hardwareVersion;
594
+ libraryType;
595
+ protocolVersion;
596
+ firmwareVersions;
597
+ hardwareVersion;
598
+ serialize(ctx) {
599
+ this.payload = import_safe2.Bytes.from([
600
+ this.libraryType,
601
+ ...this.protocolVersion.split(".").map((n) => parseInt(n)).slice(0, 2),
602
+ ...this.firmwareVersions[0].split(".").map((n) => parseInt(n)).slice(0, 2),
603
+ this.hardwareVersion ?? 0,
604
+ this.firmwareVersions.length - 1
605
+ ]);
606
+ if (this.firmwareVersions.length > 1) {
607
+ const firmwaresBuffer = new import_safe2.Bytes((this.firmwareVersions.length - 1) * 2);
608
+ for (let i = 1; i < this.firmwareVersions.length; i++) {
609
+ const [major, minor] = this.firmwareVersions[i].split(".").map((n) => parseInt(n));
610
+ firmwaresBuffer[2 * (i - 1)] = major;
611
+ firmwaresBuffer[2 * (i - 1) + 1] = minor;
612
+ }
613
+ this.payload = import_safe2.Bytes.concat([this.payload, firmwaresBuffer]);
614
+ }
615
+ return super.serialize(ctx);
549
616
  }
550
- return {
551
- ...super.toLogEntry(ctx),
552
- message
553
- };
554
- }
555
- };
556
- __decorate([
557
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.libraryType)
558
- ], VersionCCReport.prototype, "libraryType", void 0);
559
- __decorate([
560
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.protocolVersion)
561
- ], VersionCCReport.prototype, "protocolVersion", void 0);
562
- __decorate([
563
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.firmwareVersions)
564
- ], VersionCCReport.prototype, "firmwareVersions", void 0);
565
- __decorate([
566
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.hardwareVersion)
567
- ], VersionCCReport.prototype, "hardwareVersion", void 0);
568
- VersionCCReport = VersionCCReport_1 = __decorate([
569
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.Report)
570
- ], VersionCCReport);
571
- let VersionCCGet = class VersionCCGet2 extends VersionCC {
572
- };
573
- VersionCCGet = __decorate([
574
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.Get),
575
- (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCReport)
576
- ], VersionCCGet);
577
- let VersionCCCommandClassReport = VersionCCCommandClassReport_1 = class VersionCCCommandClassReport2 extends VersionCC {
578
- constructor(options) {
579
- super(options);
580
- this.requestedCC = options.requestedCC;
581
- this.ccVersion = options.ccVersion;
582
- }
583
- static from(raw, ctx) {
584
- (0, import_safe.validatePayload)(raw.payload.length >= 2);
585
- const requestedCC = raw.payload[0];
586
- const ccVersion = raw.payload[1];
587
- return new VersionCCCommandClassReport_1({
588
- nodeId: ctx.sourceNodeId,
589
- requestedCC,
590
- ccVersion
591
- });
592
- }
593
- ccVersion;
594
- requestedCC;
595
- serialize(ctx) {
596
- this.payload = import_safe2.Bytes.from([this.requestedCC, this.ccVersion]);
597
- return super.serialize(ctx);
598
- }
599
- toLogEntry(ctx) {
600
- return {
601
- ...super.toLogEntry(ctx),
602
- message: {
603
- CC: (0, import_safe.getCCName)(this.requestedCC),
604
- version: this.ccVersion
617
+ toLogEntry(ctx) {
618
+ const message = {
619
+ "library type": (0, import_safe3.getEnumMemberName)(import_safe.ZWaveLibraryTypes, this.libraryType),
620
+ "protocol version": this.protocolVersion,
621
+ "firmware versions": this.firmwareVersions.join(", ")
622
+ };
623
+ if (this.hardwareVersion != void 0) {
624
+ message["hardware version"] = this.hardwareVersion;
605
625
  }
606
- };
607
- }
608
- };
609
- VersionCCCommandClassReport = VersionCCCommandClassReport_1 = __decorate([
610
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CommandClassReport)
611
- ], VersionCCCommandClassReport);
626
+ return {
627
+ ...super.toLogEntry(ctx),
628
+ message
629
+ };
630
+ }
631
+ };
632
+ return VersionCCReport2 = _classThis;
633
+ })();
634
+ let VersionCCGet = (() => {
635
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCReport)];
636
+ let _classDescriptor;
637
+ let _classExtraInitializers = [];
638
+ let _classThis;
639
+ let _classSuper = VersionCC;
640
+ var VersionCCGet2 = class extends _classSuper {
641
+ static {
642
+ _classThis = this;
643
+ }
644
+ static {
645
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
646
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
647
+ VersionCCGet2 = _classThis = _classDescriptor.value;
648
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
649
+ __runInitializers(_classThis, _classExtraInitializers);
650
+ }
651
+ };
652
+ return VersionCCGet2 = _classThis;
653
+ })();
654
+ let VersionCCCommandClassReport = (() => {
655
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CommandClassReport)];
656
+ let _classDescriptor;
657
+ let _classExtraInitializers = [];
658
+ let _classThis;
659
+ let _classSuper = VersionCC;
660
+ var VersionCCCommandClassReport2 = class extends _classSuper {
661
+ static {
662
+ _classThis = this;
663
+ }
664
+ static {
665
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
666
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
667
+ VersionCCCommandClassReport2 = _classThis = _classDescriptor.value;
668
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
669
+ __runInitializers(_classThis, _classExtraInitializers);
670
+ }
671
+ constructor(options) {
672
+ super(options);
673
+ this.requestedCC = options.requestedCC;
674
+ this.ccVersion = options.ccVersion;
675
+ }
676
+ static from(raw, ctx) {
677
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
678
+ const requestedCC = raw.payload[0];
679
+ const ccVersion = raw.payload[1];
680
+ return new this({
681
+ nodeId: ctx.sourceNodeId,
682
+ requestedCC,
683
+ ccVersion
684
+ });
685
+ }
686
+ ccVersion;
687
+ requestedCC;
688
+ serialize(ctx) {
689
+ this.payload = import_safe2.Bytes.from([this.requestedCC, this.ccVersion]);
690
+ return super.serialize(ctx);
691
+ }
692
+ toLogEntry(ctx) {
693
+ return {
694
+ ...super.toLogEntry(ctx),
695
+ message: {
696
+ CC: (0, import_safe.getCCName)(this.requestedCC),
697
+ version: this.ccVersion
698
+ }
699
+ };
700
+ }
701
+ };
702
+ return VersionCCCommandClassReport2 = _classThis;
703
+ })();
612
704
  function testResponseForVersionCommandClassGet(sent, received) {
613
705
  return sent.requestedCC === received.requestedCC;
614
706
  }
615
- let VersionCCCommandClassGet = VersionCCCommandClassGet_1 = class VersionCCCommandClassGet2 extends VersionCC {
616
- constructor(options) {
617
- super(options);
618
- this.requestedCC = options.requestedCC;
619
- }
620
- static from(raw, ctx) {
621
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
622
- const requestedCC = raw.payload[0];
623
- return new VersionCCCommandClassGet_1({
624
- nodeId: ctx.sourceNodeId,
625
- requestedCC
626
- });
627
- }
628
- requestedCC;
629
- serialize(ctx) {
630
- this.payload = import_safe2.Bytes.from([this.requestedCC]);
631
- return super.serialize(ctx);
632
- }
633
- toLogEntry(ctx) {
634
- return {
635
- ...super.toLogEntry(ctx),
636
- message: { CC: (0, import_safe.getCCName)(this.requestedCC) }
637
- };
638
- }
639
- };
640
- VersionCCCommandClassGet = VersionCCCommandClassGet_1 = __decorate([
641
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CommandClassGet),
642
- (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCCommandClassReport, testResponseForVersionCommandClassGet)
643
- ], VersionCCCommandClassGet);
644
- let VersionCCCapabilitiesReport = VersionCCCapabilitiesReport_1 = class VersionCCCapabilitiesReport2 extends VersionCC {
645
- constructor(options) {
646
- super(options);
647
- this.supportsZWaveSoftwareGet = options.supportsZWaveSoftwareGet;
648
- }
649
- static from(raw, ctx) {
650
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
651
- const capabilities = raw.payload[0];
652
- const supportsZWaveSoftwareGet = !!(capabilities & 4);
653
- return new VersionCCCapabilitiesReport_1({
654
- nodeId: ctx.sourceNodeId,
655
- supportsZWaveSoftwareGet
656
- });
657
- }
658
- supportsZWaveSoftwareGet;
659
- serialize(ctx) {
660
- this.payload = import_safe2.Bytes.from([
661
- (this.supportsZWaveSoftwareGet ? 4 : 0) | 3
662
- ]);
663
- return super.serialize(ctx);
664
- }
665
- toLogEntry(ctx) {
666
- return {
667
- ...super.toLogEntry(ctx),
668
- message: {
669
- "supports Z-Wave Software Get command": this.supportsZWaveSoftwareGet
707
+ let VersionCCCommandClassGet = (() => {
708
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CommandClassGet), (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCCommandClassReport, testResponseForVersionCommandClassGet)];
709
+ let _classDescriptor;
710
+ let _classExtraInitializers = [];
711
+ let _classThis;
712
+ let _classSuper = VersionCC;
713
+ var VersionCCCommandClassGet2 = class extends _classSuper {
714
+ static {
715
+ _classThis = this;
716
+ }
717
+ static {
718
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
719
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
720
+ VersionCCCommandClassGet2 = _classThis = _classDescriptor.value;
721
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
722
+ __runInitializers(_classThis, _classExtraInitializers);
723
+ }
724
+ constructor(options) {
725
+ super(options);
726
+ this.requestedCC = options.requestedCC;
727
+ }
728
+ static from(raw, ctx) {
729
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
730
+ const requestedCC = raw.payload[0];
731
+ return new this({
732
+ nodeId: ctx.sourceNodeId,
733
+ requestedCC
734
+ });
735
+ }
736
+ requestedCC;
737
+ serialize(ctx) {
738
+ this.payload = import_safe2.Bytes.from([this.requestedCC]);
739
+ return super.serialize(ctx);
740
+ }
741
+ toLogEntry(ctx) {
742
+ return {
743
+ ...super.toLogEntry(ctx),
744
+ message: { CC: (0, import_safe.getCCName)(this.requestedCC) }
745
+ };
746
+ }
747
+ };
748
+ return VersionCCCommandClassGet2 = _classThis;
749
+ })();
750
+ let VersionCCCapabilitiesReport = (() => {
751
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsZWaveSoftwareGet", VersionCCValues.supportsZWaveSoftwareGet)];
752
+ let _classDescriptor;
753
+ let _classExtraInitializers = [];
754
+ let _classThis;
755
+ let _classSuper = VersionCC;
756
+ var VersionCCCapabilitiesReport2 = class extends _classSuper {
757
+ static {
758
+ _classThis = this;
759
+ }
760
+ static {
761
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
762
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
763
+ VersionCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
764
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
765
+ __runInitializers(_classThis, _classExtraInitializers);
766
+ }
767
+ constructor(options) {
768
+ super(options);
769
+ this.supportsZWaveSoftwareGet = options.supportsZWaveSoftwareGet;
770
+ }
771
+ static from(raw, ctx) {
772
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
773
+ const capabilities = raw.payload[0];
774
+ const supportsZWaveSoftwareGet = !!(capabilities & 4);
775
+ return new this({
776
+ nodeId: ctx.sourceNodeId,
777
+ supportsZWaveSoftwareGet
778
+ });
779
+ }
780
+ supportsZWaveSoftwareGet;
781
+ serialize(ctx) {
782
+ this.payload = import_safe2.Bytes.from([
783
+ (this.supportsZWaveSoftwareGet ? 4 : 0) | 3
784
+ ]);
785
+ return super.serialize(ctx);
786
+ }
787
+ toLogEntry(ctx) {
788
+ return {
789
+ ...super.toLogEntry(ctx),
790
+ message: {
791
+ "supports Z-Wave Software Get command": this.supportsZWaveSoftwareGet
792
+ }
793
+ };
794
+ }
795
+ };
796
+ return VersionCCCapabilitiesReport2 = _classThis;
797
+ })();
798
+ let VersionCCCapabilitiesGet = (() => {
799
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCCapabilitiesReport)];
800
+ let _classDescriptor;
801
+ let _classExtraInitializers = [];
802
+ let _classThis;
803
+ let _classSuper = VersionCC;
804
+ var VersionCCCapabilitiesGet2 = class extends _classSuper {
805
+ static {
806
+ _classThis = this;
807
+ }
808
+ static {
809
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
810
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
811
+ VersionCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
812
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
813
+ __runInitializers(_classThis, _classExtraInitializers);
814
+ }
815
+ };
816
+ return VersionCCCapabilitiesGet2 = _classThis;
817
+ })();
818
+ let VersionCCZWaveSoftwareReport = (() => {
819
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.ZWaveSoftwareReport), (0, import_CommandClassDecorators.ccValueProperty)("sdkVersion", VersionCCValues.sdkVersion), (0, import_CommandClassDecorators.ccValueProperty)("applicationFrameworkAPIVersion", VersionCCValues.applicationFrameworkAPIVersion), (0, import_CommandClassDecorators.ccValueProperty)("applicationFrameworkBuildNumber", VersionCCValues.applicationFrameworkBuildNumber), (0, import_CommandClassDecorators.ccValueProperty)("hostInterfaceVersion", VersionCCValues.serialAPIVersion), (0, import_CommandClassDecorators.ccValueProperty)("hostInterfaceBuildNumber", VersionCCValues.serialAPIBuildNumber), (0, import_CommandClassDecorators.ccValueProperty)("zWaveProtocolVersion", VersionCCValues.zWaveProtocolVersion), (0, import_CommandClassDecorators.ccValueProperty)("zWaveProtocolBuildNumber", VersionCCValues.zWaveProtocolBuildNumber), (0, import_CommandClassDecorators.ccValueProperty)("applicationVersion", VersionCCValues.applicationVersion), (0, import_CommandClassDecorators.ccValueProperty)("applicationBuildNumber", VersionCCValues.applicationBuildNumber)];
820
+ let _classDescriptor;
821
+ let _classExtraInitializers = [];
822
+ let _classThis;
823
+ let _classSuper = VersionCC;
824
+ var VersionCCZWaveSoftwareReport2 = class extends _classSuper {
825
+ static {
826
+ _classThis = this;
827
+ }
828
+ static {
829
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
830
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
831
+ VersionCCZWaveSoftwareReport2 = _classThis = _classDescriptor.value;
832
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
833
+ __runInitializers(_classThis, _classExtraInitializers);
834
+ }
835
+ constructor(options) {
836
+ super(options);
837
+ this.sdkVersion = options.sdkVersion;
838
+ this.applicationFrameworkAPIVersion = options.applicationFrameworkAPIVersion;
839
+ this.applicationFrameworkBuildNumber = options.applicationFrameworkBuildNumber;
840
+ this.hostInterfaceVersion = options.hostInterfaceVersion;
841
+ this.hostInterfaceBuildNumber = options.hostInterfaceBuildNumber;
842
+ this.zWaveProtocolVersion = options.zWaveProtocolVersion;
843
+ this.zWaveProtocolBuildNumber = options.zWaveProtocolBuildNumber;
844
+ this.applicationVersion = options.applicationVersion;
845
+ this.applicationBuildNumber = options.applicationBuildNumber;
846
+ }
847
+ static from(raw, ctx) {
848
+ (0, import_safe.validatePayload)(raw.payload.length >= 23);
849
+ const sdkVersion = parseVersion(raw.payload);
850
+ const applicationFrameworkAPIVersion = parseVersion(raw.payload.subarray(3));
851
+ let applicationFrameworkBuildNumber;
852
+ if (applicationFrameworkAPIVersion !== "unused") {
853
+ applicationFrameworkBuildNumber = raw.payload.readUInt16BE(6);
854
+ } else {
855
+ applicationFrameworkBuildNumber = 0;
670
856
  }
671
- };
672
- }
673
- };
674
- __decorate([
675
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.supportsZWaveSoftwareGet)
676
- ], VersionCCCapabilitiesReport.prototype, "supportsZWaveSoftwareGet", void 0);
677
- VersionCCCapabilitiesReport = VersionCCCapabilitiesReport_1 = __decorate([
678
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CapabilitiesReport)
679
- ], VersionCCCapabilitiesReport);
680
- let VersionCCCapabilitiesGet = class VersionCCCapabilitiesGet2 extends VersionCC {
681
- };
682
- VersionCCCapabilitiesGet = __decorate([
683
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.CapabilitiesGet),
684
- (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCCapabilitiesReport)
685
- ], VersionCCCapabilitiesGet);
686
- let VersionCCZWaveSoftwareReport = VersionCCZWaveSoftwareReport_1 = class VersionCCZWaveSoftwareReport2 extends VersionCC {
687
- constructor(options) {
688
- super(options);
689
- this.sdkVersion = options.sdkVersion;
690
- this.applicationFrameworkAPIVersion = options.applicationFrameworkAPIVersion;
691
- this.applicationFrameworkBuildNumber = options.applicationFrameworkBuildNumber;
692
- this.hostInterfaceVersion = options.hostInterfaceVersion;
693
- this.hostInterfaceBuildNumber = options.hostInterfaceBuildNumber;
694
- this.zWaveProtocolVersion = options.zWaveProtocolVersion;
695
- this.zWaveProtocolBuildNumber = options.zWaveProtocolBuildNumber;
696
- this.applicationVersion = options.applicationVersion;
697
- this.applicationBuildNumber = options.applicationBuildNumber;
698
- }
699
- static from(raw, ctx) {
700
- (0, import_safe.validatePayload)(raw.payload.length >= 23);
701
- const sdkVersion = parseVersion(raw.payload);
702
- const applicationFrameworkAPIVersion = parseVersion(raw.payload.subarray(3));
703
- let applicationFrameworkBuildNumber;
704
- if (applicationFrameworkAPIVersion !== "unused") {
705
- applicationFrameworkBuildNumber = raw.payload.readUInt16BE(6);
706
- } else {
707
- applicationFrameworkBuildNumber = 0;
708
- }
709
- const hostInterfaceVersion = parseVersion(raw.payload.subarray(8));
710
- let hostInterfaceBuildNumber;
711
- if (hostInterfaceVersion !== "unused") {
712
- hostInterfaceBuildNumber = raw.payload.readUInt16BE(11);
713
- } else {
714
- hostInterfaceBuildNumber = 0;
715
- }
716
- const zWaveProtocolVersion = parseVersion(raw.payload.subarray(13));
717
- let zWaveProtocolBuildNumber;
718
- if (zWaveProtocolVersion !== "unused") {
719
- zWaveProtocolBuildNumber = raw.payload.readUInt16BE(16);
720
- } else {
721
- zWaveProtocolBuildNumber = 0;
722
- }
723
- const applicationVersion = parseVersion(raw.payload.subarray(18));
724
- let applicationBuildNumber;
725
- if (applicationVersion !== "unused") {
726
- applicationBuildNumber = raw.payload.readUInt16BE(21);
727
- } else {
728
- applicationBuildNumber = 0;
729
- }
730
- return new VersionCCZWaveSoftwareReport_1({
731
- nodeId: ctx.sourceNodeId,
732
- sdkVersion,
733
- applicationFrameworkAPIVersion,
734
- applicationFrameworkBuildNumber,
735
- hostInterfaceVersion,
736
- hostInterfaceBuildNumber,
737
- zWaveProtocolVersion,
738
- zWaveProtocolBuildNumber,
739
- applicationVersion,
740
- applicationBuildNumber
741
- });
742
- }
743
- sdkVersion;
744
- applicationFrameworkAPIVersion;
745
- applicationFrameworkBuildNumber;
746
- hostInterfaceVersion;
747
- hostInterfaceBuildNumber;
748
- zWaveProtocolVersion;
749
- zWaveProtocolBuildNumber;
750
- applicationVersion;
751
- applicationBuildNumber;
752
- toLogEntry(ctx) {
753
- const message = {
754
- "SDK version": this.sdkVersion
755
- };
756
- message["appl. framework API version"] = this.applicationFrameworkAPIVersion;
757
- if (this.applicationFrameworkAPIVersion !== "unused") {
758
- message["appl. framework build number"] = this.applicationFrameworkBuildNumber;
857
+ const hostInterfaceVersion = parseVersion(raw.payload.subarray(8));
858
+ let hostInterfaceBuildNumber;
859
+ if (hostInterfaceVersion !== "unused") {
860
+ hostInterfaceBuildNumber = raw.payload.readUInt16BE(11);
861
+ } else {
862
+ hostInterfaceBuildNumber = 0;
863
+ }
864
+ const zWaveProtocolVersion = parseVersion(raw.payload.subarray(13));
865
+ let zWaveProtocolBuildNumber;
866
+ if (zWaveProtocolVersion !== "unused") {
867
+ zWaveProtocolBuildNumber = raw.payload.readUInt16BE(16);
868
+ } else {
869
+ zWaveProtocolBuildNumber = 0;
870
+ }
871
+ const applicationVersion = parseVersion(raw.payload.subarray(18));
872
+ let applicationBuildNumber;
873
+ if (applicationVersion !== "unused") {
874
+ applicationBuildNumber = raw.payload.readUInt16BE(21);
875
+ } else {
876
+ applicationBuildNumber = 0;
877
+ }
878
+ return new this({
879
+ nodeId: ctx.sourceNodeId,
880
+ sdkVersion,
881
+ applicationFrameworkAPIVersion,
882
+ applicationFrameworkBuildNumber,
883
+ hostInterfaceVersion,
884
+ hostInterfaceBuildNumber,
885
+ zWaveProtocolVersion,
886
+ zWaveProtocolBuildNumber,
887
+ applicationVersion,
888
+ applicationBuildNumber
889
+ });
759
890
  }
760
- message["host interface version"] = this.hostInterfaceVersion;
761
- if (this.hostInterfaceVersion !== "unused") {
762
- message["host interface build number"] = this.hostInterfaceBuildNumber;
891
+ sdkVersion;
892
+ applicationFrameworkAPIVersion;
893
+ applicationFrameworkBuildNumber;
894
+ hostInterfaceVersion;
895
+ hostInterfaceBuildNumber;
896
+ zWaveProtocolVersion;
897
+ zWaveProtocolBuildNumber;
898
+ applicationVersion;
899
+ applicationBuildNumber;
900
+ toLogEntry(ctx) {
901
+ const message = {
902
+ "SDK version": this.sdkVersion
903
+ };
904
+ message["appl. framework API version"] = this.applicationFrameworkAPIVersion;
905
+ if (this.applicationFrameworkAPIVersion !== "unused") {
906
+ message["appl. framework build number"] = this.applicationFrameworkBuildNumber;
907
+ }
908
+ message["host interface version"] = this.hostInterfaceVersion;
909
+ if (this.hostInterfaceVersion !== "unused") {
910
+ message["host interface build number"] = this.hostInterfaceBuildNumber;
911
+ }
912
+ message["Z-Wave protocol version"] = this.zWaveProtocolVersion;
913
+ if (this.zWaveProtocolVersion !== "unused") {
914
+ message["Z-Wave protocol build number"] = this.zWaveProtocolBuildNumber;
915
+ }
916
+ message["application version"] = this.applicationVersion;
917
+ if (this.applicationVersion !== "unused") {
918
+ message["application build number"] = this.applicationBuildNumber;
919
+ }
920
+ return {
921
+ ...super.toLogEntry(ctx),
922
+ message
923
+ };
763
924
  }
764
- message["Z-Wave protocol version"] = this.zWaveProtocolVersion;
765
- if (this.zWaveProtocolVersion !== "unused") {
766
- message["Z-Wave protocol build number"] = this.zWaveProtocolBuildNumber;
925
+ };
926
+ return VersionCCZWaveSoftwareReport2 = _classThis;
927
+ })();
928
+ let VersionCCZWaveSoftwareGet = (() => {
929
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.ZWaveSoftwareGet), (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCZWaveSoftwareReport)];
930
+ let _classDescriptor;
931
+ let _classExtraInitializers = [];
932
+ let _classThis;
933
+ let _classSuper = VersionCC;
934
+ var VersionCCZWaveSoftwareGet2 = class extends _classSuper {
935
+ static {
936
+ _classThis = this;
767
937
  }
768
- message["application version"] = this.applicationVersion;
769
- if (this.applicationVersion !== "unused") {
770
- message["application build number"] = this.applicationBuildNumber;
938
+ static {
939
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
940
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
941
+ VersionCCZWaveSoftwareGet2 = _classThis = _classDescriptor.value;
942
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
943
+ __runInitializers(_classThis, _classExtraInitializers);
771
944
  }
772
- return {
773
- ...super.toLogEntry(ctx),
774
- message
775
- };
776
- }
777
- };
778
- __decorate([
779
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.sdkVersion)
780
- ], VersionCCZWaveSoftwareReport.prototype, "sdkVersion", void 0);
781
- __decorate([
782
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.applicationFrameworkAPIVersion)
783
- ], VersionCCZWaveSoftwareReport.prototype, "applicationFrameworkAPIVersion", void 0);
784
- __decorate([
785
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.applicationFrameworkBuildNumber)
786
- ], VersionCCZWaveSoftwareReport.prototype, "applicationFrameworkBuildNumber", void 0);
787
- __decorate([
788
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.serialAPIVersion)
789
- ], VersionCCZWaveSoftwareReport.prototype, "hostInterfaceVersion", void 0);
790
- __decorate([
791
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.serialAPIBuildNumber)
792
- ], VersionCCZWaveSoftwareReport.prototype, "hostInterfaceBuildNumber", void 0);
793
- __decorate([
794
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.zWaveProtocolVersion)
795
- ], VersionCCZWaveSoftwareReport.prototype, "zWaveProtocolVersion", void 0);
796
- __decorate([
797
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.zWaveProtocolBuildNumber)
798
- ], VersionCCZWaveSoftwareReport.prototype, "zWaveProtocolBuildNumber", void 0);
799
- __decorate([
800
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.applicationVersion)
801
- ], VersionCCZWaveSoftwareReport.prototype, "applicationVersion", void 0);
802
- __decorate([
803
- (0, import_CommandClassDecorators.ccValue)(VersionCCValues.applicationBuildNumber)
804
- ], VersionCCZWaveSoftwareReport.prototype, "applicationBuildNumber", void 0);
805
- VersionCCZWaveSoftwareReport = VersionCCZWaveSoftwareReport_1 = __decorate([
806
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.ZWaveSoftwareReport)
807
- ], VersionCCZWaveSoftwareReport);
808
- let VersionCCZWaveSoftwareGet = class VersionCCZWaveSoftwareGet2 extends VersionCC {
809
- };
810
- VersionCCZWaveSoftwareGet = __decorate([
811
- (0, import_CommandClassDecorators.CCCommand)(import_Types.VersionCommand.ZWaveSoftwareGet),
812
- (0, import_CommandClassDecorators.expectedCCResponse)(VersionCCZWaveSoftwareReport)
813
- ], VersionCCZWaveSoftwareGet);
945
+ };
946
+ return VersionCCZWaveSoftwareGet2 = _classThis;
947
+ })();
814
948
  // Annotate the CommonJS export names for ESM import in node:
815
949
  0 && (module.exports = {
816
950
  VersionCC,