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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +381 -266
  2. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  3. package/build/cjs/cc/AssociationCC.js +669 -503
  4. package/build/cjs/cc/AssociationCC.js.map +3 -3
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  7. package/build/cjs/cc/BarrierOperatorCC.js +595 -429
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  9. package/build/cjs/cc/BasicCC.js +354 -260
  10. package/build/cjs/cc/BasicCC.js.map +3 -3
  11. package/build/cjs/cc/BatteryCC.js +427 -345
  12. package/build/cjs/cc/BatteryCC.js.map +3 -3
  13. package/build/cjs/cc/BinarySensorCC.js +391 -276
  14. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  15. package/build/cjs/cc/BinarySwitchCC.js +347 -253
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.js +160 -85
  18. package/build/cjs/cc/CRC16CC.js.map +3 -3
  19. package/build/cjs/cc/CentralSceneCC.js +459 -324
  20. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  21. package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  23. package/build/cjs/cc/ClockCC.js +254 -150
  24. package/build/cjs/cc/ClockCC.js.map +3 -3
  25. package/build/cjs/cc/ColorSwitchCC.js +758 -610
  26. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  27. package/build/cjs/cc/ConfigurationCC.js +1700 -1453
  28. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  29. package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
  30. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  31. package/build/cjs/cc/DoorLockCC.js +904 -777
  32. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  33. package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
  34. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  35. package/build/cjs/cc/EnergyProductionCC.js +249 -160
  36. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  37. package/build/cjs/cc/EntryControlCC.js +619 -458
  38. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  39. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
  40. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  41. package/build/cjs/cc/HailCC.js +57 -11
  42. package/build/cjs/cc/HailCC.js.map +2 -2
  43. package/build/cjs/cc/HumidityControlModeCC.js +359 -233
  44. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  45. package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
  46. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  47. package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
  48. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  49. package/build/cjs/cc/InclusionControllerCC.js +205 -114
  50. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  51. package/build/cjs/cc/IndicatorCC.js +897 -736
  52. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  53. package/build/cjs/cc/IrrigationCC.js +1651 -1405
  54. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  55. package/build/cjs/cc/LanguageCC.js +268 -171
  56. package/build/cjs/cc/LanguageCC.js.map +3 -3
  57. package/build/cjs/cc/LockCC.js +254 -154
  58. package/build/cjs/cc/LockCC.js.map +3 -3
  59. package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
  60. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  61. package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
  62. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  63. package/build/cjs/cc/MeterCC.js +827 -707
  64. package/build/cjs/cc/MeterCC.js.map +3 -3
  65. package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
  66. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  67. package/build/cjs/cc/MultiChannelCC.js +1037 -819
  68. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  69. package/build/cjs/cc/MultiCommandCC.js +172 -97
  70. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  71. package/build/cjs/cc/MultilevelSensorCC.js +589 -449
  72. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  73. package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
  74. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  75. package/build/cjs/cc/NoOperationCC.js +89 -27
  76. package/build/cjs/cc/NoOperationCC.js.map +2 -2
  77. package/build/cjs/cc/NodeNamingCC.js +417 -277
  78. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  79. package/build/cjs/cc/NotificationCC.js +972 -818
  80. package/build/cjs/cc/NotificationCC.js.map +3 -3
  81. package/build/cjs/cc/PowerlevelCC.js +450 -303
  82. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  83. package/build/cjs/cc/ProtectionCC.js +686 -494
  84. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  85. package/build/cjs/cc/SceneActivationCC.js +165 -97
  86. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  87. package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
  88. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  89. package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
  90. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  91. package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
  92. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  93. package/build/cjs/cc/Security2CC.js +1483 -1219
  94. package/build/cjs/cc/Security2CC.js.map +3 -3
  95. package/build/cjs/cc/SecurityCC.js +839 -619
  96. package/build/cjs/cc/SecurityCC.js.map +3 -3
  97. package/build/cjs/cc/SoundSwitchCC.js +707 -515
  98. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  99. package/build/cjs/cc/SupervisionCC.js +327 -237
  100. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  101. package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
  102. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  103. package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
  104. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  105. package/build/cjs/cc/ThermostatModeCC.js +425 -302
  106. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  107. package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
  108. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  109. package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
  110. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  111. package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
  112. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  113. package/build/cjs/cc/TimeCC.js +515 -353
  114. package/build/cjs/cc/TimeCC.js.map +3 -3
  115. package/build/cjs/cc/TimeParametersCC.js +302 -202
  116. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  117. package/build/cjs/cc/TransportServiceCC.js +433 -315
  118. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  119. package/build/cjs/cc/UserCodeCC.js +1385 -1102
  120. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  121. package/build/cjs/cc/VersionCC.js +696 -562
  122. package/build/cjs/cc/VersionCC.js.map +3 -3
  123. package/build/cjs/cc/WakeUpCC.js +499 -346
  124. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  125. package/build/cjs/cc/WindowCoveringCC.js +626 -478
  126. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  127. package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
  128. package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
  129. package/build/cjs/cc/ZWavePlusCC.js +233 -159
  130. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  131. package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
  132. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  133. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  134. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  135. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
  136. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  137. package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
  138. package/build/cjs/lib/CommandClassDecorators.js +19 -20
  139. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  140. package/build/cjs/lib/Security2/Extension.d.ts +1 -1
  141. package/build/cjs/lib/Security2/Extension.js +217 -126
  142. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  143. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/AlarmSensorCC.js +389 -291
  145. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  146. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  147. package/build/esm/cc/AssociationCC.js +678 -537
  148. package/build/esm/cc/AssociationCC.js.map +1 -1
  149. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  150. package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
  151. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  152. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  153. package/build/esm/cc/BarrierOperatorCC.js +634 -493
  154. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  155. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  156. package/build/esm/cc/BasicCC.js +380 -302
  157. package/build/esm/cc/BasicCC.js.map +1 -1
  158. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  159. package/build/esm/cc/BatteryCC.js +449 -384
  160. package/build/esm/cc/BatteryCC.js.map +1 -1
  161. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  162. package/build/esm/cc/BinarySensorCC.js +395 -297
  163. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  164. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  165. package/build/esm/cc/BinarySwitchCC.js +353 -274
  166. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  167. package/build/esm/cc/CRC16CC.js +162 -98
  168. package/build/esm/cc/CRC16CC.js.map +1 -1
  169. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  170. package/build/esm/cc/CentralSceneCC.js +465 -351
  171. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  172. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  173. package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
  174. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  175. package/build/esm/cc/ClockCC.js +248 -159
  176. package/build/esm/cc/ClockCC.js.map +1 -1
  177. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  178. package/build/esm/cc/ColorSwitchCC.js +802 -677
  179. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  180. package/build/esm/cc/ConfigurationCC.js +1899 -1687
  181. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  182. package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
  183. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  184. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  185. package/build/esm/cc/DoorLockCC.js +951 -849
  186. package/build/esm/cc/DoorLockCC.js.map +1 -1
  187. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  188. package/build/esm/cc/DoorLockLoggingCC.js +316 -218
  189. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  190. package/build/esm/cc/EnergyProductionCC.js +240 -164
  191. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  192. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  193. package/build/esm/cc/EntryControlCC.js +629 -493
  194. package/build/esm/cc/EntryControlCC.js.map +1 -1
  195. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  196. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
  197. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  198. package/build/esm/cc/HailCC.js +51 -12
  199. package/build/esm/cc/HailCC.js.map +1 -1
  200. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  201. package/build/esm/cc/HumidityControlModeCC.js +357 -250
  202. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  203. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  204. package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
  205. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  206. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  207. package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
  208. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  209. package/build/esm/cc/InclusionControllerCC.js +197 -119
  210. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  211. package/build/esm/cc/IndicatorCC.js +973 -835
  212. package/build/esm/cc/IndicatorCC.js.map +1 -1
  213. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  214. package/build/esm/cc/IrrigationCC.js +1697 -1496
  215. package/build/esm/cc/IrrigationCC.js.map +1 -1
  216. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  217. package/build/esm/cc/LanguageCC.js +266 -184
  218. package/build/esm/cc/LanguageCC.js.map +1 -1
  219. package/build/esm/cc/LockCC.d.ts.map +1 -1
  220. package/build/esm/cc/LockCC.js +247 -162
  221. package/build/esm/cc/LockCC.js.map +1 -1
  222. package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
  223. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  224. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  225. package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
  226. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  227. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  228. package/build/esm/cc/MeterCC.js +896 -795
  229. package/build/esm/cc/MeterCC.js.map +1 -1
  230. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  231. package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
  232. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  233. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  234. package/build/esm/cc/MultiChannelCC.js +1106 -921
  235. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  236. package/build/esm/cc/MultiCommandCC.js +166 -102
  237. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  238. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  239. package/build/esm/cc/MultilevelSensorCC.js +616 -497
  240. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  241. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  242. package/build/esm/cc/MultilevelSwitchCC.js +621 -496
  243. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  244. package/build/esm/cc/NoOperationCC.js +82 -29
  245. package/build/esm/cc/NoOperationCC.js.map +1 -1
  246. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  247. package/build/esm/cc/NodeNamingCC.js +413 -294
  248. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  249. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  250. package/build/esm/cc/NotificationCC.js +1097 -966
  251. package/build/esm/cc/NotificationCC.js.map +1 -1
  252. package/build/esm/cc/PowerlevelCC.js +437 -311
  253. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  254. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  255. package/build/esm/cc/ProtectionCC.js +704 -543
  256. package/build/esm/cc/ProtectionCC.js.map +1 -1
  257. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  258. package/build/esm/cc/SceneActivationCC.js +157 -100
  259. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  260. package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
  261. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  262. package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
  263. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  264. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  265. package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
  266. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  267. package/build/esm/cc/Security2CC.js +1633 -1406
  268. package/build/esm/cc/Security2CC.js.map +1 -1
  269. package/build/esm/cc/SecurityCC.js +876 -687
  270. package/build/esm/cc/SecurityCC.js.map +1 -1
  271. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  272. package/build/esm/cc/SoundSwitchCC.js +689 -526
  273. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  274. package/build/esm/cc/SupervisionCC.js +349 -272
  275. package/build/esm/cc/SupervisionCC.js.map +1 -1
  276. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  277. package/build/esm/cc/ThermostatFanModeCC.js +388 -284
  278. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  279. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  280. package/build/esm/cc/ThermostatFanStateCC.js +184 -111
  281. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  282. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  283. package/build/esm/cc/ThermostatModeCC.js +435 -331
  284. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  285. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  286. package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
  287. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  288. package/build/esm/cc/ThermostatSetbackCC.js +274 -185
  289. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  290. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  291. package/build/esm/cc/ThermostatSetpointCC.js +674 -543
  292. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  293. package/build/esm/cc/TimeCC.js +499 -360
  294. package/build/esm/cc/TimeCC.js.map +1 -1
  295. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  296. package/build/esm/cc/TimeParametersCC.js +296 -211
  297. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  298. package/build/esm/cc/TransportServiceCC.js +464 -363
  299. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  300. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  301. package/build/esm/cc/UserCodeCC.js +1443 -1205
  302. package/build/esm/cc/UserCodeCC.js.map +1 -1
  303. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  304. package/build/esm/cc/VersionCC.js +744 -635
  305. package/build/esm/cc/VersionCC.js.map +1 -1
  306. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  307. package/build/esm/cc/WakeUpCC.js +494 -364
  308. package/build/esm/cc/WakeUpCC.js.map +1 -1
  309. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  310. package/build/esm/cc/WindowCoveringCC.js +655 -530
  311. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  312. package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
  313. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  314. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  315. package/build/esm/cc/ZWavePlusCC.js +223 -162
  316. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  317. package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
  318. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  319. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  320. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  321. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
  322. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  323. package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
  324. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  325. package/build/esm/lib/CommandClassDecorators.js +24 -24
  326. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  327. package/build/esm/lib/Security2/Extension.d.ts +1 -1
  328. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  329. package/build/esm/lib/Security2/Extension.js +207 -123
  330. package/build/esm/lib/Security2/Extension.js.map +1 -1
  331. package/package.json +6 -6
