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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +381 -266
  2. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  3. package/build/cjs/cc/AssociationCC.js +669 -503
  4. package/build/cjs/cc/AssociationCC.js.map +3 -3
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  7. package/build/cjs/cc/BarrierOperatorCC.js +595 -429
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  9. package/build/cjs/cc/BasicCC.js +354 -260
  10. package/build/cjs/cc/BasicCC.js.map +3 -3
  11. package/build/cjs/cc/BatteryCC.js +427 -345
  12. package/build/cjs/cc/BatteryCC.js.map +3 -3
  13. package/build/cjs/cc/BinarySensorCC.js +391 -276
  14. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  15. package/build/cjs/cc/BinarySwitchCC.js +347 -253
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.js +160 -85
  18. package/build/cjs/cc/CRC16CC.js.map +3 -3
  19. package/build/cjs/cc/CentralSceneCC.js +459 -324
  20. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  21. package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  23. package/build/cjs/cc/ClockCC.js +254 -150
  24. package/build/cjs/cc/ClockCC.js.map +3 -3
  25. package/build/cjs/cc/ColorSwitchCC.js +758 -610
  26. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  27. package/build/cjs/cc/ConfigurationCC.js +1700 -1453
  28. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  29. package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
  30. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  31. package/build/cjs/cc/DoorLockCC.js +904 -777
  32. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  33. package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
  34. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  35. package/build/cjs/cc/EnergyProductionCC.js +249 -160
  36. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  37. package/build/cjs/cc/EntryControlCC.js +619 -458
  38. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  39. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
  40. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  41. package/build/cjs/cc/HailCC.js +57 -11
  42. package/build/cjs/cc/HailCC.js.map +2 -2
  43. package/build/cjs/cc/HumidityControlModeCC.js +359 -233
  44. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  45. package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
  46. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  47. package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
  48. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  49. package/build/cjs/cc/InclusionControllerCC.js +205 -114
  50. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  51. package/build/cjs/cc/IndicatorCC.js +897 -736
  52. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  53. package/build/cjs/cc/IrrigationCC.js +1651 -1405
  54. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  55. package/build/cjs/cc/LanguageCC.js +268 -171
  56. package/build/cjs/cc/LanguageCC.js.map +3 -3
  57. package/build/cjs/cc/LockCC.js +254 -154
  58. package/build/cjs/cc/LockCC.js.map +3 -3
  59. package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
  60. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  61. package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
  62. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  63. package/build/cjs/cc/MeterCC.js +827 -707
  64. package/build/cjs/cc/MeterCC.js.map +3 -3
  65. package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
  66. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  67. package/build/cjs/cc/MultiChannelCC.js +1037 -819
  68. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  69. package/build/cjs/cc/MultiCommandCC.js +172 -97
  70. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  71. package/build/cjs/cc/MultilevelSensorCC.js +589 -449
  72. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  73. package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
  74. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  75. package/build/cjs/cc/NoOperationCC.js +89 -27
  76. package/build/cjs/cc/NoOperationCC.js.map +2 -2
  77. package/build/cjs/cc/NodeNamingCC.js +417 -277
  78. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  79. package/build/cjs/cc/NotificationCC.js +972 -818
  80. package/build/cjs/cc/NotificationCC.js.map +3 -3
  81. package/build/cjs/cc/PowerlevelCC.js +450 -303
  82. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  83. package/build/cjs/cc/ProtectionCC.js +686 -494
  84. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  85. package/build/cjs/cc/SceneActivationCC.js +165 -97
  86. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  87. package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
  88. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  89. package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
  90. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  91. package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
  92. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  93. package/build/cjs/cc/Security2CC.js +1483 -1219
  94. package/build/cjs/cc/Security2CC.js.map +3 -3
  95. package/build/cjs/cc/SecurityCC.js +839 -619
  96. package/build/cjs/cc/SecurityCC.js.map +3 -3
  97. package/build/cjs/cc/SoundSwitchCC.js +707 -515
  98. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  99. package/build/cjs/cc/SupervisionCC.js +327 -237
  100. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  101. package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
  102. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  103. package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
  104. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  105. package/build/cjs/cc/ThermostatModeCC.js +425 -302
  106. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  107. package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
  108. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  109. package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
  110. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  111. package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
  112. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  113. package/build/cjs/cc/TimeCC.js +515 -353
  114. package/build/cjs/cc/TimeCC.js.map +3 -3
  115. package/build/cjs/cc/TimeParametersCC.js +302 -202
  116. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  117. package/build/cjs/cc/TransportServiceCC.js +433 -315
  118. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  119. package/build/cjs/cc/UserCodeCC.js +1385 -1102
  120. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  121. package/build/cjs/cc/VersionCC.js +696 -562
  122. package/build/cjs/cc/VersionCC.js.map +3 -3
  123. package/build/cjs/cc/WakeUpCC.js +499 -346
  124. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  125. package/build/cjs/cc/WindowCoveringCC.js +626 -478
  126. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  127. package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
  128. package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
  129. package/build/cjs/cc/ZWavePlusCC.js +233 -159
  130. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  131. package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
  132. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  133. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  134. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  135. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
  136. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  137. package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
  138. package/build/cjs/lib/CommandClassDecorators.js +19 -20
  139. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  140. package/build/cjs/lib/Security2/Extension.d.ts +1 -1
  141. package/build/cjs/lib/Security2/Extension.js +217 -126
  142. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  143. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/AlarmSensorCC.js +389 -291
  145. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  146. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  147. package/build/esm/cc/AssociationCC.js +678 -537
  148. package/build/esm/cc/AssociationCC.js.map +1 -1
  149. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  150. package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
  151. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  152. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  153. package/build/esm/cc/BarrierOperatorCC.js +634 -493
  154. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  155. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  156. package/build/esm/cc/BasicCC.js +380 -302
  157. package/build/esm/cc/BasicCC.js.map +1 -1
  158. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  159. package/build/esm/cc/BatteryCC.js +449 -384
  160. package/build/esm/cc/BatteryCC.js.map +1 -1
  161. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  162. package/build/esm/cc/BinarySensorCC.js +395 -297
  163. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  164. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  165. package/build/esm/cc/BinarySwitchCC.js +353 -274
  166. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  167. package/build/esm/cc/CRC16CC.js +162 -98
  168. package/build/esm/cc/CRC16CC.js.map +1 -1
  169. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  170. package/build/esm/cc/CentralSceneCC.js +465 -351
  171. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  172. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  173. package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
  174. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  175. package/build/esm/cc/ClockCC.js +248 -159
  176. package/build/esm/cc/ClockCC.js.map +1 -1
  177. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  178. package/build/esm/cc/ColorSwitchCC.js +802 -677
  179. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  180. package/build/esm/cc/ConfigurationCC.js +1899 -1687
  181. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  182. package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
  183. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  184. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  185. package/build/esm/cc/DoorLockCC.js +951 -849
  186. package/build/esm/cc/DoorLockCC.js.map +1 -1
  187. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  188. package/build/esm/cc/DoorLockLoggingCC.js +316 -218
  189. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  190. package/build/esm/cc/EnergyProductionCC.js +240 -164
  191. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  192. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  193. package/build/esm/cc/EntryControlCC.js +629 -493
  194. package/build/esm/cc/EntryControlCC.js.map +1 -1
  195. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  196. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
  197. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  198. package/build/esm/cc/HailCC.js +51 -12
  199. package/build/esm/cc/HailCC.js.map +1 -1
  200. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  201. package/build/esm/cc/HumidityControlModeCC.js +357 -250
  202. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  203. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  204. package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
  205. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  206. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  207. package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
  208. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  209. package/build/esm/cc/InclusionControllerCC.js +197 -119
  210. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  211. package/build/esm/cc/IndicatorCC.js +973 -835
  212. package/build/esm/cc/IndicatorCC.js.map +1 -1
  213. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  214. package/build/esm/cc/IrrigationCC.js +1697 -1496
  215. package/build/esm/cc/IrrigationCC.js.map +1 -1
  216. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  217. package/build/esm/cc/LanguageCC.js +266 -184
  218. package/build/esm/cc/LanguageCC.js.map +1 -1
  219. package/build/esm/cc/LockCC.d.ts.map +1 -1
  220. package/build/esm/cc/LockCC.js +247 -162
  221. package/build/esm/cc/LockCC.js.map +1 -1
  222. package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
  223. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  224. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  225. package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
  226. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  227. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  228. package/build/esm/cc/MeterCC.js +896 -795
  229. package/build/esm/cc/MeterCC.js.map +1 -1
  230. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  231. package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
  232. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  233. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  234. package/build/esm/cc/MultiChannelCC.js +1106 -921
  235. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  236. package/build/esm/cc/MultiCommandCC.js +166 -102
  237. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  238. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  239. package/build/esm/cc/MultilevelSensorCC.js +616 -497
  240. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  241. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  242. package/build/esm/cc/MultilevelSwitchCC.js +621 -496
  243. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  244. package/build/esm/cc/NoOperationCC.js +82 -29
  245. package/build/esm/cc/NoOperationCC.js.map +1 -1
  246. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  247. package/build/esm/cc/NodeNamingCC.js +413 -294
  248. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  249. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  250. package/build/esm/cc/NotificationCC.js +1097 -966
  251. package/build/esm/cc/NotificationCC.js.map +1 -1
  252. package/build/esm/cc/PowerlevelCC.js +437 -311
  253. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  254. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  255. package/build/esm/cc/ProtectionCC.js +704 -543
  256. package/build/esm/cc/ProtectionCC.js.map +1 -1
  257. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  258. package/build/esm/cc/SceneActivationCC.js +157 -100
  259. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  260. package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
  261. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  262. package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
  263. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  264. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  265. package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
  266. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  267. package/build/esm/cc/Security2CC.js +1633 -1406
  268. package/build/esm/cc/Security2CC.js.map +1 -1
  269. package/build/esm/cc/SecurityCC.js +876 -687
  270. package/build/esm/cc/SecurityCC.js.map +1 -1
  271. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  272. package/build/esm/cc/SoundSwitchCC.js +689 -526
  273. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  274. package/build/esm/cc/SupervisionCC.js +349 -272
  275. package/build/esm/cc/SupervisionCC.js.map +1 -1
  276. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  277. package/build/esm/cc/ThermostatFanModeCC.js +388 -284
  278. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  279. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  280. package/build/esm/cc/ThermostatFanStateCC.js +184 -111
  281. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  282. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  283. package/build/esm/cc/ThermostatModeCC.js +435 -331
  284. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  285. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  286. package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
  287. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  288. package/build/esm/cc/ThermostatSetbackCC.js +274 -185
  289. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  290. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  291. package/build/esm/cc/ThermostatSetpointCC.js +674 -543
  292. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  293. package/build/esm/cc/TimeCC.js +499 -360
  294. package/build/esm/cc/TimeCC.js.map +1 -1
  295. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  296. package/build/esm/cc/TimeParametersCC.js +296 -211
  297. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  298. package/build/esm/cc/TransportServiceCC.js +464 -363
  299. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  300. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  301. package/build/esm/cc/UserCodeCC.js +1443 -1205
  302. package/build/esm/cc/UserCodeCC.js.map +1 -1
  303. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  304. package/build/esm/cc/VersionCC.js +744 -635
  305. package/build/esm/cc/VersionCC.js.map +1 -1
  306. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  307. package/build/esm/cc/WakeUpCC.js +494 -364
  308. package/build/esm/cc/WakeUpCC.js.map +1 -1
  309. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  310. package/build/esm/cc/WindowCoveringCC.js +655 -530
  311. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  312. package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
  313. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  314. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  315. package/build/esm/cc/ZWavePlusCC.js +223 -162
  316. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  317. package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
  318. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  319. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  320. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  321. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
  322. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  323. package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
  324. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  325. package/build/esm/lib/CommandClassDecorators.js +24 -24
  326. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  327. package/build/esm/lib/Security2/Extension.d.ts +1 -1
  328. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  329. package/build/esm/lib/Security2/Extension.js +207 -123
  330. package/build/esm/lib/Security2/Extension.js.map +1 -1
  331. package/package.json +6 -6
