@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
@@ -1,10 +1,37 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- 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;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
6
34
  };
7
- var FibaroCC_1, FibaroVenetianBlindCCReport_1, FibaroVenetianBlindCCGet_1;
8
35
  function __assertType(argName, typeName, boundHasError) {
9
36
  const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
10
37
  if (boundHasError()) {
@@ -68,146 +95,172 @@ export var FibaroCCIDs;
68
95
  (function (FibaroCCIDs) {
69
96
  FibaroCCIDs[FibaroCCIDs["VenetianBlind"] = 38] = "VenetianBlind";
70
97
  })(FibaroCCIDs || (FibaroCCIDs = {}));
71
- let FibaroCCAPI = class FibaroCCAPI extends ManufacturerProprietaryCCAPI {
72
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
73
- async fibaroVenetianBlindsGet() {
74
- const cc = new FibaroVenetianBlindCCGet({
75
- nodeId: this.endpoint.nodeId,
76
- endpointIndex: this.endpoint.index,
77
- });
78
- const response = await this.host.sendCommand(cc, this.commandOptions);
79
- if (response) {
80
- return pick(response, ["position", "tilt"]);
98
+ let FibaroCCAPI = (() => {
99
+ let _classDecorators = [manufacturerProprietaryAPI(MANUFACTURERID_FIBARO)];
100
+ let _classDescriptor;
101
+ let _classExtraInitializers = [];
102
+ let _classThis;
103
+ let _classSuper = ManufacturerProprietaryCCAPI;
104
+ var FibaroCCAPI = class extends _classSuper {
105
+ static { _classThis = this; }
106
+ static {
107
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
108
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
109
+ FibaroCCAPI = _classThis = _classDescriptor.value;
110
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
111
+ __runInitializers(_classThis, _classExtraInitializers);
81
112
  }
82
- }
83
- async fibaroVenetianBlindsSetPosition(value) {
84
- __assertType("value", "number", __assertType__number.bind(void 0, value));
85
- const cc = new FibaroVenetianBlindCCSet({
86
- nodeId: this.endpoint.nodeId,
87
- endpointIndex: this.endpoint.index,
88
- position: value,
89
- });
90
- await this.host.sendCommand(cc, this.commandOptions);
91
- }
92
- async fibaroVenetianBlindsSetTilt(value) {
93
- __assertType("value", "number", __assertType__number.bind(void 0, value));
94
- const cc = new FibaroVenetianBlindCCSet({
95
- nodeId: this.endpoint.nodeId,
96
- endpointIndex: this.endpoint.index,
97
- tilt: value,
98
- });
99
- await this.host.sendCommand(cc, this.commandOptions);
100
- }
101
- get [SET_VALUE]() {
102
- return async function ({ property, propertyKey }, value) {
103
- if (property !== "fibaro") {
104
- throwUnsupportedProperty(this.ccId, property);
113
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
114
+ async fibaroVenetianBlindsGet() {
115
+ const cc = new FibaroVenetianBlindCCGet({
116
+ nodeId: this.endpoint.nodeId,
117
+ endpointIndex: this.endpoint.index,
118
+ });
119
+ const response = await this.host.sendCommand(cc, this.commandOptions);
120
+ if (response) {
121
+ return pick(response, ["position", "tilt"]);
105
122
  }
106
- if (propertyKey === "venetianBlindsPosition") {
107
- if (typeof value !== "number") {
108
- throwWrongValueType(this.ccId, property, "number", typeof value);
123
+ }
124
+ async fibaroVenetianBlindsSetPosition(value) {
125
+ __assertType("value", "number", __assertType__number.bind(void 0, value));
126
+ const cc = new FibaroVenetianBlindCCSet({
127
+ nodeId: this.endpoint.nodeId,
128
+ endpointIndex: this.endpoint.index,
129
+ position: value,
130
+ });
131
+ await this.host.sendCommand(cc, this.commandOptions);
132
+ }
133
+ async fibaroVenetianBlindsSetTilt(value) {
134
+ __assertType("value", "number", __assertType__number.bind(void 0, value));
135
+ const cc = new FibaroVenetianBlindCCSet({
136
+ nodeId: this.endpoint.nodeId,
137
+ endpointIndex: this.endpoint.index,
138
+ tilt: value,
139
+ });
140
+ await this.host.sendCommand(cc, this.commandOptions);
141
+ }
142
+ get [SET_VALUE]() {
143
+ return async function ({ property, propertyKey }, value) {
144
+ if (property !== "fibaro") {
145
+ throwUnsupportedProperty(this.ccId, property);
109
146
  }
110
- await this.fibaroVenetianBlindsSetPosition(value);
111
- }
112
- else if (propertyKey === "venetianBlindsTilt") {
113
- if (typeof value !== "number") {
114
- throwWrongValueType(this.ccId, property, "number", typeof value);
147
+ if (propertyKey === "venetianBlindsPosition") {
148
+ if (typeof value !== "number") {
149
+ throwWrongValueType(this.ccId, property, "number", typeof value);
150
+ }
151
+ await this.fibaroVenetianBlindsSetPosition(value);
115
152
  }
116
- await this.fibaroVenetianBlindsSetTilt(value);
117
- }
118
- else {
119
- // unsupported property key, ignore...
120
- return;
121
- }
122
- // Verify the current value after a delay
123
- this.schedulePoll({ property, propertyKey }, value);
124
- return undefined;
125
- };
126
- }
127
- get [POLL_VALUE]() {
128
- return async function ({ property, propertyKey }) {
129
- if (property !== "fibaro") {
130
- throwUnsupportedProperty(this.ccId, property);
131
- }
132
- else if (propertyKey == undefined) {
133
- throwMissingPropertyKey(this.ccId, property);
134
- }
135
- switch (propertyKey) {
136
- case "venetianBlindsPosition":
137
- return (await this.fibaroVenetianBlindsGet())?.position;
138
- case "venetianBlindsTilt":
139
- return (await this.fibaroVenetianBlindsGet())?.tilt;
140
- default:
141
- throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
142
- }
143
- };
144
- }
145
- };
146
- FibaroCCAPI = __decorate([
147
- manufacturerProprietaryAPI(MANUFACTURERID_FIBARO)
148
- ], FibaroCCAPI);
153
+ else if (propertyKey === "venetianBlindsTilt") {
154
+ if (typeof value !== "number") {
155
+ throwWrongValueType(this.ccId, property, "number", typeof value);
156
+ }
157
+ await this.fibaroVenetianBlindsSetTilt(value);
158
+ }
159
+ else {
160
+ // unsupported property key, ignore...
161
+ return;
162
+ }
163
+ // Verify the current value after a delay
164
+ this.schedulePoll({ property, propertyKey }, value);
165
+ return undefined;
166
+ };
167
+ }
168
+ get [POLL_VALUE]() {
169
+ return async function ({ property, propertyKey }) {
170
+ if (property !== "fibaro") {
171
+ throwUnsupportedProperty(this.ccId, property);
172
+ }
173
+ else if (propertyKey == undefined) {
174
+ throwMissingPropertyKey(this.ccId, property);
175
+ }
176
+ switch (propertyKey) {
177
+ case "venetianBlindsPosition":
178
+ return (await this.fibaroVenetianBlindsGet())?.position;
179
+ case "venetianBlindsTilt":
180
+ return (await this.fibaroVenetianBlindsGet())?.tilt;
181
+ default:
182
+ throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
183
+ }
184
+ };
185
+ }
186
+ };
187
+ return FibaroCCAPI = _classThis;
188
+ })();
149
189
  export { FibaroCCAPI };
150
- let FibaroCC = FibaroCC_1 = class FibaroCC extends ManufacturerProprietaryCC {
151
- constructor(options) {
152
- super(options);
153
- this.fibaroCCId = getFibaroCCId(this);
154
- this.fibaroCCCommand = getFibaroCCCommand(this);
155
- }
156
- static from(raw, ctx) {
157
- validatePayload(raw.payload.length >= 2);
158
- const fibaroCCId = raw.payload[0];
159
- const fibaroCCCommand = raw.payload[1];
160
- const FibaroConstructor = getFibaroCCCommandConstructor(fibaroCCId, fibaroCCCommand);
161
- if (FibaroConstructor) {
162
- return FibaroConstructor.from(raw.withPayload(raw.payload.subarray(2)), ctx);
190
+ let FibaroCC = (() => {
191
+ let _classDecorators = [manufacturerId(MANUFACTURERID_FIBARO)];
192
+ let _classDescriptor;
193
+ let _classExtraInitializers = [];
194
+ let _classThis;
195
+ let _classSuper = ManufacturerProprietaryCC;
196
+ var FibaroCC = class extends _classSuper {
197
+ static { _classThis = this; }
198
+ static {
199
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
200
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
201
+ FibaroCC = _classThis = _classDescriptor.value;
202
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
203
+ __runInitializers(_classThis, _classExtraInitializers);
163
204
  }
164
- return new FibaroCC_1({
165
- nodeId: ctx.sourceNodeId,
166
- });
167
- }
168
- fibaroCCId;
169
- fibaroCCCommand;
170
- async interview(ctx) {
171
- const node = this.getNode(ctx);
172
- // Iterate through all supported Fibaro CCs and interview them
173
- const supportedFibaroCCIDs = getSupportedFibaroCCIDs(ctx, node.id);
174
- for (const ccId of supportedFibaroCCIDs) {
175
- const SubConstructor = getFibaroCCConstructor(ccId);
176
- if (SubConstructor) {
177
- const instance = new SubConstructor({ nodeId: node.id });
178
- await instance.interview(ctx);
205
+ constructor(options) {
206
+ super(options);
207
+ this.fibaroCCId = getFibaroCCId(this);
208
+ this.fibaroCCCommand = getFibaroCCCommand(this);
209
+ }
210
+ static from(raw, ctx) {
211
+ validatePayload(raw.payload.length >= 2);
212
+ const fibaroCCId = raw.payload[0];
213
+ const fibaroCCCommand = raw.payload[1];
214
+ const FibaroConstructor = getFibaroCCCommandConstructor(fibaroCCId, fibaroCCCommand);
215
+ if (FibaroConstructor) {
216
+ return FibaroConstructor.from(raw.withPayload(raw.payload.subarray(2)), ctx);
179
217
  }
218
+ return new FibaroCC({
219
+ nodeId: ctx.sourceNodeId,
220
+ });
180
221
  }
181
- }
182
- async refreshValues(ctx) {
183
- const node = this.getNode(ctx);
184
- // Iterate through all supported Fibaro CCs and let them refresh their values
185
- const supportedFibaroCCIDs = getSupportedFibaroCCIDs(ctx, node.id);
186
- for (const ccId of supportedFibaroCCIDs) {
187
- const SubConstructor = getFibaroCCConstructor(ccId);
188
- if (SubConstructor) {
189
- const instance = new SubConstructor({ nodeId: node.id });
190
- await instance.refreshValues(ctx);
222
+ fibaroCCId;
223
+ fibaroCCCommand;
224
+ async interview(ctx) {
225
+ const node = this.getNode(ctx);
226
+ // Iterate through all supported Fibaro CCs and interview them
227
+ const supportedFibaroCCIDs = getSupportedFibaroCCIDs(ctx, node.id);
228
+ for (const ccId of supportedFibaroCCIDs) {
229
+ const SubConstructor = getFibaroCCConstructor(ccId);
230
+ if (SubConstructor) {
231
+ const instance = new SubConstructor({ nodeId: node.id });
232
+ await instance.interview(ctx);
233
+ }
191
234
  }
192
235
  }
193
- }
194
- serialize(ctx) {
195
- if (this.fibaroCCId == undefined) {
196
- throw new ZWaveError("Cannot serialize a Fibaro CC without a Fibaro CC ID", ZWaveErrorCodes.CC_Invalid);
236
+ async refreshValues(ctx) {
237
+ const node = this.getNode(ctx);
238
+ // Iterate through all supported Fibaro CCs and let them refresh their values
239
+ const supportedFibaroCCIDs = getSupportedFibaroCCIDs(ctx, node.id);
240
+ for (const ccId of supportedFibaroCCIDs) {
241
+ const SubConstructor = getFibaroCCConstructor(ccId);
242
+ if (SubConstructor) {
243
+ const instance = new SubConstructor({ nodeId: node.id });
244
+ await instance.refreshValues(ctx);
245
+ }
246
+ }
197
247
  }
198
- else if (this.fibaroCCCommand == undefined) {
199
- throw new ZWaveError("Cannot serialize a Fibaro CC without a Fibaro CC Command", ZWaveErrorCodes.CC_Invalid);
248
+ serialize(ctx) {
249
+ if (this.fibaroCCId == undefined) {
250
+ throw new ZWaveError("Cannot serialize a Fibaro CC without a Fibaro CC ID", ZWaveErrorCodes.CC_Invalid);
251
+ }
252
+ else if (this.fibaroCCCommand == undefined) {
253
+ throw new ZWaveError("Cannot serialize a Fibaro CC without a Fibaro CC Command", ZWaveErrorCodes.CC_Invalid);
254
+ }
255
+ this.payload = Bytes.concat([
256
+ Bytes.from([this.fibaroCCId, this.fibaroCCCommand]),
257
+ this.payload,
258
+ ]);
259
+ return super.serialize(ctx);
200
260
  }
201
- this.payload = Bytes.concat([
202
- Bytes.from([this.fibaroCCId, this.fibaroCCCommand]),
203
- this.payload,
204
- ]);
205
- return super.serialize(ctx);
206
- }
207
- };
208
- FibaroCC = FibaroCC_1 = __decorate([
209
- manufacturerId(MANUFACTURERID_FIBARO)
210
- ], FibaroCC);
261
+ };
262
+ return FibaroCC = _classThis;
263
+ })();
211
264
  export { FibaroCC };
212
265
  export var FibaroVenetianBlindCCCommand;
213
266
  (function (FibaroVenetianBlindCCCommand) {
@@ -215,171 +268,222 @@ export var FibaroVenetianBlindCCCommand;
215
268
  FibaroVenetianBlindCCCommand[FibaroVenetianBlindCCCommand["Get"] = 2] = "Get";
216
269
  FibaroVenetianBlindCCCommand[FibaroVenetianBlindCCCommand["Report"] = 3] = "Report";
217
270
  })(FibaroVenetianBlindCCCommand || (FibaroVenetianBlindCCCommand = {}));
218
- let FibaroVenetianBlindCC = class FibaroVenetianBlindCC extends FibaroCC {
219
- constructor(options) {
220
- super(options);
221
- this.fibaroCCId = FibaroCCIDs.VenetianBlind;
222
- }
223
- async interview(ctx) {
224
- const node = this.getNode(ctx);
225
- ctx.logNode(node.id, {
226
- endpoint: this.endpointIndex,
227
- message: `Interviewing Fibaro Venetian Blind CC...`,
228
- direction: "none",
229
- });
230
- // Nothing special, just get the values
231
- await this.refreshValues(ctx);
232
- }
233
- async refreshValues(ctx) {
234
- const node = this.getNode(ctx);
235
- ctx.logNode(node.id, {
236
- message: "Requesting venetian blind position and tilt...",
237
- direction: "outbound",
238
- });
239
- const resp = await ctx.sendCommand(new FibaroVenetianBlindCCGet({
240
- nodeId: this.nodeId,
241
- endpointIndex: this.endpointIndex,
242
- }));
243
- if (resp) {
244
- const logMessage = `received venetian blind state:
245
- position: ${resp.position}
246
- tilt: ${resp.tilt}`;
271
+ let FibaroVenetianBlindCC = (() => {
272
+ let _classDecorators = [fibaroCC(FibaroCCIDs.VenetianBlind)];
273
+ let _classDescriptor;
274
+ let _classExtraInitializers = [];
275
+ let _classThis;
276
+ let _classSuper = FibaroCC;
277
+ var FibaroVenetianBlindCC = class extends _classSuper {
278
+ static { _classThis = this; }
279
+ static {
280
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
281
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
282
+ FibaroVenetianBlindCC = _classThis = _classDescriptor.value;
283
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
284
+ __runInitializers(_classThis, _classExtraInitializers);
285
+ }
286
+ constructor(options) {
287
+ super(options);
288
+ this.fibaroCCId = FibaroCCIDs.VenetianBlind;
289
+ }
290
+ async interview(ctx) {
291
+ const node = this.getNode(ctx);
247
292
  ctx.logNode(node.id, {
248
- message: logMessage,
249
- direction: "inbound",
293
+ endpoint: this.endpointIndex,
294
+ message: `Interviewing Fibaro Venetian Blind CC...`,
295
+ direction: "none",
250
296
  });
297
+ // Nothing special, just get the values
298
+ await this.refreshValues(ctx);
251
299
  }
252
- }
253
- };
254
- FibaroVenetianBlindCC = __decorate([
255
- fibaroCC(FibaroCCIDs.VenetianBlind)
256
- ], FibaroVenetianBlindCC);
300
+ async refreshValues(ctx) {
301
+ const node = this.getNode(ctx);
302
+ ctx.logNode(node.id, {
303
+ message: "Requesting venetian blind position and tilt...",
304
+ direction: "outbound",
305
+ });
306
+ const resp = await ctx.sendCommand(new FibaroVenetianBlindCCGet({
307
+ nodeId: this.nodeId,
308
+ endpointIndex: this.endpointIndex,
309
+ }));
310
+ if (resp) {
311
+ const logMessage = `received venetian blind state:
312
+ position: ${resp.position}
313
+ tilt: ${resp.tilt}`;
314
+ ctx.logNode(node.id, {
315
+ message: logMessage,
316
+ direction: "inbound",
317
+ });
318
+ }
319
+ }
320
+ };
321
+ return FibaroVenetianBlindCC = _classThis;
322
+ })();
257
323
  export { FibaroVenetianBlindCC };
258
- let FibaroVenetianBlindCCSet = class FibaroVenetianBlindCCSet extends FibaroVenetianBlindCC {
259
- constructor(options) {
260
- super(options);
261
- this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Set;
262
- if ("position" in options)
263
- this.position = options.position;
264
- if ("tilt" in options)
265
- this.tilt = options.tilt;
266
- }
267
- static from(_raw, _ctx) {
268
- // TODO: Deserialize payload
269
- throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
270
- }
271
- position;
272
- tilt;
273
- serialize(ctx) {
274
- const controlByte = (this.position != undefined ? 0b10 : 0)
275
- | (this.tilt != undefined ? 0b01 : 0);
276
- this.payload = Bytes.from([
277
- controlByte,
278
- this.position ?? 0,
279
- this.tilt ?? 0,
280
- ]);
281
- return super.serialize(ctx);
282
- }
283
- toLogEntry(ctx) {
284
- const message = {};
285
- if (this.position != undefined) {
286
- message.position = this.position;
324
+ let FibaroVenetianBlindCCSet = (() => {
325
+ let _classDecorators = [fibaroCCCommand(FibaroVenetianBlindCCCommand.Set)];
326
+ let _classDescriptor;
327
+ let _classExtraInitializers = [];
328
+ let _classThis;
329
+ let _classSuper = FibaroVenetianBlindCC;
330
+ var FibaroVenetianBlindCCSet = class extends _classSuper {
331
+ static { _classThis = this; }
332
+ static {
333
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
334
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
335
+ FibaroVenetianBlindCCSet = _classThis = _classDescriptor.value;
336
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
337
+ __runInitializers(_classThis, _classExtraInitializers);
287
338
  }
288
- if (this.tilt != undefined) {
289
- message.tilt = this.tilt;
339
+ constructor(options) {
340
+ super(options);
341
+ this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Set;
342
+ if ("position" in options)
343
+ this.position = options.position;
344
+ if ("tilt" in options)
345
+ this.tilt = options.tilt;
290
346
  }
291
- return {
292
- ...super.toLogEntry(ctx),
293
- message,
294
- };
295
- }
296
- };
297
- FibaroVenetianBlindCCSet = __decorate([
298
- fibaroCCCommand(FibaroVenetianBlindCCCommand.Set)
299
- ], FibaroVenetianBlindCCSet);
300
- export { FibaroVenetianBlindCCSet };
301
- let FibaroVenetianBlindCCReport = FibaroVenetianBlindCCReport_1 = class FibaroVenetianBlindCCReport extends FibaroVenetianBlindCC {
302
- constructor(options) {
303
- super(options);
304
- this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Report;
305
- // TODO: Check implementation:
306
- this.position = options.position;
307
- this.tilt = options.tilt;
308
- }
309
- static from(raw, ctx) {
310
- validatePayload(raw.payload.length >= 3);
311
- // When the node sends a report, payload[0] === 0b11. This is probably a
312
- // bit mask for position and tilt
313
- let position;
314
- if (!!(raw.payload[0] & 0b10)) {
315
- position = parseMaybeNumber(raw.payload[1]);
347
+ static from(_raw, _ctx) {
348
+ // TODO: Deserialize payload
349
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
316
350
  }
317
- let tilt;
318
- if (!!(raw.payload[0] & 0b01)) {
319
- tilt = parseMaybeNumber(raw.payload[2]);
351
+ position;
352
+ tilt;
353
+ serialize(ctx) {
354
+ const controlByte = (this.position != undefined ? 0b10 : 0)
355
+ | (this.tilt != undefined ? 0b01 : 0);
356
+ this.payload = Bytes.from([
357
+ controlByte,
358
+ this.position ?? 0,
359
+ this.tilt ?? 0,
360
+ ]);
361
+ return super.serialize(ctx);
320
362
  }
321
- return new FibaroVenetianBlindCCReport_1({
322
- nodeId: ctx.sourceNodeId,
323
- position,
324
- tilt,
325
- });
326
- }
327
- persistValues(ctx) {
328
- if (!super.persistValues(ctx))
329
- return false;
330
- const valueDB = this.getValueDB(ctx);
331
- if (this.position != undefined) {
332
- const positionValueId = getFibaroVenetianBlindPositionValueId(this.endpointIndex);
333
- valueDB.setMetadata(positionValueId, {
334
- ...ValueMetadata.Level,
335
- label: "Venetian blinds position",
336
- });
337
- valueDB.setValue(positionValueId, this.position);
363
+ toLogEntry(ctx) {
364
+ const message = {};
365
+ if (this.position != undefined) {
366
+ message.position = this.position;
367
+ }
368
+ if (this.tilt != undefined) {
369
+ message.tilt = this.tilt;
370
+ }
371
+ return {
372
+ ...super.toLogEntry(ctx),
373
+ message,
374
+ };
338
375
  }
339
- if (this.tilt != undefined) {
340
- const tiltValueId = getFibaroVenetianBlindTiltValueId(this.endpointIndex);
341
- valueDB.setMetadata(tiltValueId, {
342
- ...ValueMetadata.Level,
343
- label: "Venetian blinds tilt",
376
+ };
377
+ return FibaroVenetianBlindCCSet = _classThis;
378
+ })();
379
+ export { FibaroVenetianBlindCCSet };
380
+ let FibaroVenetianBlindCCReport = (() => {
381
+ let _classDecorators = [fibaroCCCommand(FibaroVenetianBlindCCCommand.Report)];
382
+ let _classDescriptor;
383
+ let _classExtraInitializers = [];
384
+ let _classThis;
385
+ let _classSuper = FibaroVenetianBlindCC;
386
+ var FibaroVenetianBlindCCReport = class extends _classSuper {
387
+ static { _classThis = this; }
388
+ static {
389
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
390
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
391
+ FibaroVenetianBlindCCReport = _classThis = _classDescriptor.value;
392
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
393
+ __runInitializers(_classThis, _classExtraInitializers);
394
+ }
395
+ constructor(options) {
396
+ super(options);
397
+ this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Report;
398
+ // TODO: Check implementation:
399
+ this.position = options.position;
400
+ this.tilt = options.tilt;
401
+ }
402
+ static from(raw, ctx) {
403
+ validatePayload(raw.payload.length >= 3);
404
+ // When the node sends a report, payload[0] === 0b11. This is probably a
405
+ // bit mask for position and tilt
406
+ let position;
407
+ if (!!(raw.payload[0] & 0b10)) {
408
+ position = parseMaybeNumber(raw.payload[1]);
409
+ }
410
+ let tilt;
411
+ if (!!(raw.payload[0] & 0b01)) {
412
+ tilt = parseMaybeNumber(raw.payload[2]);
413
+ }
414
+ return new this({
415
+ nodeId: ctx.sourceNodeId,
416
+ position,
417
+ tilt,
344
418
  });
345
- valueDB.setValue(tiltValueId, this.tilt);
346
419
  }
347
- return true;
348
- }
349
- position;
350
- tilt;
351
- toLogEntry(ctx) {
352
- const message = {};
353
- if (this.position != undefined) {
354
- message.position = this.position;
420
+ persistValues(ctx) {
421
+ if (!super.persistValues(ctx))
422
+ return false;
423
+ const valueDB = this.getValueDB(ctx);
424
+ if (this.position != undefined) {
425
+ const positionValueId = getFibaroVenetianBlindPositionValueId(this.endpointIndex);
426
+ valueDB.setMetadata(positionValueId, {
427
+ ...ValueMetadata.Level,
428
+ label: "Venetian blinds position",
429
+ });
430
+ valueDB.setValue(positionValueId, this.position);
431
+ }
432
+ if (this.tilt != undefined) {
433
+ const tiltValueId = getFibaroVenetianBlindTiltValueId(this.endpointIndex);
434
+ valueDB.setMetadata(tiltValueId, {
435
+ ...ValueMetadata.Level,
436
+ label: "Venetian blinds tilt",
437
+ });
438
+ valueDB.setValue(tiltValueId, this.tilt);
439
+ }
440
+ return true;
355
441
  }
356
- if (this.tilt != undefined) {
357
- message.tilt = this.tilt;
442
+ position;
443
+ tilt;
444
+ toLogEntry(ctx) {
445
+ const message = {};
446
+ if (this.position != undefined) {
447
+ message.position = this.position;
448
+ }
449
+ if (this.tilt != undefined) {
450
+ message.tilt = this.tilt;
451
+ }
452
+ return {
453
+ ...super.toLogEntry(ctx),
454
+ message,
455
+ };
358
456
  }
359
- return {
360
- ...super.toLogEntry(ctx),
361
- message,
362
- };
363
- }
364
- };
365
- FibaroVenetianBlindCCReport = FibaroVenetianBlindCCReport_1 = __decorate([
366
- fibaroCCCommand(FibaroVenetianBlindCCCommand.Report)
367
- ], FibaroVenetianBlindCCReport);
457
+ };
458
+ return FibaroVenetianBlindCCReport = _classThis;
459
+ })();
368
460
  export { FibaroVenetianBlindCCReport };
369
- let FibaroVenetianBlindCCGet = FibaroVenetianBlindCCGet_1 = class FibaroVenetianBlindCCGet extends FibaroVenetianBlindCC {
370
- constructor(options) {
371
- super(options);
372
- this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Get;
373
- }
374
- static from(raw, ctx) {
375
- return new FibaroVenetianBlindCCGet_1({
376
- nodeId: ctx.sourceNodeId,
377
- });
378
- }
379
- };
380
- FibaroVenetianBlindCCGet = FibaroVenetianBlindCCGet_1 = __decorate([
381
- fibaroCCCommand(FibaroVenetianBlindCCCommand.Get),
382
- expectedCCResponse(FibaroVenetianBlindCCReport)
383
- ], FibaroVenetianBlindCCGet);
461
+ let FibaroVenetianBlindCCGet = (() => {
462
+ let _classDecorators = [fibaroCCCommand(FibaroVenetianBlindCCCommand.Get), expectedCCResponse(FibaroVenetianBlindCCReport)];
463
+ let _classDescriptor;
464
+ let _classExtraInitializers = [];
465
+ let _classThis;
466
+ let _classSuper = FibaroVenetianBlindCC;
467
+ var FibaroVenetianBlindCCGet = class extends _classSuper {
468
+ static { _classThis = this; }
469
+ static {
470
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
471
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
472
+ FibaroVenetianBlindCCGet = _classThis = _classDescriptor.value;
473
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
474
+ __runInitializers(_classThis, _classExtraInitializers);
475
+ }
476
+ constructor(options) {
477
+ super(options);
478
+ this.fibaroCCCommand = FibaroVenetianBlindCCCommand.Get;
479
+ }
480
+ static from(raw, ctx) {
481
+ return new this({
482
+ nodeId: ctx.sourceNodeId,
483
+ });
484
+ }
485
+ };
486
+ return FibaroVenetianBlindCCGet = _classThis;
487
+ })();
384
488
  export { FibaroVenetianBlindCCGet };
385
489
  //# sourceMappingURL=FibaroCC.js.map