@@ -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 EntryControlCCNotification_1, EntryControlCCKeySupportedReport_1, EntryControlCCEventSupportedReport_1, EntryControlCCConfigurationReport_1;
8
35
  function __assertType(argName, typeName, boundHasError) {
9
36
  const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
10
37
  if (boundHasError()) {
@@ -22,7 +49,7 @@ import { Bytes } from "@zwave-js/shared/safe";
22
49
  import { buffer2hex, pick } from "@zwave-js/shared/safe";
23
50
  import { CCAPI, POLL_VALUE, SET_VALUE, throwUnsupportedProperty, throwWrongValueType, } from "../lib/API.js";
24
51
  import { CommandClass, } from "../lib/CommandClass.js";
25
- import { API, CCCommand, ccValue, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
52
+ import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
26
53
  import { V } from "../lib/Values.js";
27
54
  import { EntryControlCommand, EntryControlDataTypes, EntryControlEventTypes, } from "../lib/_Types.js";
28
55
  import * as ccUtils from "../lib/utils.js";
@@ -54,528 +81,637 @@ export const EntryControlCCValues = Object.freeze({
54
81
  }),
55
82
  }),
56
83
  });
57
- let EntryControlCCAPI = class EntryControlCCAPI extends CCAPI {
58
- supportsCommand(cmd) {
59
- switch (cmd) {
60
- case EntryControlCommand.KeySupportedGet:
61
- case EntryControlCommand.EventSupportedGet:
62
- case EntryControlCommand.ConfigurationGet:
63
- return this.isSinglecast();
64
- case EntryControlCommand.ConfigurationSet:
65
- return true;
66
- }
67
- return super.supportsCommand(cmd);
68
- }
69
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
70
- async getSupportedKeys() {
71
- this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.KeySupportedGet);
72
- const cc = new EntryControlCCKeySupportedGet({
73
- nodeId: this.endpoint.nodeId,
74
- endpointIndex: this.endpoint.index,
75
- });
76
- const response = await this.host.sendCommand(cc, this.commandOptions);
77
- return response?.supportedKeys;
78
- }
79
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
80
- async getEventCapabilities() {
81
- this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.EventSupportedGet);
82
- const cc = new EntryControlCCEventSupportedGet({
83
- nodeId: this.endpoint.nodeId,
84
- endpointIndex: this.endpoint.index,
85
- });
86
- const response = await this.host.sendCommand(cc, this.commandOptions);
87
- if (response) {
88
- return pick(response, [
89
- "supportedDataTypes",
90
- "supportedEventTypes",
91
- "minKeyCacheSize",
92
- "maxKeyCacheSize",
93
- "minKeyCacheTimeout",
94
- "maxKeyCacheTimeout",
95
- ]);
84
+ let EntryControlCCAPI = (() => {
85
+ let _classDecorators = [API(CommandClasses["Entry Control"])];
86
+ let _classDescriptor;
87
+ let _classExtraInitializers = [];
88
+ let _classThis;
89
+ let _classSuper = CCAPI;
90
+ var EntryControlCCAPI = class extends _classSuper {
91
+ static { _classThis = this; }
92
+ static {
93
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
94
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
95
+ EntryControlCCAPI = _classThis = _classDescriptor.value;
96
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
97
+ __runInitializers(_classThis, _classExtraInitializers);
96
98
  }
97
- }
98
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
99
- async getConfiguration() {
100
- this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);
101
- const cc = new EntryControlCCConfigurationGet({
102
- nodeId: this.endpoint.nodeId,
103
- endpointIndex: this.endpoint.index,
104
- });
105
- const response = await this.host.sendCommand(cc, this.commandOptions);
106
- if (response) {
107
- return pick(response, ["keyCacheSize", "keyCacheTimeout"]);
99
+ supportsCommand(cmd) {
100
+ switch (cmd) {
101
+ case EntryControlCommand.KeySupportedGet:
102
+ case EntryControlCommand.EventSupportedGet:
103
+ case EntryControlCommand.ConfigurationGet:
104
+ return this.isSinglecast();
105
+ case EntryControlCommand.ConfigurationSet:
106
+ return true;
107
+ }
108
+ return super.supportsCommand(cmd);
108
109
  }
109
- }
110
- async setConfiguration(keyCacheSize, keyCacheTimeout) {
111
- __assertType("keyCacheSize", "number", __assertType__number.bind(void 0, keyCacheSize));
112
- __assertType("keyCacheTimeout", "number", __assertType__number.bind(void 0, keyCacheTimeout));
113
- this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);
114
- const cc = new EntryControlCCConfigurationSet({
115
- nodeId: this.endpoint.nodeId,
116
- endpointIndex: this.endpoint.index,
117
- keyCacheSize,
118
- keyCacheTimeout,
119
- });
120
- return this.host.sendCommand(cc, this.commandOptions);
121
- }
122
- get [SET_VALUE]() {
123
- return async function ({ property }, value) {
124
- if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
125
- throwUnsupportedProperty(this.ccId, property);
110
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
111
+ async getSupportedKeys() {
112
+ this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.KeySupportedGet);
113
+ const cc = new EntryControlCCKeySupportedGet({
114
+ nodeId: this.endpoint.nodeId,
115
+ endpointIndex: this.endpoint.index,
116
+ });
117
+ const response = await this.host.sendCommand(cc, this.commandOptions);
118
+ return response?.supportedKeys;
119
+ }
120
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
121
+ async getEventCapabilities() {
122
+ this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.EventSupportedGet);
123
+ const cc = new EntryControlCCEventSupportedGet({
124
+ nodeId: this.endpoint.nodeId,
125
+ endpointIndex: this.endpoint.index,
126
+ });
127
+ const response = await this.host.sendCommand(cc, this.commandOptions);
128
+ if (response) {
129
+ return pick(response, [
130
+ "supportedDataTypes",
131
+ "supportedEventTypes",
132
+ "minKeyCacheSize",
133
+ "maxKeyCacheSize",
134
+ "minKeyCacheTimeout",
135
+ "maxKeyCacheTimeout",
136
+ ]);
126
137
  }
127
- if (typeof value !== "number") {
128
- throwWrongValueType(this.ccId, property, "number", typeof value);
138
+ }
139
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
140
+ async getConfiguration() {
141
+ this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);
142
+ const cc = new EntryControlCCConfigurationGet({
143
+ nodeId: this.endpoint.nodeId,
144
+ endpointIndex: this.endpoint.index,
145
+ });
146
+ const response = await this.host.sendCommand(cc, this.commandOptions);
147
+ if (response) {
148
+ return pick(response, ["keyCacheSize", "keyCacheTimeout"]);
129
149
  }
130
- let keyCacheSize = value;
131
- let keyCacheTimeout = 2;
132
- if (property === "keyCacheTimeout") {
133
- keyCacheTimeout = value;
134
- const oldKeyCacheSize = this.tryGetValueDB()?.getValue(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
135
- if (oldKeyCacheSize == undefined) {
136
- throw new ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, ZWaveErrorCodes.Argument_Invalid);
150
+ }
151
+ async setConfiguration(keyCacheSize, keyCacheTimeout) {
152
+ __assertType("keyCacheSize", "number", __assertType__number.bind(void 0, keyCacheSize));
153
+ __assertType("keyCacheTimeout", "number", __assertType__number.bind(void 0, keyCacheTimeout));
154
+ this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);
155
+ const cc = new EntryControlCCConfigurationSet({
156
+ nodeId: this.endpoint.nodeId,
157
+ endpointIndex: this.endpoint.index,
158
+ keyCacheSize,
159
+ keyCacheTimeout,
160
+ });
161
+ return this.host.sendCommand(cc, this.commandOptions);
162
+ }
163
+ get [SET_VALUE]() {
164
+ return async function ({ property }, value) {
165
+ if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
166
+ throwUnsupportedProperty(this.ccId, property);
137
167
  }
138
- keyCacheSize = oldKeyCacheSize;
139
- }
140
- const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
141
- // Verify the change after a short delay, unless the command was supervised and successful
142
- if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {
143
- this.schedulePoll({ property }, value, { transition: "fast" });
144
- }
145
- return result;
146
- };
147
- }
148
- get [POLL_VALUE]() {
149
- return async function ({ property }) {
150
- switch (property) {
151
- case "keyCacheSize":
152
- case "keyCacheTimeout":
153
- return (await this.getConfiguration())?.[property];
154
- }
155
- throwUnsupportedProperty(this.ccId, property);
156
- };
157
- }
158
- };
159
- EntryControlCCAPI = __decorate([
160
- API(CommandClasses["Entry Control"])
161
- ], EntryControlCCAPI);
168
+ if (typeof value !== "number") {
169
+ throwWrongValueType(this.ccId, property, "number", typeof value);
170
+ }
171
+ let keyCacheSize = value;
172
+ let keyCacheTimeout = 2;
173
+ if (property === "keyCacheTimeout") {
174
+ keyCacheTimeout = value;
175
+ const oldKeyCacheSize = this.tryGetValueDB()?.getValue(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
176
+ if (oldKeyCacheSize == undefined) {
177
+ throw new ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, ZWaveErrorCodes.Argument_Invalid);
178
+ }
179
+ keyCacheSize = oldKeyCacheSize;
180
+ }
181
+ const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
182
+ // Verify the change after a short delay, unless the command was supervised and successful
183
+ if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {
184
+ this.schedulePoll({ property }, value, { transition: "fast" });
185
+ }
186
+ return result;
187
+ };
188
+ }
189
+ get [POLL_VALUE]() {
190
+ return async function ({ property }) {
191
+ switch (property) {
192
+ case "keyCacheSize":
193
+ case "keyCacheTimeout":
194
+ return (await this.getConfiguration())?.[property];
195
+ }
196
+ throwUnsupportedProperty(this.ccId, property);
197
+ };
198
+ }
199
+ };
200
+ return EntryControlCCAPI = _classThis;
201
+ })();
162
202
  export { EntryControlCCAPI };