@@ -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 BarrierOperatorCCReport_1, BarrierOperatorCCSignalingCapabilitiesReport_1, BarrierOperatorCCEventSignalingReport_1;
49
81
  function __assertType(argName, typeName, boundHasError) {
50
82
  const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
51
83
  if (boundHasError()) {
@@ -115,456 +147,590 @@ const BarrierOperatorCCValues = Object.freeze({
115
147
  }))
116
148
  })
117
149
  });
118
- let BarrierOperatorCCAPI = class BarrierOperatorCCAPI2 extends import_API.CCAPI {
119
- supportsCommand(cmd) {
120
- switch (cmd) {
121
- case import_Types.BarrierOperatorCommand.Get:
122
- case import_Types.BarrierOperatorCommand.Set:
123
- case import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet:
124
- case import_Types.BarrierOperatorCommand.EventSignalingGet:
125
- case import_Types.BarrierOperatorCommand.EventSignalingSet:
126
- return true;
127
- }
128
- return super.supportsCommand(cmd);
129
- }
130
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
131
- async get() {
132
- this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Get);
133
- const cc = new BarrierOperatorCCGet({
134
- nodeId: this.endpoint.nodeId,
135
- endpointIndex: this.endpoint.index
136
- });
137
- const response = await this.host.sendCommand(cc, this.commandOptions);
138
- if (response) {
139
- return (0, import_safe3.pick)(response, ["currentState", "position"]);
150
+ let BarrierOperatorCCAPI = (() => {
151
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Barrier Operator"])];
152
+ let _classDescriptor;
153
+ let _classExtraInitializers = [];
154
+ let _classThis;
155
+ let _classSuper = import_API.CCAPI;
156
+ var BarrierOperatorCCAPI2 = class extends _classSuper {
157
+ static {
158
+ _classThis = this;
140
159
  }
141
- }
142
- async set(targetState) {
143
- __assertType("targetState", void 0, __assertType__su__1__2_eu.bind(void 0, targetState));
144
- this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Set);
145
- const cc = new BarrierOperatorCCSet({
146
- nodeId: this.endpoint.nodeId,
147
- endpointIndex: this.endpoint.index,
148
- targetState
149
- });
150
- return this.host.sendCommand(cc, this.commandOptions);
151
- }
152
- async getSignalingCapabilities() {
153
- this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet);
154
- const cc = new BarrierOperatorCCSignalingCapabilitiesGet({
155
- nodeId: this.endpoint.nodeId,
156
- endpointIndex: this.endpoint.index
157
- });
158
- const response = await this.host.sendCommand(cc, this.commandOptions);
159
- return response?.supportedSubsystemTypes;
160
- }
161
- async getEventSignaling(subsystemType) {
162
- __assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
163
- this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingGet);
164
- const cc = new BarrierOperatorCCEventSignalingGet({
165
- nodeId: this.endpoint.nodeId,
166
- endpointIndex: this.endpoint.index,
167
- subsystemType
168
- });
169
- const response = await this.host.sendCommand(cc, this.commandOptions);
170
- return response?.subsystemState;
171
- }
172
- async setEventSignaling(subsystemType, subsystemState) {
173
- __assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
174
- __assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
175
- this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingSet);
176
- const cc = new BarrierOperatorCCEventSignalingSet({
177
- nodeId: this.endpoint.nodeId,
178
- endpointIndex: this.endpoint.index,
179
- subsystemType,
180
- subsystemState
181
- });
182
- return this.host.sendCommand(cc, this.commandOptions);
183
- }
184
- get [import_API.SET_VALUE]() {
185
- return async function({ property, propertyKey }, value) {
186
- if (property === "targetState") {
187
- if (typeof value !== "number") {
188
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
189
- }
190
- const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
191
- return this.set(targetValue);
192
- } else if (property === "signalingState") {
193
- if (propertyKey == void 0) {
194
- (0, import_API.throwMissingPropertyKey)(this.ccId, property);
195
- } else if (typeof propertyKey !== "number") {
196
- (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
197
- }
198
- if (typeof value !== "number") {
199
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
200
- }
201
- return this.setEventSignaling(propertyKey, value);
202
- } else {
203
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
160
+ static {
161
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
162
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
163
+ BarrierOperatorCCAPI2 = _classThis = _classDescriptor.value;
164
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
165
+ __runInitializers(_classThis, _classExtraInitializers);
166
+ }
167
+ supportsCommand(cmd) {
168
+ switch (cmd) {
169
+ case import_Types.BarrierOperatorCommand.Get:
170
+ case import_Types.BarrierOperatorCommand.Set:
171
+ case import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet:
172
+ case import_Types.BarrierOperatorCommand.EventSignalingGet:
173
+ case import_Types.BarrierOperatorCommand.EventSignalingSet:
174
+ return true;
204
175
  }
205
- };
206
- }
207
- [import_API.SET_VALUE_HOOKS] = ({ property, propertyKey }, value, _options) => {
208
- const valueId = {
209
- commandClass: this.ccId,
210
- property,
211
- propertyKey
212
- };
213
- if (BarrierOperatorCCValues.targetState.is(valueId)) {
214
- const currentStateValueId = BarrierOperatorCCValues.currentState.endpoint(this.endpoint.index);
215
- const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
216
- return {
217
- // Barrier Operator commands may take some time to be executed.
218
- // Therefore we try to supervise the command execution and delay the
219
- // optimistic update until the final result is received.
220
- supervisionDelayedUpdates: true,
221
- supervisionOnSuccess: () => {
222
- this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
223
- },
224
- supervisionOnFailure: async () => {
225
- try {
226
- await this.get();
227
- } catch {
176
+ return super.supportsCommand(cmd);
177
+ }
178
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
179
+ async get() {
180
+ this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Get);
181
+ const cc = new BarrierOperatorCCGet({
182
+ nodeId: this.endpoint.nodeId,
183
+ endpointIndex: this.endpoint.index
184
+ });
185
+ const response = await this.host.sendCommand(cc, this.commandOptions);
186
+ if (response) {
187
+ return (0, import_safe3.pick)(response, ["currentState", "position"]);
188
+ }
189
+ }
190
+ async set(targetState) {
191
+ __assertType("targetState", void 0, __assertType__su__1__2_eu.bind(void 0, targetState));
192
+ this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Set);
193
+ const cc = new BarrierOperatorCCSet({
194
+ nodeId: this.endpoint.nodeId,
195
+ endpointIndex: this.endpoint.index,
196
+ targetState
197
+ });
198
+ return this.host.sendCommand(cc, this.commandOptions);
199
+ }
200
+ async getSignalingCapabilities() {
201
+ this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet);
202
+ const cc = new BarrierOperatorCCSignalingCapabilitiesGet({
203
+ nodeId: this.endpoint.nodeId,
204
+ endpointIndex: this.endpoint.index
205
+ });
206
+ const response = await this.host.sendCommand(cc, this.commandOptions);
207
+ return response?.supportedSubsystemTypes;
208
+ }
209
+ async getEventSignaling(subsystemType) {
210
+ __assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
211
+ this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingGet);
212
+ const cc = new BarrierOperatorCCEventSignalingGet({
213
+ nodeId: this.endpoint.nodeId,
214
+ endpointIndex: this.endpoint.index,
215
+ subsystemType
216
+ });
217
+ const response = await this.host.sendCommand(cc, this.commandOptions);
218
+ return response?.subsystemState;
219
+ }
220
+ async setEventSignaling(subsystemType, subsystemState) {
221
+ __assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
222
+ __assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
223
+ this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingSet);
224
+ const cc = new BarrierOperatorCCEventSignalingSet({
225
+ nodeId: this.endpoint.nodeId,
226
+ endpointIndex: this.endpoint.index,
227
+ subsystemType,
228
+ subsystemState
229
+ });
230
+ return this.host.sendCommand(cc, this.commandOptions);
231
+ }
232
+ get [import_API.SET_VALUE]() {
233
+ return async function({ property, propertyKey }, value) {
234
+ if (property === "targetState") {
235
+ if (typeof value !== "number") {
236
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
228
237
  }
229
- },
230
- optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
231
- if (!supervisedAndSuccessful)
232
- return;
233
- if (this.isSinglecast()) {
234
- this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
235
- } else if (this.isMulticast()) {
236
- const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
237
- for (const node of affectedNodes) {
238
- this.host.tryGetValueDB(node.id)?.setValue(currentStateValueId, targetValue);
239
- }
238
+ const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
239
+ return this.set(targetValue);
240
+ } else if (property === "signalingState") {
241
+ if (propertyKey == void 0) {
242
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
243
+ } else if (typeof propertyKey !== "number") {
244
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
240
245
  }
241
- },
242
- verifyChanges: () => {
243
- if (this.isSinglecast()) {
244
- this.schedulePoll(currentStateValueId, targetValue);
245
- } else {
246
+ if (typeof value !== "number") {
247
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
246
248
  }
249
+ return this.setEventSignaling(propertyKey, value);
250
+ } else {
251
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
247
252
  }
248
253
  };
249
- } else if (BarrierOperatorCCValues.signalingState.is(valueId)) {
250
- const subsystemType = propertyKey;
251
- const signalingStateValueId = BarrierOperatorCCValues.signalingState(subsystemType).endpoint(this.endpoint.index);
252
- return {
253
- verifyChanges: () => {
254
- if (this.isSinglecast()) {
255
- this.schedulePoll(signalingStateValueId, value, {
256
- // Signaling state changes are fast
257
- transition: "fast"
258
- });
254
+ }
255
+ [import_API.SET_VALUE_HOOKS] = ({ property, propertyKey }, value, _options) => {
256
+ const valueId = {
257
+ commandClass: this.ccId,
258
+ property,
259
+ propertyKey
260
+ };
261
+ if (BarrierOperatorCCValues.targetState.is(valueId)) {
262
+ const currentStateValueId = BarrierOperatorCCValues.currentState.endpoint(this.endpoint.index);
263
+ const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
264
+ return {
265
+ // Barrier Operator commands may take some time to be executed.
266
+ // Therefore we try to supervise the command execution and delay the
267
+ // optimistic update until the final result is received.
268
+ supervisionDelayedUpdates: true,
269
+ supervisionOnSuccess: () => {
270
+ this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
271
+ },
272
+ supervisionOnFailure: async () => {
273
+ try {
274
+ await this.get();
275
+ } catch {
276
+ }
277
+ },
278
+ optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
279
+ if (!supervisedAndSuccessful)
280
+ return;
281
+ if (this.isSinglecast()) {
282
+ this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
283
+ } else if (this.isMulticast()) {
284
+ const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
285
+ for (const node of affectedNodes) {
286
+ this.host.tryGetValueDB(node.id)?.setValue(currentStateValueId, targetValue);
287
+ }
288
+ }
289
+ },
290
+ verifyChanges: () => {
291
+ if (this.isSinglecast()) {
292
+ this.schedulePoll(currentStateValueId, targetValue);
293
+ } else {
294
+ }
295
+ }
296
+ };
297
+ } else if (BarrierOperatorCCValues.signalingState.is(valueId)) {
298
+ const subsystemType = propertyKey;
299
+ const signalingStateValueId = BarrierOperatorCCValues.signalingState(subsystemType).endpoint(this.endpoint.index);
300
+ return {
301
+ verifyChanges: () => {
302
+ if (this.isSinglecast()) {
303
+ this.schedulePoll(signalingStateValueId, value, {
304
+ // Signaling state changes are fast
305
+ transition: "fast"
306
+ });
307
+ }
259
308
  }
309
+ };
310
+ }
311
+ };
312
+ get [import_API.POLL_VALUE]() {
313
+ return async function({ property, propertyKey }) {
314
+ switch (property) {
315
+ case "currentState":
316
+ case "position":
317
+ return (await this.get())?.[property];
318
+ case "signalingState":
319
+ if (propertyKey == void 0) {
320
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
321
+ } else if (typeof propertyKey !== "number") {
322
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
323
+ }
324
+ return this.getEventSignaling(propertyKey);
325
+ default:
326
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
260
327
  }
261
328
  };
262
329
  }
263
330
  };
264
- get [import_API.POLL_VALUE]() {
265
- return async function({ property, propertyKey }) {
266
- switch (property) {
267
- case "currentState":
268
- case "position":
269
- return (await this.get())?.[property];
270
- case "signalingState":
271
- if (propertyKey == void 0) {
272
- (0, import_API.throwMissingPropertyKey)(this.ccId, property);
273
- } else if (typeof propertyKey !== "number") {
274
- (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
275
- }
276
- return this.getEventSignaling(propertyKey);
277
- default:
278
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
279
- }
280
- };
281
- }
282
- };
283
- BarrierOperatorCCAPI = __decorate([
284
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Barrier Operator"])
285
- ], BarrierOperatorCCAPI);
286
- let BarrierOperatorCC = class BarrierOperatorCC2 extends import_CommandClass.CommandClass {
287
- async interview(ctx) {
288
- const node = this.getNode(ctx);
289
- const endpoint = this.getEndpoint(ctx);
290
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
291
- priority: import_safe.MessagePriority.NodeQuery
292
- });
293
- ctx.logNode(node.id, {
294
- endpoint: this.endpointIndex,
295
- message: `Interviewing ${this.ccName}...`,
296
- direction: "none"
297
- });
298
- this.ensureMetadata(ctx, BarrierOperatorCCValues.targetState);
299
- ctx.logNode(node.id, {
300
- message: "Querying signaling capabilities...",
301
- direction: "outbound"
302
- });
303
- const resp = await api.getSignalingCapabilities();
304
- if (resp) {
331
+ return BarrierOperatorCCAPI2 = _classThis;
332
+ })();
333
+ let BarrierOperatorCC = (() => {
334
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Barrier Operator"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(BarrierOperatorCCValues)];
335
+ let _classDescriptor;
336
+ let _classExtraInitializers = [];
337
+ let _classThis;
338
+ let _classSuper = import_CommandClass.CommandClass;
339
+ var BarrierOperatorCC2 = class extends _classSuper {
340
+ static {
341
+ _classThis = this;
342
+ }
343
+ static {
344
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
345
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
346
+ BarrierOperatorCC2 = _classThis = _classDescriptor.value;
347
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
348
+ __runInitializers(_classThis, _classExtraInitializers);
349
+ }
350
+ async interview(ctx) {
351
+ const node = this.getNode(ctx);
352
+ const endpoint = this.getEndpoint(ctx);
353
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
354
+ priority: import_safe.MessagePriority.NodeQuery
355
+ });
356
+ ctx.logNode(node.id, {
357
+ endpoint: this.endpointIndex,
358
+ message: `Interviewing ${this.ccName}...`,
359
+ direction: "none"
360
+ });
361
+ this.ensureMetadata(ctx, BarrierOperatorCCValues.targetState);
305
362
  ctx.logNode(node.id, {
306
- message: `Received supported subsystem types: ${resp.map((t) => `
363
+ message: "Querying signaling capabilities...",
364
+ direction: "outbound"
365
+ });
366
+ const resp = await api.getSignalingCapabilities();
367
+ if (resp) {
368
+ ctx.logNode(node.id, {
369
+ message: `Received supported subsystem types: ${resp.map((t) => `
307
370
  \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")}`,
308
- direction: "inbound"
371
+ direction: "inbound"
372
+ });
373
+ for (const subsystemType of resp) {
374
+ if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
375
+ continue;
376
+ ctx.logNode(node.id, {
377
+ message: `Enabling subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
378
+ direction: "outbound"
379
+ });
380
+ await api.setEventSignaling(subsystemType, import_Types.SubsystemState.On).catch(import_safe3.noop);
381
+ }
382
+ }
383
+ await this.refreshValues(ctx);
384
+ this.setInterviewComplete(ctx, true);
385
+ }
386
+ async refreshValues(ctx) {
387
+ const node = this.getNode(ctx);
388
+ const endpoint = this.getEndpoint(ctx);
389
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
390
+ priority: import_safe.MessagePriority.NodeQuery
309
391
  });
310
- for (const subsystemType of resp) {
392
+ const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
393
+ for (const subsystemType of supportedSubsystems) {
311
394
  if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
312
395
  continue;
313
396
  ctx.logNode(node.id, {
314
- message: `Enabling subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
397
+ message: `Querying event signaling state for subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
315
398
  direction: "outbound"
316
399
  });
317
- await api.setEventSignaling(subsystemType, import_Types.SubsystemState.On).catch(import_safe3.noop);
400
+ const state = await api.getEventSignaling(subsystemType);
401
+ if (state != void 0) {
402
+ ctx.logNode(node.id, {
403
+ message: `Subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)} has state ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, state)}`,
404
+ direction: "inbound"
405
+ });
406
+ }
318
407
  }
319
- }
320
- await this.refreshValues(ctx);
321
- this.setInterviewComplete(ctx, true);
322
- }
323
- async refreshValues(ctx) {
324
- const node = this.getNode(ctx);
325
- const endpoint = this.getEndpoint(ctx);
326
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
327
- priority: import_safe.MessagePriority.NodeQuery
328
- });
329
- const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
330
- for (const subsystemType of supportedSubsystems) {
331
- if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
332
- continue;
333
408
  ctx.logNode(node.id, {
334
- message: `Querying event signaling state for subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
409
+ message: "querying current barrier state...",
335
410
  direction: "outbound"
336
411
  });
337
- const state = await api.getEventSignaling(subsystemType);
338
- if (state != void 0) {
339
- ctx.logNode(node.id, {
340
- message: `Subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)} has state ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, state)}`,
341
- direction: "inbound"
342
- });
343
- }
412
+ await api.get();
344
413
  }
345
- ctx.logNode(node.id, {
346
- message: "querying current barrier state...",
347
- direction: "outbound"
348
- });
349
- await api.get();
350
- }
351
- };
352
- BarrierOperatorCC = __decorate([
353
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Barrier Operator"]),
354
- (0, import_CommandClassDecorators.implementedVersion)(1),
355
- (0, import_CommandClassDecorators.ccValues)(BarrierOperatorCCValues)
356
- ], BarrierOperatorCC);
357
- let BarrierOperatorCCSet = class BarrierOperatorCCSet2 extends BarrierOperatorCC {
358
- constructor(options) {
359
- super(options);
360
- this.targetState = options.targetState;
361
- }
362
- static from(_raw, _ctx) {
363
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
364
- }
365
- targetState;
366
- serialize(ctx) {
367
- this.payload = import_safe2.Bytes.from([this.targetState]);
368
- return super.serialize(ctx);
369
- }
370
- toLogEntry(ctx) {
371
- return {
372
- ...super.toLogEntry(ctx),
373
- message: { "target state": this.targetState }
374
- };
375
- }
376
- };
377
- BarrierOperatorCCSet = __decorate([
378
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Set),
379
- (0, import_CommandClassDecorators.useSupervision)()
380
- ], BarrierOperatorCCSet);
381
- let BarrierOperatorCCReport = BarrierOperatorCCReport_1 = class BarrierOperatorCCReport2 extends BarrierOperatorCC {
382
- constructor(options) {
383
- super(options);
384
- this.position = options.position;
385
- this.currentState = options.currentState;
386
- }
387
- static from(raw, ctx) {
388
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
389
- const payloadValue = raw.payload[0];
390
- let position;
391
- if (payloadValue <= 99) {
392
- position = payloadValue;
393
- } else if (payloadValue === 255) {
394
- position = 100;
395
- } else {
396
- position = import_safe.UNKNOWN_STATE;
397
- }
398
- let currentState;
399
- if (payloadValue === import_Types.BarrierState.Closed || payloadValue >= import_Types.BarrierState.Closing) {
400
- currentState = payloadValue;
401
- } else if (payloadValue > 0 && payloadValue <= 99) {
402
- currentState = import_Types.BarrierState.Stopped;
403
- } else {
404
- currentState = import_safe.UNKNOWN_STATE;
405
- }
406
- return new BarrierOperatorCCReport_1({
407
- nodeId: ctx.sourceNodeId,
408
- position,
409
- currentState
410
- });
411
- }
412
- currentState;
413
- position;
414
- toLogEntry(ctx) {
415
- return {
416
- ...super.toLogEntry(ctx),
417
- message: {
418
- "barrier position": (0, import_safe.maybeUnknownToString)(this.position),
419
- "barrier state": this.currentState != void 0 ? (0, import_safe3.getEnumMemberName)(import_Types.BarrierState, this.currentState) : "unknown"
420
- }
421
- };
422
- }
423
- };
424
- __decorate([
425
- (0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.currentState)
426
- ], BarrierOperatorCCReport.prototype, "currentState", void 0);
427
- __decorate([
428
- (0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.position)
429
- ], BarrierOperatorCCReport.prototype, "position", void 0);
430
- BarrierOperatorCCReport = BarrierOperatorCCReport_1 = __decorate([
431
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Report)
432
- ], BarrierOperatorCCReport);
433
- let BarrierOperatorCCGet = class BarrierOperatorCCGet2 extends BarrierOperatorCC {
434
- };
435
- BarrierOperatorCCGet = __decorate([
436
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Get),
437
- (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCReport)
438
- ], BarrierOperatorCCGet);
439
- let BarrierOperatorCCSignalingCapabilitiesReport = BarrierOperatorCCSignalingCapabilitiesReport_1 = class BarrierOperatorCCSignalingCapabilitiesReport2 extends BarrierOperatorCC {
440
- constructor(options) {
441
- super(options);
442
- this.supportedSubsystemTypes = options.supportedSubsystemTypes;
443
- }
444
- static from(raw, ctx) {
445
- const supportedSubsystemTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.SubsystemType.Audible);
446
- return new BarrierOperatorCCSignalingCapabilitiesReport_1({
447
- nodeId: ctx.sourceNodeId,
448
- supportedSubsystemTypes
449
- });
450
- }
451
- supportedSubsystemTypes;
452
- toLogEntry(ctx) {
453
- return {
454
- ...super.toLogEntry(ctx),
455
- message: {
456
- "supported types": this.supportedSubsystemTypes.map((t) => `
457
- \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")
458
- }
459
- };
460
- }
461
- };
462
- __decorate([
463
- (0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.supportedSubsystemTypes)
464
- ], BarrierOperatorCCSignalingCapabilitiesReport.prototype, "supportedSubsystemTypes", void 0);
465
- BarrierOperatorCCSignalingCapabilitiesReport = BarrierOperatorCCSignalingCapabilitiesReport_1 = __decorate([
466
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesReport)
467
- ], BarrierOperatorCCSignalingCapabilitiesReport);
468
- let BarrierOperatorCCSignalingCapabilitiesGet = class BarrierOperatorCCSignalingCapabilitiesGet2 extends BarrierOperatorCC {
469
- };
470
- BarrierOperatorCCSignalingCapabilitiesGet = __decorate([
471
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet),
472
- (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCSignalingCapabilitiesReport)
473
- ], BarrierOperatorCCSignalingCapabilitiesGet);
474
- let BarrierOperatorCCEventSignalingSet = class BarrierOperatorCCEventSignalingSet2 extends BarrierOperatorCC {
475
- constructor(options) {
476
- super(options);
477
- this.subsystemType = options.subsystemType;
478
- this.subsystemState = options.subsystemState;
479
- }
480
- static from(_raw, _ctx) {
481
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
482
- }
483
- subsystemType;
484
- subsystemState;
485
- serialize(ctx) {
486
- this.payload = import_safe2.Bytes.from([this.subsystemType, this.subsystemState]);
487
- return super.serialize(ctx);
488
- }
489
- toLogEntry(ctx) {
490
- return {
491
- ...super.toLogEntry(ctx),
492
- message: {
493
- "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
494
- "subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
495
- }
496
- };
497
- }
498
- };
499
- BarrierOperatorCCEventSignalingSet = __decorate([
500
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingSet),
501
- (0, import_CommandClassDecorators.useSupervision)()
502
- ], BarrierOperatorCCEventSignalingSet);
503
- let BarrierOperatorCCEventSignalingReport = BarrierOperatorCCEventSignalingReport_1 = class BarrierOperatorCCEventSignalingReport2 extends BarrierOperatorCC {
504
- constructor(options) {
505
- super(options);
506
- this.subsystemType = options.subsystemType;
507
- this.subsystemState = options.subsystemState;
508
- }
509
- static from(raw, ctx) {
510
- (0, import_safe.validatePayload)(raw.payload.length >= 2);
511
- const subsystemType = raw.payload[0];
512
- const subsystemState = raw.payload[1];
513
- return new BarrierOperatorCCEventSignalingReport_1({
514
- nodeId: ctx.sourceNodeId,
515
- subsystemType,
516
- subsystemState
517
- });
518
- }
519
- persistValues(ctx) {
520
- if (!super.persistValues(ctx))
521
- return false;
522
- const signalingStateValue = BarrierOperatorCCValues.signalingState(this.subsystemType);
523
- this.ensureMetadata(ctx, signalingStateValue);
524
- this.setValue(ctx, signalingStateValue, this.subsystemState);
525
- return true;
526
- }
527
- subsystemType;
528
- subsystemState;
529
- toLogEntry(ctx) {
530
- return {
531
- ...super.toLogEntry(ctx),
532
- message: {
533
- "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
534
- "subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
414
+ };
415
+ return BarrierOperatorCC2 = _classThis;
416
+ })();
417
+ let BarrierOperatorCCSet = (() => {
418
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
419
+ let _classDescriptor;
420
+ let _classExtraInitializers = [];
421
+ let _classThis;
422
+ let _classSuper = BarrierOperatorCC;
423
+ var BarrierOperatorCCSet2 = class extends _classSuper {
424
+ static {
425
+ _classThis = this;
426
+ }
427
+ static {
428
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
429
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
430
+ BarrierOperatorCCSet2 = _classThis = _classDescriptor.value;
431
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
432
+ __runInitializers(_classThis, _classExtraInitializers);
433
+ }
434
+ constructor(options) {
435
+ super(options);
436
+ this.targetState = options.targetState;
437
+ }
438
+ static from(_raw, _ctx) {
439
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
440
+ }
441
+ targetState;
442
+ serialize(ctx) {
443
+ this.payload = import_safe2.Bytes.from([this.targetState]);
444
+ return super.serialize(ctx);
445
+ }
446
+ toLogEntry(ctx) {
447
+ return {
448
+ ...super.toLogEntry(ctx),
449
+ message: { "target state": this.targetState }
450
+ };
451
+ }
452
+ };
453
+ return BarrierOperatorCCSet2 = _classThis;
454
+ })();
455
+ let BarrierOperatorCCReport = (() => {
456
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("currentState", BarrierOperatorCCValues.currentState), (0, import_CommandClassDecorators.ccValueProperty)("position", BarrierOperatorCCValues.position)];
457
+ let _classDescriptor;
458
+ let _classExtraInitializers = [];
459
+ let _classThis;
460
+ let _classSuper = BarrierOperatorCC;
461
+ var BarrierOperatorCCReport2 = class extends _classSuper {
462
+ static {
463
+ _classThis = this;
464
+ }
465
+ static {
466
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
467
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
468
+ BarrierOperatorCCReport2 = _classThis = _classDescriptor.value;
469
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
470
+ __runInitializers(_classThis, _classExtraInitializers);
471
+ }
472
+ constructor(options) {
473
+ super(options);
474
+ this.position = options.position;
475
+ this.currentState = options.currentState;
476
+ }
477
+ static from(raw, ctx) {
478
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
479
+ const payloadValue = raw.payload[0];
480
+ let position;
481
+ if (payloadValue <= 99) {
482
+ position = payloadValue;
483
+ } else if (payloadValue === 255) {
484
+ position = 100;
485
+ } else {
486
+ position = import_safe.UNKNOWN_STATE;
535
487
  }
536
- };
537
- }
538
- };
539
- BarrierOperatorCCEventSignalingReport = BarrierOperatorCCEventSignalingReport_1 = __decorate([
540
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingReport)
541
- ], BarrierOperatorCCEventSignalingReport);
542
- let BarrierOperatorCCEventSignalingGet = class BarrierOperatorCCEventSignalingGet2 extends BarrierOperatorCC {
543
- constructor(options) {
544
- super(options);
545
- this.subsystemType = options.subsystemType;
546
- }
547
- static from(_raw, _ctx) {
548
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
549
- }
550
- subsystemType;
551
- serialize(ctx) {
552
- this.payload = import_safe2.Bytes.from([this.subsystemType]);
553
- return super.serialize(ctx);
554
- }
555
- toLogEntry(ctx) {
556
- return {
557
- ...super.toLogEntry(ctx),
558
- message: {
559
- "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType)
488
+ let currentState;
489
+ if (payloadValue === import_Types.BarrierState.Closed || payloadValue >= import_Types.BarrierState.Closing) {
490
+ currentState = payloadValue;
491
+ } else if (payloadValue > 0 && payloadValue <= 99) {
492
+ currentState = import_Types.BarrierState.Stopped;
493
+ } else {
494
+ currentState = import_safe.UNKNOWN_STATE;
560
495
  }
561
- };
562
- }
563
- };
564
- BarrierOperatorCCEventSignalingGet = __decorate([
565
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingGet),
566
- (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCEventSignalingReport)
567
- ], BarrierOperatorCCEventSignalingGet);
496
+ return new this({
497
+ nodeId: ctx.sourceNodeId,
498
+ position,
499
+ currentState
500
+ });
501
+ }
502
+ currentState;
503
+ position;
504
+ toLogEntry(ctx) {
505
+ return {
506
+ ...super.toLogEntry(ctx),
507
+ message: {
508
+ "barrier position": (0, import_safe.maybeUnknownToString)(this.position),
509
+ "barrier state": this.currentState != void 0 ? (0, import_safe3.getEnumMemberName)(import_Types.BarrierState, this.currentState) : "unknown"
510
+ }
511
+ };
512
+ }
513
+ };
514
+ return BarrierOperatorCCReport2 = _classThis;
515
+ })();
516
+ let BarrierOperatorCCGet = (() => {
517
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCReport)];
518
+ let _classDescriptor;
519
+ let _classExtraInitializers = [];
520
+ let _classThis;
521
+ let _classSuper = BarrierOperatorCC;
522
+ var BarrierOperatorCCGet2 = class extends _classSuper {
523
+ static {
524
+ _classThis = this;
525
+ }
526
+ static {
527
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
528
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
529
+ BarrierOperatorCCGet2 = _classThis = _classDescriptor.value;
530
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
531
+ __runInitializers(_classThis, _classExtraInitializers);
532
+ }
533
+ };
534
+ return BarrierOperatorCCGet2 = _classThis;
535
+ })();
536
+ let BarrierOperatorCCSignalingCapabilitiesReport = (() => {
537
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSubsystemTypes", BarrierOperatorCCValues.supportedSubsystemTypes)];
538
+ let _classDescriptor;
539
+ let _classExtraInitializers = [];
540
+ let _classThis;
541
+ let _classSuper = BarrierOperatorCC;
542
+ var BarrierOperatorCCSignalingCapabilitiesReport2 = class extends _classSuper {
543
+ static {
544
+ _classThis = this;
545
+ }
546
+ static {
547
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
548
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
549
+ BarrierOperatorCCSignalingCapabilitiesReport2 = _classThis = _classDescriptor.value;
550
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
551
+ __runInitializers(_classThis, _classExtraInitializers);
552
+ }
553
+ constructor(options) {
554
+ super(options);
555
+ this.supportedSubsystemTypes = options.supportedSubsystemTypes;
556
+ }
557
+ static from(raw, ctx) {
558
+ const supportedSubsystemTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.SubsystemType.Audible);
559
+ return new this({
560
+ nodeId: ctx.sourceNodeId,
561
+ supportedSubsystemTypes
562
+ });
563
+ }
564
+ supportedSubsystemTypes;
565
+ toLogEntry(ctx) {
566
+ return {
567
+ ...super.toLogEntry(ctx),
568
+ message: {
569
+ "supported types": this.supportedSubsystemTypes.map((t) => `
570
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")
571
+ }
572
+ };
573
+ }
574
+ };
575
+ return BarrierOperatorCCSignalingCapabilitiesReport2 = _classThis;
576
+ })();
577
+ let BarrierOperatorCCSignalingCapabilitiesGet = (() => {
578
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCSignalingCapabilitiesReport)];
579
+ let _classDescriptor;
580
+ let _classExtraInitializers = [];
581
+ let _classThis;
582
+ let _classSuper = BarrierOperatorCC;
583
+ var BarrierOperatorCCSignalingCapabilitiesGet2 = class extends _classSuper {
584
+ static {
585
+ _classThis = this;
586
+ }
587
+ static {
588
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
589
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
590
+ BarrierOperatorCCSignalingCapabilitiesGet2 = _classThis = _classDescriptor.value;
591
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
592
+ __runInitializers(_classThis, _classExtraInitializers);
593
+ }
594
+ };
595
+ return BarrierOperatorCCSignalingCapabilitiesGet2 = _classThis;
596
+ })();
597
+ let BarrierOperatorCCEventSignalingSet = (() => {
598
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingSet), (0, import_CommandClassDecorators.useSupervision)()];
599
+ let _classDescriptor;
600
+ let _classExtraInitializers = [];
601
+ let _classThis;
602
+ let _classSuper = BarrierOperatorCC;
603
+ var BarrierOperatorCCEventSignalingSet2 = class extends _classSuper {
604
+ static {
605
+ _classThis = this;
606
+ }
607
+ static {
608
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
609
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
610
+ BarrierOperatorCCEventSignalingSet2 = _classThis = _classDescriptor.value;
611
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
612
+ __runInitializers(_classThis, _classExtraInitializers);
613
+ }
614
+ constructor(options) {
615
+ super(options);
616
+ this.subsystemType = options.subsystemType;
617
+ this.subsystemState = options.subsystemState;
618
+ }
619
+ static from(_raw, _ctx) {
620
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
621
+ }
622
+ subsystemType;
623
+ subsystemState;
624
+ serialize(ctx) {
625
+ this.payload = import_safe2.Bytes.from([this.subsystemType, this.subsystemState]);
626
+ return super.serialize(ctx);
627
+ }
628
+ toLogEntry(ctx) {
629
+ return {
630
+ ...super.toLogEntry(ctx),
631
+ message: {
632
+ "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
633
+ "subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
634
+ }
635
+ };
636
+ }
637
+ };
638
+ return BarrierOperatorCCEventSignalingSet2 = _classThis;
639
+ })();
640
+ let BarrierOperatorCCEventSignalingReport = (() => {
641
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingReport)];
642
+ let _classDescriptor;
643
+ let _classExtraInitializers = [];
644
+ let _classThis;
645
+ let _classSuper = BarrierOperatorCC;
646
+ var BarrierOperatorCCEventSignalingReport2 = class extends _classSuper {
647
+ static {
648
+ _classThis = this;
649
+ }
650
+ static {
651
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
652
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
653
+ BarrierOperatorCCEventSignalingReport2 = _classThis = _classDescriptor.value;
654
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
655
+ __runInitializers(_classThis, _classExtraInitializers);
656
+ }
657
+ constructor(options) {
658
+ super(options);
659
+ this.subsystemType = options.subsystemType;
660
+ this.subsystemState = options.subsystemState;
661
+ }
662
+ static from(raw, ctx) {
663
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
664
+ const subsystemType = raw.payload[0];
665
+ const subsystemState = raw.payload[1];
666
+ return new this({
667
+ nodeId: ctx.sourceNodeId,
668
+ subsystemType,
669
+ subsystemState
670
+ });
671
+ }
672
+ persistValues(ctx) {
673
+ if (!super.persistValues(ctx))
674
+ return false;
675
+ const signalingStateValue = BarrierOperatorCCValues.signalingState(this.subsystemType);
676
+ this.ensureMetadata(ctx, signalingStateValue);
677
+ this.setValue(ctx, signalingStateValue, this.subsystemState);
678
+ return true;
679
+ }
680
+ subsystemType;
681
+ subsystemState;
682
+ toLogEntry(ctx) {
683
+ return {
684
+ ...super.toLogEntry(ctx),
685
+ message: {
686
+ "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
687
+ "subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
688
+ }
689
+ };
690
+ }
691
+ };
692
+ return BarrierOperatorCCEventSignalingReport2 = _classThis;
693
+ })();
694
+ let BarrierOperatorCCEventSignalingGet = (() => {
695
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingGet), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCEventSignalingReport)];
696
+ let _classDescriptor;
697
+ let _classExtraInitializers = [];
698
+ let _classThis;
699
+ let _classSuper = BarrierOperatorCC;
700
+ var BarrierOperatorCCEventSignalingGet2 = class extends _classSuper {
701
+ static {
702
+ _classThis = this;
703
+ }
704
+ static {
705
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
706
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
707
+ BarrierOperatorCCEventSignalingGet2 = _classThis = _classDescriptor.value;
708
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
709
+ __runInitializers(_classThis, _classExtraInitializers);
710
+ }
711
+ constructor(options) {
712
+ super(options);
713
+ this.subsystemType = options.subsystemType;
714
+ }
715
+ static from(_raw, _ctx) {
716
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
717
+ }
718
+ subsystemType;
719
+ serialize(ctx) {
720
+ this.payload = import_safe2.Bytes.from([this.subsystemType]);
721
+ return super.serialize(ctx);
722
+ }
723
+ toLogEntry(ctx) {
724
+ return {
725
+ ...super.toLogEntry(ctx),
726
+ message: {
727
+ "subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType)
728
+ }
729
+ };
730
+ }
731
+ };
732
+ return BarrierOperatorCCEventSignalingGet2 = _classThis;
733
+ })();
568
734
  // Annotate the CommonJS export names for ESM import in node:
569
735
  0 && (module.exports = {
570
736
  BarrierOperatorCC,