163
- let EntryControlCC = class EntryControlCC extends CommandClass {
164
- determineRequiredCCInterviews() {
165
- return [
166
- ...super.determineRequiredCCInterviews(),
167
- CommandClasses.Association,
168
- CommandClasses["Multi Channel Association"],
169
- CommandClasses["Association Group Information"],
170
- ];
171
- }
172
- async interview(ctx) {
173
- const node = this.getNode(ctx);
174
- const endpoint = this.getEndpoint(ctx);
175
- const api = CCAPI.create(CommandClasses["Entry Control"], ctx, endpoint).withOptions({
176
- priority: MessagePriority.NodeQuery,
177
- });
178
- ctx.logNode(node.id, {
179
- endpoint: this.endpointIndex,
180
- message: `Interviewing ${this.ccName}...`,
181
- direction: "none",
182
- });
183
- // If one Association group issues Entry Control notifications,
184
- // we must associate ourselves with that channel
185
- try {
186
- await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, EntryControlCommand.Notification);
187
- }
188
- catch {
203
+ let EntryControlCC = (() => {
204
+ let _classDecorators = [commandClass(CommandClasses["Entry Control"]), implementedVersion(1), ccValues(EntryControlCCValues)];
205
+ let _classDescriptor;
206
+ let _classExtraInitializers = [];
207
+ let _classThis;
208
+ let _classSuper = CommandClass;
209
+ var EntryControlCC = class extends _classSuper {
210
+ static { _classThis = this; }
211
+ static {
212
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
213
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
214
+ EntryControlCC = _classThis = _classDescriptor.value;
215
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
216
+ __runInitializers(_classThis, _classExtraInitializers);
217
+ }
218
+ determineRequiredCCInterviews() {
219
+ return [
220
+ ...super.determineRequiredCCInterviews(),
221
+ CommandClasses.Association,
222
+ CommandClasses["Multi Channel Association"],
223
+ CommandClasses["Association Group Information"],
224
+ ];
225
+ }
226
+ async interview(ctx) {
227
+ const node = this.getNode(ctx);
228
+ const endpoint = this.getEndpoint(ctx);
229
+ const api = CCAPI.create(CommandClasses["Entry Control"], ctx, endpoint).withOptions({
230
+ priority: MessagePriority.NodeQuery,
231
+ });
189
232
  ctx.logNode(node.id, {
190
- endpoint: endpoint.index,
191
- message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,
192
- level: "warn",
233
+ endpoint: this.endpointIndex,
234
+ message: `Interviewing ${this.ccName}...`,
235
+ direction: "none",
193
236
  });
194
- }
195
- ctx.logNode(node.id, {
196
- endpoint: this.endpointIndex,
197
- message: "requesting entry control supported keys...",
198
- direction: "outbound",
199
- });
200
- const supportedKeys = await api.getSupportedKeys();
201
- if (supportedKeys) {
237
+ // If one Association group issues Entry Control notifications,
238
+ // we must associate ourselves with that channel
239
+ try {
240
+ await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, EntryControlCommand.Notification);
241
+ }
242
+ catch {
243
+ ctx.logNode(node.id, {
244
+ endpoint: endpoint.index,
245
+ message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,
246
+ level: "warn",
247
+ });
248
+ }
202
249
  ctx.logNode(node.id, {
203
250
  endpoint: this.endpointIndex,
204
- message: `received entry control supported keys: ${supportedKeys.toString()}`,
205
- direction: "inbound",
251
+ message: "requesting entry control supported keys...",
252
+ direction: "outbound",
206
253
  });
207
- }
208
- ctx.logNode(node.id, {
209
- endpoint: this.endpointIndex,
210
- message: "requesting entry control supported events...",
211
- direction: "outbound",
212
- });
213
- const eventCapabilities = await api.getEventCapabilities();
214
- if (eventCapabilities) {
254
+ const supportedKeys = await api.getSupportedKeys();
255
+ if (supportedKeys) {
256
+ ctx.logNode(node.id, {
257
+ endpoint: this.endpointIndex,
258
+ message: `received entry control supported keys: ${supportedKeys.toString()}`,
259
+ direction: "inbound",
260
+ });
261
+ }
215
262
  ctx.logNode(node.id, {
216
263
  endpoint: this.endpointIndex,
217
- message: `received entry control supported keys:
264
+ message: "requesting entry control supported events...",
265
+ direction: "outbound",
266
+ });
267
+ const eventCapabilities = await api.getEventCapabilities();
268
+ if (eventCapabilities) {
269
+ ctx.logNode(node.id, {
270
+ endpoint: this.endpointIndex,
271
+ message: `received entry control supported keys:
218
272
  data types: ${eventCapabilities.supportedDataTypes
219
- .map((e) => EntryControlDataTypes[e])
220
- .toString()}
273
+ .map((e) => EntryControlDataTypes[e])
274
+ .toString()}
221
275
  event types: ${eventCapabilities.supportedEventTypes
222
- .map((e) => EntryControlEventTypes[e])
223
- .toString()}
276
+ .map((e) => EntryControlEventTypes[e])
277
+ .toString()}
224
278
  min key cache size: ${eventCapabilities.minKeyCacheSize}
225
279
  max key cache size: ${eventCapabilities.maxKeyCacheSize}
226
280
  min key cache timeout: ${eventCapabilities.minKeyCacheTimeout} seconds
227
281
  max key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,
228
- direction: "inbound",
229
- });
282
+ direction: "inbound",
283
+ });
284
+ }
285
+ await this.refreshValues(ctx);
286
+ // Remember that the interview is complete
287
+ this.setInterviewComplete(ctx, true);
230
288
  }
231
- await this.refreshValues(ctx);
232
- // Remember that the interview is complete
233
- this.setInterviewComplete(ctx, true);
234
- }
235
- async refreshValues(ctx) {
236
- const node = this.getNode(ctx);
237
- const endpoint = this.getEndpoint(ctx);
238
- const api = CCAPI.create(CommandClasses["Entry Control"], ctx, endpoint).withOptions({
239
- priority: MessagePriority.NodeQuery,
240
- });
241
- ctx.logNode(node.id, {
242
- endpoint: this.endpointIndex,
243
- message: "requesting entry control configuration...",
244
- direction: "outbound",
245
- });
246
- const conf = await api.getConfiguration();
247
- if (conf) {
289
+ async refreshValues(ctx) {
290
+ const node = this.getNode(ctx);
291
+ const endpoint = this.getEndpoint(ctx);
292
+ const api = CCAPI.create(CommandClasses["Entry Control"], ctx, endpoint).withOptions({
293
+ priority: MessagePriority.NodeQuery,
294
+ });
248
295
  ctx.logNode(node.id, {
249
296
  endpoint: this.endpointIndex,
250
- message: `received entry control configuration:
297
+ message: "requesting entry control configuration...",
298
+ direction: "outbound",
299
+ });
300
+ const conf = await api.getConfiguration();
301
+ if (conf) {
302
+ ctx.logNode(node.id, {
303
+ endpoint: this.endpointIndex,
304
+ message: `received entry control configuration:
251
305
  key cache size: ${conf.keyCacheSize}
252
306
  key cache timeout: ${conf.keyCacheTimeout} seconds`,
253
- direction: "inbound",
254
- });
307
+ direction: "inbound",
308
+ });
309
+ }
255
310
  }
256
- }
257
- };
258
- EntryControlCC = __decorate([
259
- commandClass(CommandClasses["Entry Control"]),
260
- implementedVersion(1),
261
- ccValues(EntryControlCCValues)
262
- ], EntryControlCC);
311
+ };
312
+ return EntryControlCC = _classThis;
313
+ })();
263
314
  export { EntryControlCC };
264
- let EntryControlCCNotification = EntryControlCCNotification_1 = class EntryControlCCNotification extends EntryControlCC {
265
- constructor(options) {
266
- super(options);
267
- // TODO: Check implementation:
268
- this.sequenceNumber = options.sequenceNumber;
269
- this.dataType = options.dataType;
270
- this.eventType = options.eventType;
271
- this.eventData = options.eventData;
272
- }
273
- static from(raw, ctx) {
274
- validatePayload(raw.payload.length >= 4);
275
- const sequenceNumber = raw.payload[0];
276
- let dataType = raw.payload[1] & 0b11;
277
- const eventType = raw.payload[2];
278
- const eventDataLength = raw.payload[3];
279
- validatePayload(eventDataLength >= 0 && eventDataLength <= 32);
280
- const offset = 4;
281
- validatePayload(raw.payload.length >= offset + eventDataLength);
282
- let eventData;
283
- if (eventDataLength > 0) {
284
- // We shouldn't need to check this, since the specs are pretty clear which format to expect.
285
- // But as always - manufacturers don't care and send ASCII data with 0 bytes...
286
- // We also need to disable the strict validation for some devices to make them work
287
- const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
288
- eventData = Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
289
- switch (dataType) {
290
- case EntryControlDataTypes.Raw:
291
- // RAW 1 to 32 bytes of arbitrary binary data
292
- if (!noStrictValidation) {
293
- validatePayload(eventDataLength >= 1 && eventDataLength <= 32);
294
- }
295
- break;
296
- case EntryControlDataTypes.ASCII:
297
- // ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.
298
- // The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.
299
- if (!noStrictValidation) {
300
- validatePayload(eventDataLength === 16 || eventDataLength === 32);
301
- }
302
- eventData = eventData.toString("ascii");
303
- if (!noStrictValidation) {
304
- validatePayload(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
305
- }
306
- // Trim 0xff padding bytes
307
- eventData = eventData.replace(/[\u00ff]*$/, "");
308
- break;
309
- case EntryControlDataTypes.MD5:
310
- // MD5 16 byte binary data encoded as a MD5 hash value.
311
- if (!noStrictValidation) {
312
- validatePayload(eventDataLength === 16);
313
- }
314
- break;
315
- }
315
+ let EntryControlCCNotification = (() => {
316
+ let _classDecorators = [CCCommand(EntryControlCommand.Notification)];
317
+ let _classDescriptor;
318
+ let _classExtraInitializers = [];
319
+ let _classThis;
320
+ let _classSuper = EntryControlCC;
321
+ var EntryControlCCNotification = class extends _classSuper {
322
+ static { _classThis = this; }
323
+ static {
324
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
325
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
326
+ EntryControlCCNotification = _classThis = _classDescriptor.value;
327
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
328
+ __runInitializers(_classThis, _classExtraInitializers);
316
329
  }
317
- else {
318
- dataType = EntryControlDataTypes.None;
330
+ constructor(options) {
331
+ super(options);
332
+ // TODO: Check implementation:
333
+ this.sequenceNumber = options.sequenceNumber;
334
+ this.dataType = options.dataType;
335
+ this.eventType = options.eventType;
336
+ this.eventData = options.eventData;
319
337
  }
320
- return new EntryControlCCNotification_1({
321
- nodeId: ctx.sourceNodeId,
322
- sequenceNumber,
323
- dataType,
324
- eventType,
325
- eventData,
326
- });
327
- }
328
- sequenceNumber;
329
- dataType;
330
- eventType;
331
- eventData;
332
- toLogEntry(ctx) {
333
- const message = {
334
- "sequence number": this.sequenceNumber,
335
- "data type": this.dataType,
336
- "event type": this.eventType,
337
- };
338
- if (this.eventData) {
339
- switch (this.eventType) {
340
- case EntryControlEventTypes.CachedKeys:
341
- case EntryControlEventTypes.Enter:
342
- // The event data is likely the user's PIN code, hide it from logs
343
- message["event data"] = "*".repeat(this.eventData.length);
344
- break;
345
- default:
346
- message["event data"] = typeof this.eventData === "string"
347
- ? this.eventData
348
- : buffer2hex(this.eventData);
338
+ static from(raw, ctx) {
339
+ validatePayload(raw.payload.length >= 4);
340
+ const sequenceNumber = raw.payload[0];
341
+ let dataType = raw.payload[1] & 0b11;
342
+ const eventType = raw.payload[2];
343
+ const eventDataLength = raw.payload[3];
344
+ validatePayload(eventDataLength >= 0 && eventDataLength <= 32);
345
+ const offset = 4;
346
+ validatePayload(raw.payload.length >= offset + eventDataLength);
347
+ let eventData;
348
+ if (eventDataLength > 0) {
349
+ // We shouldn't need to check this, since the specs are pretty clear which format to expect.
350
+ // But as always - manufacturers don't care and send ASCII data with 0 bytes...
351
+ // We also need to disable the strict validation for some devices to make them work
352
+ const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
353
+ eventData = Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
354
+ switch (dataType) {
355
+ case EntryControlDataTypes.Raw:
356
+ // RAW 1 to 32 bytes of arbitrary binary data
357
+ if (!noStrictValidation) {
358
+ validatePayload(eventDataLength >= 1 && eventDataLength <= 32);
359
+ }
360
+ break;
361
+ case EntryControlDataTypes.ASCII:
362
+ // ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.
363
+ // The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.
364
+ if (!noStrictValidation) {
365
+ validatePayload(eventDataLength === 16 || eventDataLength === 32);
366
+ }
367
+ eventData = eventData.toString("ascii");
368
+ if (!noStrictValidation) {
369
+ validatePayload(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
370
+ }
371
+ // Trim 0xff padding bytes
372
+ eventData = eventData.replace(/[\u00ff]*$/, "");
373
+ break;
374
+ case EntryControlDataTypes.MD5:
375
+ // MD5 16 byte binary data encoded as a MD5 hash value.
376
+ if (!noStrictValidation) {
377
+ validatePayload(eventDataLength === 16);
378
+ }
379
+ break;
380
+ }
349
381
  }
382
+ else {
383
+ dataType = EntryControlDataTypes.None;
384
+ }
385
+ return new this({
386
+ nodeId: ctx.sourceNodeId,
387
+ sequenceNumber,
388
+ dataType,
389
+ eventType,
390
+ eventData,
391
+ });
350
392
  }
351
- return {
352
- ...super.toLogEntry(ctx),
353
- message,
354
- };
355
- }
356
- };
357
- EntryControlCCNotification = EntryControlCCNotification_1 = __decorate([
358
- CCCommand(EntryControlCommand.Notification)
359
- ], EntryControlCCNotification);
393
+ sequenceNumber;
394
+ dataType;
395
+ eventType;
396
+ eventData;
397
+ toLogEntry(ctx) {
398
+ const message = {
399
+ "sequence number": this.sequenceNumber,
400
+ "data type": this.dataType,
401
+ "event type": this.eventType,
402
+ };
403
+ if (this.eventData) {
404
+ switch (this.eventType) {
405
+ case EntryControlEventTypes.CachedKeys:
406
+ case EntryControlEventTypes.Enter:
407
+ // The event data is likely the user's PIN code, hide it from logs
408
+ message["event data"] = "*".repeat(this.eventData.length);
409
+ break;
410
+ default:
411
+ message["event data"] = typeof this.eventData === "string"
412
+ ? this.eventData
413
+ : buffer2hex(this.eventData);
414
+ }
415
+ }
416
+ return {
417
+ ...super.toLogEntry(ctx),
418
+ message,
419
+ };
420
+ }
421
+ };
422
+ return EntryControlCCNotification = _classThis;
423
+ })();
360
424
  export { EntryControlCCNotification };
361
- let EntryControlCCKeySupportedReport = EntryControlCCKeySupportedReport_1 = class EntryControlCCKeySupportedReport extends EntryControlCC {
362
- constructor(options) {
363
- super(options);
364
- // TODO: Check implementation:
365
- this.supportedKeys = options.supportedKeys;
366
- }
367
- static from(raw, ctx) {
368
- validatePayload(raw.payload.length >= 1);
369
- const length = raw.payload[0];
370
- validatePayload(raw.payload.length >= 1 + length);
371
- const supportedKeys = parseBitMask(raw.payload.subarray(1, 1 + length), 0);
372
- return new EntryControlCCKeySupportedReport_1({
373
- nodeId: ctx.sourceNodeId,
374
- supportedKeys,
375
- });
376
- }
377
- supportedKeys;
378
- toLogEntry(ctx) {
379
- return {
380
- ...super.toLogEntry(ctx),
381
- message: { "supported keys": this.supportedKeys.toString() },
382
- };
383
- }
384
- };
385
- __decorate([
386
- ccValue(EntryControlCCValues.supportedKeys)
387
- ], EntryControlCCKeySupportedReport.prototype, "supportedKeys", void 0);
388
- EntryControlCCKeySupportedReport = EntryControlCCKeySupportedReport_1 = __decorate([
389
- CCCommand(EntryControlCommand.KeySupportedReport)
390
- ], EntryControlCCKeySupportedReport);
425
+ let EntryControlCCKeySupportedReport = (() => {
426
+ let _classDecorators = [CCCommand(EntryControlCommand.KeySupportedReport), ccValueProperty("supportedKeys", EntryControlCCValues.supportedKeys)];
427
+ let _classDescriptor;
428
+ let _classExtraInitializers = [];
429
+ let _classThis;
430
+ let _classSuper = EntryControlCC;
431
+ var EntryControlCCKeySupportedReport = class extends _classSuper {
432
+ static { _classThis = this; }
433
+ static {
434
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
435
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
436
+ EntryControlCCKeySupportedReport = _classThis = _classDescriptor.value;
437
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
438
+ __runInitializers(_classThis, _classExtraInitializers);
439
+ }
440
+ constructor(options) {
441
+ super(options);
442
+ // TODO: Check implementation:
443
+ this.supportedKeys = options.supportedKeys;
444
+ }
445
+ static from(raw, ctx) {
446
+ validatePayload(raw.payload.length >= 1);
447
+ const length = raw.payload[0];
448
+ validatePayload(raw.payload.length >= 1 + length);
449
+ const supportedKeys = parseBitMask(raw.payload.subarray(1, 1 + length), 0);
450
+ return new this({
451
+ nodeId: ctx.sourceNodeId,
452
+ supportedKeys,
453
+ });
454
+ }
455
+ supportedKeys;
456
+ toLogEntry(ctx) {
457
+ return {
458
+ ...super.toLogEntry(ctx),
459
+ message: { "supported keys": this.supportedKeys.toString() },
460
+ };
461
+ }
462
+ };
463
+ return EntryControlCCKeySupportedReport = _classThis;
464
+ })();
391
465
  export { EntryControlCCKeySupportedReport };
392
- let EntryControlCCKeySupportedGet = class EntryControlCCKeySupportedGet extends EntryControlCC {
393
- };
394
- EntryControlCCKeySupportedGet = __decorate([
395
- CCCommand(EntryControlCommand.KeySupportedGet),
396
- expectedCCResponse(EntryControlCCKeySupportedReport)
397
- ], EntryControlCCKeySupportedGet);
466
+ let EntryControlCCKeySupportedGet = (() => {
467
+ let _classDecorators = [CCCommand(EntryControlCommand.KeySupportedGet), expectedCCResponse(EntryControlCCKeySupportedReport)];
468
+ let _classDescriptor;
469
+ let _classExtraInitializers = [];
470
+ let _classThis;
471
+ let _classSuper = EntryControlCC;
472
+ var EntryControlCCKeySupportedGet = class extends _classSuper {
473
+ static { _classThis = this; }
474
+ static {
475
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
476
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
477
+ EntryControlCCKeySupportedGet = _classThis = _classDescriptor.value;
478
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
479
+ __runInitializers(_classThis, _classExtraInitializers);
480
+ }
481
+ };
482
+ return EntryControlCCKeySupportedGet = _classThis;
483
+ })();
398
484
  export { EntryControlCCKeySupportedGet };
399
- let EntryControlCCEventSupportedReport = EntryControlCCEventSupportedReport_1 = class EntryControlCCEventSupportedReport extends EntryControlCC {
400
- constructor(options) {
401
- super(options);
402
- // TODO: Check implementation:
403
- this.supportedDataTypes = options.supportedDataTypes;
404
- this.supportedEventTypes = options.supportedEventTypes;
405
- this.minKeyCacheSize = options.minKeyCacheSize;
406
- this.maxKeyCacheSize = options.maxKeyCacheSize;
407
- this.minKeyCacheTimeout = options.minKeyCacheTimeout;
408
- this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
409
- }
410
- static from(raw, ctx) {
411
- validatePayload(raw.payload.length >= 1);
412
- const dataTypeLength = raw.payload[0] & 0b11;
413
- let offset = 1;
414
- validatePayload(raw.payload.length >= offset + dataTypeLength);
415
- const supportedDataTypes = parseBitMask(raw.payload.subarray(offset, offset + dataTypeLength), EntryControlDataTypes.None);
416
- offset += dataTypeLength;
417
- validatePayload(raw.payload.length >= offset + 1);
418
- const eventTypeLength = raw.payload[offset] & 0b11111;
419
- offset += 1;
420
- validatePayload(raw.payload.length >= offset + eventTypeLength);
421
- const supportedEventTypes = parseBitMask(raw.payload.subarray(offset, offset + eventTypeLength), EntryControlEventTypes.Caching);
422
- offset += eventTypeLength;
423
- validatePayload(raw.payload.length >= offset + 4);
424
- const minKeyCacheSize = raw.payload[offset];
425
- validatePayload(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
426
- const maxKeyCacheSize = raw.payload[offset + 1];
427
- validatePayload(maxKeyCacheSize >= minKeyCacheSize
428
- && maxKeyCacheSize <= 32);
429
- const minKeyCacheTimeout = raw.payload[offset + 2];
430
- const maxKeyCacheTimeout = raw.payload[offset + 3];
431
- return new EntryControlCCEventSupportedReport_1({
432
- nodeId: ctx.sourceNodeId,
433
- supportedDataTypes,
434
- supportedEventTypes,
435
- minKeyCacheSize,
436
- maxKeyCacheSize,
437
- minKeyCacheTimeout,
438
- maxKeyCacheTimeout,
439
- });
440
- }
441
- persistValues(ctx) {
442
- if (!super.persistValues(ctx))
443
- return false;
444
- // Store min/max cache size and timeout as metadata
445
- const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
446
- this.setMetadata(ctx, keyCacheSizeValue, {
447
- ...keyCacheSizeValue.meta,
448
- min: this.minKeyCacheSize,
449
- max: this.maxKeyCacheSize,
450
- });
451
- const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
452
- this.setMetadata(ctx, keyCacheTimeoutValue, {
453
- ...keyCacheTimeoutValue.meta,
454
- min: this.minKeyCacheTimeout,
455
- max: this.maxKeyCacheTimeout,
456
- });
457
- return true;
458
- }
459
- supportedDataTypes;
460
- supportedEventTypes;
461
- minKeyCacheSize;
462
- maxKeyCacheSize;
463
- minKeyCacheTimeout;
464
- maxKeyCacheTimeout;
465
- toLogEntry(ctx) {
466
- return {
467
- ...super.toLogEntry(ctx),
468
- message: {
469
- "supported data types": this.supportedDataTypes
470
- .map((dt) => EntryControlDataTypes[dt])
471
- .toString(),
472
- "supported event types": this.supportedEventTypes
473
- .map((et) => EntryControlEventTypes[et])
474
- .toString(),
475
- "min key cache size": this.minKeyCacheSize,
476
- "max key cache size": this.maxKeyCacheSize,
477
- "min key cache timeout": this.minKeyCacheTimeout,
478
- "max key cache timeout": this.maxKeyCacheTimeout,
479
- },
480
- };
481
- }
482
- };
483
- __decorate([
484
- ccValue(EntryControlCCValues.supportedDataTypes)
485
- ], EntryControlCCEventSupportedReport.prototype, "supportedDataTypes", void 0);
486
- __decorate([
487
- ccValue(EntryControlCCValues.supportedEventTypes)
488
- ], EntryControlCCEventSupportedReport.prototype, "supportedEventTypes", void 0);
489
- EntryControlCCEventSupportedReport = EntryControlCCEventSupportedReport_1 = __decorate([
490
- CCCommand(EntryControlCommand.EventSupportedReport)
491
- ], EntryControlCCEventSupportedReport);
485
+ let EntryControlCCEventSupportedReport = (() => {
486
+ let _classDecorators = [CCCommand(EntryControlCommand.EventSupportedReport), ccValueProperty("supportedDataTypes", EntryControlCCValues.supportedDataTypes), ccValueProperty("supportedEventTypes", EntryControlCCValues.supportedEventTypes)];
487
+ let _classDescriptor;
488
+ let _classExtraInitializers = [];
489
+ let _classThis;
490
+ let _classSuper = EntryControlCC;
491
+ var EntryControlCCEventSupportedReport = class extends _classSuper {
492
+ static { _classThis = this; }
493
+ static {
494
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
495
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
496
+ EntryControlCCEventSupportedReport = _classThis = _classDescriptor.value;
497
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
498
+ __runInitializers(_classThis, _classExtraInitializers);
499
+ }
500
+ constructor(options) {
501
+ super(options);
502
+ // TODO: Check implementation:
503
+ this.supportedDataTypes = options.supportedDataTypes;
504
+ this.supportedEventTypes = options.supportedEventTypes;
505
+ this.minKeyCacheSize = options.minKeyCacheSize;
506
+ this.maxKeyCacheSize = options.maxKeyCacheSize;
507
+ this.minKeyCacheTimeout = options.minKeyCacheTimeout;
508
+ this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
509
+ }
510
+ static from(raw, ctx) {
511
+ validatePayload(raw.payload.length >= 1);
512
+ const dataTypeLength = raw.payload[0] & 0b11;
513
+ let offset = 1;
514
+ validatePayload(raw.payload.length >= offset + dataTypeLength);
515
+ const supportedDataTypes = parseBitMask(raw.payload.subarray(offset, offset + dataTypeLength), EntryControlDataTypes.None);
516
+ offset += dataTypeLength;
517
+ validatePayload(raw.payload.length >= offset + 1);
518
+ const eventTypeLength = raw.payload[offset] & 0b11111;
519
+ offset += 1;
520
+ validatePayload(raw.payload.length >= offset + eventTypeLength);
521
+ const supportedEventTypes = parseBitMask(raw.payload.subarray(offset, offset + eventTypeLength), EntryControlEventTypes.Caching);
522
+ offset += eventTypeLength;
523
+ validatePayload(raw.payload.length >= offset + 4);
524
+ const minKeyCacheSize = raw.payload[offset];
525
+ validatePayload(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
526
+ const maxKeyCacheSize = raw.payload[offset + 1];
527
+ validatePayload(maxKeyCacheSize >= minKeyCacheSize
528
+ && maxKeyCacheSize <= 32);
529
+ const minKeyCacheTimeout = raw.payload[offset + 2];
530
+ const maxKeyCacheTimeout = raw.payload[offset + 3];
531
+ return new this({
532
+ nodeId: ctx.sourceNodeId,
533
+ supportedDataTypes,
534
+ supportedEventTypes,
535
+ minKeyCacheSize,
536
+ maxKeyCacheSize,
537
+ minKeyCacheTimeout,
538
+ maxKeyCacheTimeout,
539
+ });
540
+ }
541
+ persistValues(ctx) {
542
+ if (!super.persistValues(ctx))
543
+ return false;
544
+ // Store min/max cache size and timeout as metadata
545
+ const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
546
+ this.setMetadata(ctx, keyCacheSizeValue, {
547
+ ...keyCacheSizeValue.meta,
548
+ min: this.minKeyCacheSize,
549
+ max: this.maxKeyCacheSize,
550
+ });
551
+ const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
552
+ this.setMetadata(ctx, keyCacheTimeoutValue, {
553
+ ...keyCacheTimeoutValue.meta,
554
+ min: this.minKeyCacheTimeout,
555
+ max: this.maxKeyCacheTimeout,
556
+ });
557
+ return true;
558
+ }
559
+ supportedDataTypes;
560
+ supportedEventTypes;
561
+ minKeyCacheSize;
562
+ maxKeyCacheSize;
563
+ minKeyCacheTimeout;
564
+ maxKeyCacheTimeout;
565
+ toLogEntry(ctx) {
566
+ return {
567
+ ...super.toLogEntry(ctx),
568
+ message: {
569
+ "supported data types": this.supportedDataTypes
570
+ .map((dt) => EntryControlDataTypes[dt])
571
+ .toString(),
572
+ "supported event types": this.supportedEventTypes
573
+ .map((et) => EntryControlEventTypes[et])
574
+ .toString(),
575
+ "min key cache size": this.minKeyCacheSize,
576
+ "max key cache size": this.maxKeyCacheSize,
577
+ "min key cache timeout": this.minKeyCacheTimeout,
578
+ "max key cache timeout": this.maxKeyCacheTimeout,
579
+ },
580
+ };
581
+ }
582
+ };
583
+ return EntryControlCCEventSupportedReport = _classThis;
584
+ })();
492
585
  export { EntryControlCCEventSupportedReport };
493
- let EntryControlCCEventSupportedGet = class EntryControlCCEventSupportedGet extends EntryControlCC {
494
- };
495
- EntryControlCCEventSupportedGet = __decorate([
496
- CCCommand(EntryControlCommand.EventSupportedGet),
497
- expectedCCResponse(EntryControlCCEventSupportedReport)
498
- ], EntryControlCCEventSupportedGet);
586
+ let EntryControlCCEventSupportedGet = (() => {
587
+ let _classDecorators = [CCCommand(EntryControlCommand.EventSupportedGet), expectedCCResponse(EntryControlCCEventSupportedReport)];
588
+ let _classDescriptor;
589
+ let _classExtraInitializers = [];
590
+ let _classThis;
591
+ let _classSuper = EntryControlCC;
592
+ var EntryControlCCEventSupportedGet = class extends _classSuper {
593
+ static { _classThis = this; }
594
+ static {
595
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
596
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
597
+ EntryControlCCEventSupportedGet = _classThis = _classDescriptor.value;
598
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
599
+ __runInitializers(_classThis, _classExtraInitializers);
600
+ }
601
+ };
602
+ return EntryControlCCEventSupportedGet = _classThis;
603
+ })();
499
604
  export { EntryControlCCEventSupportedGet };
500
- let EntryControlCCConfigurationReport = EntryControlCCConfigurationReport_1 = class EntryControlCCConfigurationReport extends EntryControlCC {
501
- constructor(options) {
502
- super(options);
503
- // TODO: Check implementation:
504
- this.keyCacheSize = options.keyCacheSize;
505
- this.keyCacheTimeout = options.keyCacheTimeout;
506
- }
507
- static from(raw, ctx) {
508
- validatePayload(raw.payload.length >= 2);
509
- const keyCacheSize = raw.payload[0];
510
- validatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);
511
- const keyCacheTimeout = raw.payload[1];
512
- return new EntryControlCCConfigurationReport_1({
513
- nodeId: ctx.sourceNodeId,
514
- keyCacheSize,
515
- keyCacheTimeout,
516
- });
517
- }
518
- keyCacheSize;
519
- keyCacheTimeout;
520
- toLogEntry(ctx) {
521
- return {
522
- ...super.toLogEntry(ctx),
523
- message: {
524
- "key cache size": this.keyCacheSize,
525
- "key cache timeout": this.keyCacheTimeout,
526
- },
527
- };
528
- }
529
- };
530
- __decorate([
531
- ccValue(EntryControlCCValues.keyCacheSize)
532
- ], EntryControlCCConfigurationReport.prototype, "keyCacheSize", void 0);
533
- __decorate([
534
- ccValue(EntryControlCCValues.keyCacheTimeout)
535
- ], EntryControlCCConfigurationReport.prototype, "keyCacheTimeout", void 0);
536
- EntryControlCCConfigurationReport = EntryControlCCConfigurationReport_1 = __decorate([
537
- CCCommand(EntryControlCommand.ConfigurationReport)
538
- ], EntryControlCCConfigurationReport);
605
+ let EntryControlCCConfigurationReport = (() => {
606
+ let _classDecorators = [CCCommand(EntryControlCommand.ConfigurationReport), ccValueProperty("keyCacheSize", EntryControlCCValues.keyCacheSize), ccValueProperty("keyCacheTimeout", EntryControlCCValues.keyCacheTimeout)];
607
+ let _classDescriptor;
608
+ let _classExtraInitializers = [];
609
+ let _classThis;
610
+ let _classSuper = EntryControlCC;
611
+ var EntryControlCCConfigurationReport = class extends _classSuper {
612
+ static { _classThis = this; }
613
+ static {
614
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
615
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
616
+ EntryControlCCConfigurationReport = _classThis = _classDescriptor.value;
617
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
618
+ __runInitializers(_classThis, _classExtraInitializers);
619
+ }
620
+ constructor(options) {
621
+ super(options);
622
+ // TODO: Check implementation:
623
+ this.keyCacheSize = options.keyCacheSize;
624
+ this.keyCacheTimeout = options.keyCacheTimeout;
625
+ }
626
+ static from(raw, ctx) {
627
+ validatePayload(raw.payload.length >= 2);
628
+ const keyCacheSize = raw.payload[0];
629
+ validatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);
630
+ const keyCacheTimeout = raw.payload[1];
631
+ return new this({
632
+ nodeId: ctx.sourceNodeId,
633
+ keyCacheSize,
634
+ keyCacheTimeout,
635
+ });
636
+ }
637
+ keyCacheSize;
638
+ keyCacheTimeout;
639
+ toLogEntry(ctx) {
640
+ return {
641
+ ...super.toLogEntry(ctx),
642
+ message: {
643
+ "key cache size": this.keyCacheSize,
644
+ "key cache timeout": this.keyCacheTimeout,
645
+ },
646
+ };
647
+ }
648
+ };
649
+ return EntryControlCCConfigurationReport = _classThis;
650
+ })();
539
651
  export { EntryControlCCConfigurationReport };
540
- let EntryControlCCConfigurationGet = class EntryControlCCConfigurationGet extends EntryControlCC {
541
- };
542
- EntryControlCCConfigurationGet = __decorate([
543
- CCCommand(EntryControlCommand.ConfigurationGet),
544
- expectedCCResponse(EntryControlCCConfigurationReport)
545
- ], EntryControlCCConfigurationGet);
652
+ let EntryControlCCConfigurationGet = (() => {
653
+ let _classDecorators = [CCCommand(EntryControlCommand.ConfigurationGet), expectedCCResponse(EntryControlCCConfigurationReport)];
654
+ let _classDescriptor;
655
+ let _classExtraInitializers = [];
656
+ let _classThis;
657
+ let _classSuper = EntryControlCC;
658
+ var EntryControlCCConfigurationGet = class extends _classSuper {
659
+ static { _classThis = this; }
660
+ static {
661
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
662
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
663
+ EntryControlCCConfigurationGet = _classThis = _classDescriptor.value;
664
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
665
+ __runInitializers(_classThis, _classExtraInitializers);
666
+ }
667
+ };
668
+ return EntryControlCCConfigurationGet = _classThis;
669
+ })();
546
670
  export { EntryControlCCConfigurationGet };
547
- let EntryControlCCConfigurationSet = class EntryControlCCConfigurationSet extends EntryControlCC {
548
- constructor(options) {
549
- super(options);
550
- this.keyCacheSize = options.keyCacheSize;
551
- this.keyCacheTimeout = options.keyCacheTimeout;
552
- }
553
- static from(_raw, _ctx) {
554
- // TODO: Deserialize payload
555
- throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
556
- // return new EntryControlCCConfigurationSet({
557
- // nodeId: ctx.sourceNodeId,
558
- // });
559
- }
560
- keyCacheSize;
561
- keyCacheTimeout;
562
- serialize(ctx) {
563
- this.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
564
- return super.serialize(ctx);
565
- }
566
- toLogEntry(ctx) {
567
- return {
568
- ...super.toLogEntry(ctx),
569
- message: {
570
- "key cache size": this.keyCacheSize,
571
- "key cache timeout": this.keyCacheTimeout,
572
- },
573
- };
574
- }
575
- };
576
- EntryControlCCConfigurationSet = __decorate([
577
- CCCommand(EntryControlCommand.ConfigurationSet),
578
- useSupervision()
579
- ], EntryControlCCConfigurationSet);
671
+ let EntryControlCCConfigurationSet = (() => {
672
+ let _classDecorators = [CCCommand(EntryControlCommand.ConfigurationSet), useSupervision()];
673
+ let _classDescriptor;
674
+ let _classExtraInitializers = [];
675
+ let _classThis;
676
+ let _classSuper = EntryControlCC;
677
+ var EntryControlCCConfigurationSet = class extends _classSuper {
678
+ static { _classThis = this; }
679
+ static {
680
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
681
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
682
+ EntryControlCCConfigurationSet = _classThis = _classDescriptor.value;
683
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
684
+ __runInitializers(_classThis, _classExtraInitializers);
685
+ }
686
+ constructor(options) {
687
+ super(options);
688
+ this.keyCacheSize = options.keyCacheSize;
689
+ this.keyCacheTimeout = options.keyCacheTimeout;
690
+ }
691
+ static from(_raw, _ctx) {
692
+ // TODO: Deserialize payload
693
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
694
+ // return new EntryControlCCConfigurationSet({
695
+ // nodeId: ctx.sourceNodeId,
696
+ // });
697
+ }
698
+ keyCacheSize;
699
+ keyCacheTimeout;
700
+ serialize(ctx) {
701
+ this.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
702
+ return super.serialize(ctx);
703
+ }
704
+ toLogEntry(ctx) {
705
+ return {
706
+ ...super.toLogEntry(ctx),
707
+ message: {
708
+ "key cache size": this.keyCacheSize,
709
+ "key cache timeout": this.keyCacheTimeout,
710
+ },
711
+ };
712
+ }
713
+ };
714
+ return EntryControlCCConfigurationSet = _classThis;
715
+ })();
580
716
  export { EntryControlCCConfigurationSet };
581
717
  //# sourceMappingURL=EntryControlCC.js.map