@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
@@ -50,13 +50,45 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
50
50
  var import_Values = require("../lib/Values.js");
51
51
  var import_Types = require("../lib/_Types.js");
52
52
  var ccUtils = __toESM(require("../lib/utils.js"), 1);
53
- var __decorate = function(decorators, target, key, desc) {
54
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56
- 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;
57
- return c > 3 && r && Object.defineProperty(target, key, r), r;
53
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
54
+ function accept(f) {
55
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
56
+ return f;
57
+ }
58
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
59
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
60
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
61
+ var _, done = false;
62
+ for (var i = decorators.length - 1; i >= 0; i--) {
63
+ var context = {};
64
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
65
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
66
+ context.addInitializer = function(f) {
67
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
68
+ extraInitializers.push(accept(f || null));
69
+ };
70
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
71
+ if (kind === "accessor") {
72
+ if (result === void 0) continue;
73
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
74
+ if (_ = accept(result.get)) descriptor.get = _;
75
+ if (_ = accept(result.set)) descriptor.set = _;
76
+ if (_ = accept(result.init)) initializers.unshift(_);
77
+ } else if (_ = accept(result)) {
78
+ if (kind === "field") initializers.unshift(_);
79
+ else descriptor[key] = _;
80
+ }
81
+ }
82
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
83
+ done = true;
84
+ };
85
+ var __runInitializers = function(thisArg, initializers, value) {
86
+ var useValue = arguments.length > 2;
87
+ for (var i = 0; i < initializers.length; i++) {
88
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
89
+ }
90
+ return useValue ? value : void 0;
58
91
  };
59
- var EntryControlCCNotification_1, EntryControlCCKeySupportedReport_1, EntryControlCCEventSupportedReport_1, EntryControlCCConfigurationReport_1;
60
92
  function __assertType(argName, typeName, boundHasError) {
61
93
  const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
62
94
  if (boundHasError()) {
@@ -97,485 +129,614 @@ const EntryControlCCValues = Object.freeze({
97
129
  })
98
130
  })
99
131
  });
100
- let EntryControlCCAPI = class EntryControlCCAPI2 extends import_API.CCAPI {
101
- supportsCommand(cmd) {
102
- switch (cmd) {
103
- case import_Types.EntryControlCommand.KeySupportedGet:
104
- case import_Types.EntryControlCommand.EventSupportedGet:
105
- case import_Types.EntryControlCommand.ConfigurationGet:
106
- return this.isSinglecast();
107
- case import_Types.EntryControlCommand.ConfigurationSet:
108
- return true;
109
- }
110
- return super.supportsCommand(cmd);
111
- }
112
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
113
- async getSupportedKeys() {
114
- this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.KeySupportedGet);
115
- const cc = new EntryControlCCKeySupportedGet({
116
- nodeId: this.endpoint.nodeId,
117
- endpointIndex: this.endpoint.index
118
- });
119
- const response = await this.host.sendCommand(cc, this.commandOptions);
120
- return response?.supportedKeys;
121
- }
122
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
123
- async getEventCapabilities() {
124
- this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.EventSupportedGet);
125
- const cc = new EntryControlCCEventSupportedGet({
126
- nodeId: this.endpoint.nodeId,
127
- endpointIndex: this.endpoint.index
128
- });
129
- const response = await this.host.sendCommand(cc, this.commandOptions);
130
- if (response) {
131
- return (0, import_safe3.pick)(response, [
132
- "supportedDataTypes",
133
- "supportedEventTypes",
134
- "minKeyCacheSize",
135
- "maxKeyCacheSize",
136
- "minKeyCacheTimeout",
137
- "maxKeyCacheTimeout"
138
- ]);
132
+ let EntryControlCCAPI = (() => {
133
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Entry Control"])];
134
+ let _classDescriptor;
135
+ let _classExtraInitializers = [];
136
+ let _classThis;
137
+ let _classSuper = import_API.CCAPI;
138
+ var EntryControlCCAPI2 = class extends _classSuper {
139
+ static {
140
+ _classThis = this;
139
141
  }
140
- }
141
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
142
- async getConfiguration() {
143
- this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
144
- const cc = new EntryControlCCConfigurationGet({
145
- nodeId: this.endpoint.nodeId,
146
- endpointIndex: this.endpoint.index
147
- });
148
- const response = await this.host.sendCommand(cc, this.commandOptions);
149
- if (response) {
150
- return (0, import_safe3.pick)(response, ["keyCacheSize", "keyCacheTimeout"]);
142
+ static {
143
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
144
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
145
+ EntryControlCCAPI2 = _classThis = _classDescriptor.value;
146
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
147
+ __runInitializers(_classThis, _classExtraInitializers);
151
148
  }
152
- }
153
- async setConfiguration(keyCacheSize, keyCacheTimeout) {
154
- __assertType("keyCacheSize", "number", __assertType__number.bind(void 0, keyCacheSize));
155
- __assertType("keyCacheTimeout", "number", __assertType__number.bind(void 0, keyCacheTimeout));
156
- this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
157
- const cc = new EntryControlCCConfigurationSet({
158
- nodeId: this.endpoint.nodeId,
159
- endpointIndex: this.endpoint.index,
160
- keyCacheSize,
161
- keyCacheTimeout
162
- });
163
- return this.host.sendCommand(cc, this.commandOptions);
164
- }
165
- get [import_API.SET_VALUE]() {
166
- return async function({ property }, value) {
167
- if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
168
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
149
+ supportsCommand(cmd) {
150
+ switch (cmd) {
151
+ case import_Types.EntryControlCommand.KeySupportedGet:
152
+ case import_Types.EntryControlCommand.EventSupportedGet:
153
+ case import_Types.EntryControlCommand.ConfigurationGet:
154
+ return this.isSinglecast();
155
+ case import_Types.EntryControlCommand.ConfigurationSet:
156
+ return true;
169
157
  }
170
- if (typeof value !== "number") {
171
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
172
- }
173
- let keyCacheSize = value;
174
- let keyCacheTimeout = 2;
175
- if (property === "keyCacheTimeout") {
176
- keyCacheTimeout = value;
177
- const oldKeyCacheSize = this.tryGetValueDB()?.getValue(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
178
- if (oldKeyCacheSize == void 0) {
179
- throw new import_safe.ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
180
- }
181
- keyCacheSize = oldKeyCacheSize;
182
- }
183
- const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
184
- if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
185
- this.schedulePoll({ property }, value, { transition: "fast" });
158
+ return super.supportsCommand(cmd);
159
+ }
160
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
161
+ async getSupportedKeys() {
162
+ this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.KeySupportedGet);
163
+ const cc = new EntryControlCCKeySupportedGet({
164
+ nodeId: this.endpoint.nodeId,
165
+ endpointIndex: this.endpoint.index
166
+ });
167
+ const response = await this.host.sendCommand(cc, this.commandOptions);
168
+ return response?.supportedKeys;
169
+ }
170
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
171
+ async getEventCapabilities() {
172
+ this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.EventSupportedGet);
173
+ const cc = new EntryControlCCEventSupportedGet({
174
+ nodeId: this.endpoint.nodeId,
175
+ endpointIndex: this.endpoint.index
176
+ });
177
+ const response = await this.host.sendCommand(cc, this.commandOptions);
178
+ if (response) {
179
+ return (0, import_safe3.pick)(response, [
180
+ "supportedDataTypes",
181
+ "supportedEventTypes",
182
+ "minKeyCacheSize",
183
+ "maxKeyCacheSize",
184
+ "minKeyCacheTimeout",
185
+ "maxKeyCacheTimeout"
186
+ ]);
186
187
  }
187
- return result;
188
- };
189
- }
190
- get [import_API.POLL_VALUE]() {
191
- return async function({ property }) {
192
- switch (property) {
193
- case "keyCacheSize":
194
- case "keyCacheTimeout":
195
- return (await this.getConfiguration())?.[property];
188
+ }
189
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
190
+ async getConfiguration() {
191
+ this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
192
+ const cc = new EntryControlCCConfigurationGet({
193
+ nodeId: this.endpoint.nodeId,
194
+ endpointIndex: this.endpoint.index
195
+ });
196
+ const response = await this.host.sendCommand(cc, this.commandOptions);
197
+ if (response) {
198
+ return (0, import_safe3.pick)(response, ["keyCacheSize", "keyCacheTimeout"]);
196
199
  }
197
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
198
- };
199
- }
200
- };
201
- EntryControlCCAPI = __decorate([
202
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Entry Control"])
203
- ], EntryControlCCAPI);
204
- let EntryControlCC = class EntryControlCC2 extends import_CommandClass.CommandClass {
205
- determineRequiredCCInterviews() {
206
- return [
207
- ...super.determineRequiredCCInterviews(),
208
- import_safe.CommandClasses.Association,
209
- import_safe.CommandClasses["Multi Channel Association"],
210
- import_safe.CommandClasses["Association Group Information"]
211
- ];
212
- }
213
- async interview(ctx) {
214
- const node = this.getNode(ctx);
215
- const endpoint = this.getEndpoint(ctx);
216
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
217
- priority: import_safe.MessagePriority.NodeQuery
218
- });
219
- ctx.logNode(node.id, {
220
- endpoint: this.endpointIndex,
221
- message: `Interviewing ${this.ccName}...`,
222
- direction: "none"
223
- });
224
- try {
225
- await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.EntryControlCommand.Notification);
226
- } catch {
227
- ctx.logNode(node.id, {
228
- endpoint: endpoint.index,
229
- message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
230
- level: "warn"
200
+ }
201
+ async setConfiguration(keyCacheSize, keyCacheTimeout) {
202
+ __assertType("keyCacheSize", "number", __assertType__number.bind(void 0, keyCacheSize));
203
+ __assertType("keyCacheTimeout", "number", __assertType__number.bind(void 0, keyCacheTimeout));
204
+ this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
205
+ const cc = new EntryControlCCConfigurationSet({
206
+ nodeId: this.endpoint.nodeId,
207
+ endpointIndex: this.endpoint.index,
208
+ keyCacheSize,
209
+ keyCacheTimeout
231
210
  });
211
+ return this.host.sendCommand(cc, this.commandOptions);
212
+ }
213
+ get [import_API.SET_VALUE]() {
214
+ return async function({ property }, value) {
215
+ if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
216
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
217
+ }
218
+ if (typeof value !== "number") {
219
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
220
+ }
221
+ let keyCacheSize = value;
222
+ let keyCacheTimeout = 2;
223
+ if (property === "keyCacheTimeout") {
224
+ keyCacheTimeout = value;
225
+ const oldKeyCacheSize = this.tryGetValueDB()?.getValue(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
226
+ if (oldKeyCacheSize == void 0) {
227
+ throw new import_safe.ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
228
+ }
229
+ keyCacheSize = oldKeyCacheSize;
230
+ }
231
+ const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
232
+ if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
233
+ this.schedulePoll({ property }, value, { transition: "fast" });
234
+ }
235
+ return result;
236
+ };
232
237
  }
233
- ctx.logNode(node.id, {
234
- endpoint: this.endpointIndex,
235
- message: "requesting entry control supported keys...",
236
- direction: "outbound"
237
- });
238
- const supportedKeys = await api.getSupportedKeys();
239
- if (supportedKeys) {
238
+ get [import_API.POLL_VALUE]() {
239
+ return async function({ property }) {
240
+ switch (property) {
241
+ case "keyCacheSize":
242
+ case "keyCacheTimeout":
243
+ return (await this.getConfiguration())?.[property];
244
+ }
245
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
246
+ };
247
+ }
248
+ };
249
+ return EntryControlCCAPI2 = _classThis;
250
+ })();
251
+ let EntryControlCC = (() => {
252
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Entry Control"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(EntryControlCCValues)];
253
+ let _classDescriptor;
254
+ let _classExtraInitializers = [];
255
+ let _classThis;
256
+ let _classSuper = import_CommandClass.CommandClass;
257
+ var EntryControlCC2 = class extends _classSuper {
258
+ static {
259
+ _classThis = this;
260
+ }
261
+ static {
262
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
263
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
264
+ EntryControlCC2 = _classThis = _classDescriptor.value;
265
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
266
+ __runInitializers(_classThis, _classExtraInitializers);
267
+ }
268
+ determineRequiredCCInterviews() {
269
+ return [
270
+ ...super.determineRequiredCCInterviews(),
271
+ import_safe.CommandClasses.Association,
272
+ import_safe.CommandClasses["Multi Channel Association"],
273
+ import_safe.CommandClasses["Association Group Information"]
274
+ ];
275
+ }
276
+ async interview(ctx) {
277
+ const node = this.getNode(ctx);
278
+ const endpoint = this.getEndpoint(ctx);
279
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
280
+ priority: import_safe.MessagePriority.NodeQuery
281
+ });
240
282
  ctx.logNode(node.id, {
241
283
  endpoint: this.endpointIndex,
242
- message: `received entry control supported keys: ${supportedKeys.toString()}`,
243
- direction: "inbound"
284
+ message: `Interviewing ${this.ccName}...`,
285
+ direction: "none"
244
286
  });
245
- }
246
- ctx.logNode(node.id, {
247
- endpoint: this.endpointIndex,
248
- message: "requesting entry control supported events...",
249
- direction: "outbound"
250
- });
251
- const eventCapabilities = await api.getEventCapabilities();
252
- if (eventCapabilities) {
287
+ try {
288
+ await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.EntryControlCommand.Notification);
289
+ } catch {
290
+ ctx.logNode(node.id, {
291
+ endpoint: endpoint.index,
292
+ message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
293
+ level: "warn"
294
+ });
295
+ }
253
296
  ctx.logNode(node.id, {
254
297
  endpoint: this.endpointIndex,
255
- message: `received entry control supported keys:
298
+ message: "requesting entry control supported keys...",
299
+ direction: "outbound"
300
+ });
301
+ const supportedKeys = await api.getSupportedKeys();
302
+ if (supportedKeys) {
303
+ ctx.logNode(node.id, {
304
+ endpoint: this.endpointIndex,
305
+ message: `received entry control supported keys: ${supportedKeys.toString()}`,
306
+ direction: "inbound"
307
+ });
308
+ }
309
+ ctx.logNode(node.id, {
310
+ endpoint: this.endpointIndex,
311
+ message: "requesting entry control supported events...",
312
+ direction: "outbound"
313
+ });
314
+ const eventCapabilities = await api.getEventCapabilities();
315
+ if (eventCapabilities) {
316
+ ctx.logNode(node.id, {
317
+ endpoint: this.endpointIndex,
318
+ message: `received entry control supported keys:
256
319
  data types: ${eventCapabilities.supportedDataTypes.map((e) => import_Types.EntryControlDataTypes[e]).toString()}
257
320
  event types: ${eventCapabilities.supportedEventTypes.map((e) => import_Types.EntryControlEventTypes[e]).toString()}
258
321
  min key cache size: ${eventCapabilities.minKeyCacheSize}
259
322
  max key cache size: ${eventCapabilities.maxKeyCacheSize}
260
323
  min key cache timeout: ${eventCapabilities.minKeyCacheTimeout} seconds
261
324
  max key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,
262
- direction: "inbound"
263
- });
325
+ direction: "inbound"
326
+ });
327
+ }
328
+ await this.refreshValues(ctx);
329
+ this.setInterviewComplete(ctx, true);
264
330
  }
265
- await this.refreshValues(ctx);
266
- this.setInterviewComplete(ctx, true);
267
- }
268
- async refreshValues(ctx) {
269
- const node = this.getNode(ctx);
270
- const endpoint = this.getEndpoint(ctx);
271
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
272
- priority: import_safe.MessagePriority.NodeQuery
273
- });
274
- ctx.logNode(node.id, {
275
- endpoint: this.endpointIndex,
276
- message: "requesting entry control configuration...",
277
- direction: "outbound"
278
- });
279
- const conf = await api.getConfiguration();
280
- if (conf) {
331
+ async refreshValues(ctx) {
332
+ const node = this.getNode(ctx);
333
+ const endpoint = this.getEndpoint(ctx);
334
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
335
+ priority: import_safe.MessagePriority.NodeQuery
336
+ });
281
337
  ctx.logNode(node.id, {
282
338
  endpoint: this.endpointIndex,
283
- message: `received entry control configuration:
339
+ message: "requesting entry control configuration...",
340
+ direction: "outbound"
341
+ });
342
+ const conf = await api.getConfiguration();
343
+ if (conf) {
344
+ ctx.logNode(node.id, {
345
+ endpoint: this.endpointIndex,
346
+ message: `received entry control configuration:
284
347
  key cache size: ${conf.keyCacheSize}
285
348
  key cache timeout: ${conf.keyCacheTimeout} seconds`,
286
- direction: "inbound"
287
- });
288
- }
289
- }
290
- };
291
- EntryControlCC = __decorate([
292
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Entry Control"]),
293
- (0, import_CommandClassDecorators.implementedVersion)(1),
294
- (0, import_CommandClassDecorators.ccValues)(EntryControlCCValues)
295
- ], EntryControlCC);
296
- let EntryControlCCNotification = EntryControlCCNotification_1 = class EntryControlCCNotification2 extends EntryControlCC {
297
- constructor(options) {
298
- super(options);
299
- this.sequenceNumber = options.sequenceNumber;
300
- this.dataType = options.dataType;
301
- this.eventType = options.eventType;
302
- this.eventData = options.eventData;
303
- }
304
- static from(raw, ctx) {
305
- (0, import_safe.validatePayload)(raw.payload.length >= 4);
306
- const sequenceNumber = raw.payload[0];
307
- let dataType = raw.payload[1] & 3;
308
- const eventType = raw.payload[2];
309
- const eventDataLength = raw.payload[3];
310
- (0, import_safe.validatePayload)(eventDataLength >= 0 && eventDataLength <= 32);
311
- const offset = 4;
312
- (0, import_safe.validatePayload)(raw.payload.length >= offset + eventDataLength);
313
- let eventData;
314
- if (eventDataLength > 0) {
315
- const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
316
- eventData = import_safe2.Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
317
- switch (dataType) {
318
- case import_Types.EntryControlDataTypes.Raw:
319
- if (!noStrictValidation) {
320
- (0, import_safe.validatePayload)(eventDataLength >= 1 && eventDataLength <= 32);
321
- }
322
- break;
323
- case import_Types.EntryControlDataTypes.ASCII:
324
- if (!noStrictValidation) {
325
- (0, import_safe.validatePayload)(eventDataLength === 16 || eventDataLength === 32);
326
- }
327
- eventData = eventData.toString("ascii");
328
- if (!noStrictValidation) {
329
- (0, import_safe.validatePayload)(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
330
- }
331
- eventData = eventData.replace(/[\u00ff]*$/, "");
332
- break;
333
- case import_Types.EntryControlDataTypes.MD5:
334
- if (!noStrictValidation) {
335
- (0, import_safe.validatePayload)(eventDataLength === 16);
336
- }
337
- break;
338
- }
339
- } else {
340
- dataType = import_Types.EntryControlDataTypes.None;
341
- }
342
- return new EntryControlCCNotification_1({
343
- nodeId: ctx.sourceNodeId,
344
- sequenceNumber,
345
- dataType,
346
- eventType,
347
- eventData
348
- });
349
- }
350
- sequenceNumber;
351
- dataType;
352
- eventType;
353
- eventData;
354
- toLogEntry(ctx) {
355
- const message = {
356
- "sequence number": this.sequenceNumber,
357
- "data type": this.dataType,
358
- "event type": this.eventType
359
- };
360
- if (this.eventData) {
361
- switch (this.eventType) {
362
- case import_Types.EntryControlEventTypes.CachedKeys:
363
- case import_Types.EntryControlEventTypes.Enter:
364
- message["event data"] = "*".repeat(this.eventData.length);
365
- break;
366
- default:
367
- message["event data"] = typeof this.eventData === "string" ? this.eventData : (0, import_safe3.buffer2hex)(this.eventData);
349
+ direction: "inbound"
350
+ });
368
351
  }
369
352
  }
370
- return {
371
- ...super.toLogEntry(ctx),
372
- message
373
- };
374
- }
375
- };
376
- EntryControlCCNotification = EntryControlCCNotification_1 = __decorate([
377
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.Notification)
378
- ], EntryControlCCNotification);
379
- let EntryControlCCKeySupportedReport = EntryControlCCKeySupportedReport_1 = class EntryControlCCKeySupportedReport2 extends EntryControlCC {
380
- constructor(options) {
381
- super(options);
382
- this.supportedKeys = options.supportedKeys;
383
- }
384
- static from(raw, ctx) {
385
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
386
- const length = raw.payload[0];
387
- (0, import_safe.validatePayload)(raw.payload.length >= 1 + length);
388
- const supportedKeys = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 1 + length), 0);
389
- return new EntryControlCCKeySupportedReport_1({
390
- nodeId: ctx.sourceNodeId,
391
- supportedKeys
392
- });
393
- }
394
- supportedKeys;
395
- toLogEntry(ctx) {
396
- return {
397
- ...super.toLogEntry(ctx),
398
- message: { "supported keys": this.supportedKeys.toString() }
399
- };
400
- }
401
- };
402
- __decorate([
403
- (0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.supportedKeys)
404
- ], EntryControlCCKeySupportedReport.prototype, "supportedKeys", void 0);
405
- EntryControlCCKeySupportedReport = EntryControlCCKeySupportedReport_1 = __decorate([
406
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedReport)
407
- ], EntryControlCCKeySupportedReport);
408
- let EntryControlCCKeySupportedGet = class EntryControlCCKeySupportedGet2 extends EntryControlCC {
409
- };
410
- EntryControlCCKeySupportedGet = __decorate([
411
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedGet),
412
- (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCKeySupportedReport)
413
- ], EntryControlCCKeySupportedGet);
414
- let EntryControlCCEventSupportedReport = EntryControlCCEventSupportedReport_1 = class EntryControlCCEventSupportedReport2 extends EntryControlCC {
415
- constructor(options) {
416
- super(options);
417
- this.supportedDataTypes = options.supportedDataTypes;
418
- this.supportedEventTypes = options.supportedEventTypes;
419
- this.minKeyCacheSize = options.minKeyCacheSize;
420
- this.maxKeyCacheSize = options.maxKeyCacheSize;
421
- this.minKeyCacheTimeout = options.minKeyCacheTimeout;
422
- this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
423
- }
424
- static from(raw, ctx) {
425
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
426
- const dataTypeLength = raw.payload[0] & 3;
427
- let offset = 1;
428
- (0, import_safe.validatePayload)(raw.payload.length >= offset + dataTypeLength);
429
- const supportedDataTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + dataTypeLength), import_Types.EntryControlDataTypes.None);
430
- offset += dataTypeLength;
431
- (0, import_safe.validatePayload)(raw.payload.length >= offset + 1);
432
- const eventTypeLength = raw.payload[offset] & 31;
433
- offset += 1;
434
- (0, import_safe.validatePayload)(raw.payload.length >= offset + eventTypeLength);
435
- const supportedEventTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + eventTypeLength), import_Types.EntryControlEventTypes.Caching);
436
- offset += eventTypeLength;
437
- (0, import_safe.validatePayload)(raw.payload.length >= offset + 4);
438
- const minKeyCacheSize = raw.payload[offset];
439
- (0, import_safe.validatePayload)(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
440
- const maxKeyCacheSize = raw.payload[offset + 1];
441
- (0, import_safe.validatePayload)(maxKeyCacheSize >= minKeyCacheSize && maxKeyCacheSize <= 32);
442
- const minKeyCacheTimeout = raw.payload[offset + 2];
443
- const maxKeyCacheTimeout = raw.payload[offset + 3];
444
- return new EntryControlCCEventSupportedReport_1({
445
- nodeId: ctx.sourceNodeId,
446
- supportedDataTypes,
447
- supportedEventTypes,
448
- minKeyCacheSize,
449
- maxKeyCacheSize,
450
- minKeyCacheTimeout,
451
- maxKeyCacheTimeout
452
- });
453
- }
454
- persistValues(ctx) {
455
- if (!super.persistValues(ctx))
456
- return false;
457
- const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
458
- this.setMetadata(ctx, keyCacheSizeValue, {
459
- ...keyCacheSizeValue.meta,
460
- min: this.minKeyCacheSize,
461
- max: this.maxKeyCacheSize
462
- });
463
- const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
464
- this.setMetadata(ctx, keyCacheTimeoutValue, {
465
- ...keyCacheTimeoutValue.meta,
466
- min: this.minKeyCacheTimeout,
467
- max: this.maxKeyCacheTimeout
468
- });
469
- return true;
470
- }
471
- supportedDataTypes;
472
- supportedEventTypes;
473
- minKeyCacheSize;
474
- maxKeyCacheSize;
475
- minKeyCacheTimeout;
476
- maxKeyCacheTimeout;
477
- toLogEntry(ctx) {
478
- return {
479
- ...super.toLogEntry(ctx),
480
- message: {
481
- "supported data types": this.supportedDataTypes.map((dt) => import_Types.EntryControlDataTypes[dt]).toString(),
482
- "supported event types": this.supportedEventTypes.map((et) => import_Types.EntryControlEventTypes[et]).toString(),
483
- "min key cache size": this.minKeyCacheSize,
484
- "max key cache size": this.maxKeyCacheSize,
485
- "min key cache timeout": this.minKeyCacheTimeout,
486
- "max key cache timeout": this.maxKeyCacheTimeout
487
- }
488
- };
489
- }
490
- };
491
- __decorate([
492
- (0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.supportedDataTypes)
493
- ], EntryControlCCEventSupportedReport.prototype, "supportedDataTypes", void 0);
494
- __decorate([
495
- (0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.supportedEventTypes)
496
- ], EntryControlCCEventSupportedReport.prototype, "supportedEventTypes", void 0);
497
- EntryControlCCEventSupportedReport = EntryControlCCEventSupportedReport_1 = __decorate([
498
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedReport)
499
- ], EntryControlCCEventSupportedReport);
500
- let EntryControlCCEventSupportedGet = class EntryControlCCEventSupportedGet2 extends EntryControlCC {
501
- };
502
- EntryControlCCEventSupportedGet = __decorate([
503
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedGet),
504
- (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCEventSupportedReport)
505
- ], EntryControlCCEventSupportedGet);
506
- let EntryControlCCConfigurationReport = EntryControlCCConfigurationReport_1 = class EntryControlCCConfigurationReport2 extends EntryControlCC {
507
- constructor(options) {
508
- super(options);
509
- this.keyCacheSize = options.keyCacheSize;
510
- this.keyCacheTimeout = options.keyCacheTimeout;
511
- }
512
- static from(raw, ctx) {
513
- (0, import_safe.validatePayload)(raw.payload.length >= 2);
514
- const keyCacheSize = raw.payload[0];
515
- (0, import_safe.validatePayload)(keyCacheSize >= 1 && keyCacheSize <= 32);
516
- const keyCacheTimeout = raw.payload[1];
517
- return new EntryControlCCConfigurationReport_1({
518
- nodeId: ctx.sourceNodeId,
519
- keyCacheSize,
520
- keyCacheTimeout
521
- });
522
- }
523
- keyCacheSize;
524
- keyCacheTimeout;
525
- toLogEntry(ctx) {
526
- return {
527
- ...super.toLogEntry(ctx),
528
- message: {
529
- "key cache size": this.keyCacheSize,
530
- "key cache timeout": this.keyCacheTimeout
353
+ };
354
+ return EntryControlCC2 = _classThis;
355
+ })();
356
+ let EntryControlCCNotification = (() => {
357
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.Notification)];
358
+ let _classDescriptor;
359
+ let _classExtraInitializers = [];
360
+ let _classThis;
361
+ let _classSuper = EntryControlCC;
362
+ var EntryControlCCNotification2 = class extends _classSuper {
363
+ static {
364
+ _classThis = this;
365
+ }
366
+ static {
367
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
368
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
369
+ EntryControlCCNotification2 = _classThis = _classDescriptor.value;
370
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
371
+ __runInitializers(_classThis, _classExtraInitializers);
372
+ }
373
+ constructor(options) {
374
+ super(options);
375
+ this.sequenceNumber = options.sequenceNumber;
376
+ this.dataType = options.dataType;
377
+ this.eventType = options.eventType;
378
+ this.eventData = options.eventData;
379
+ }
380
+ static from(raw, ctx) {
381
+ (0, import_safe.validatePayload)(raw.payload.length >= 4);
382
+ const sequenceNumber = raw.payload[0];
383
+ let dataType = raw.payload[1] & 3;
384
+ const eventType = raw.payload[2];
385
+ const eventDataLength = raw.payload[3];
386
+ (0, import_safe.validatePayload)(eventDataLength >= 0 && eventDataLength <= 32);
387
+ const offset = 4;
388
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + eventDataLength);
389
+ let eventData;
390
+ if (eventDataLength > 0) {
391
+ const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
392
+ eventData = import_safe2.Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
393
+ switch (dataType) {
394
+ case import_Types.EntryControlDataTypes.Raw:
395
+ if (!noStrictValidation) {
396
+ (0, import_safe.validatePayload)(eventDataLength >= 1 && eventDataLength <= 32);
397
+ }
398
+ break;
399
+ case import_Types.EntryControlDataTypes.ASCII:
400
+ if (!noStrictValidation) {
401
+ (0, import_safe.validatePayload)(eventDataLength === 16 || eventDataLength === 32);
402
+ }
403
+ eventData = eventData.toString("ascii");
404
+ if (!noStrictValidation) {
405
+ (0, import_safe.validatePayload)(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
406
+ }
407
+ eventData = eventData.replace(/[\u00ff]*$/, "");
408
+ break;
409
+ case import_Types.EntryControlDataTypes.MD5:
410
+ if (!noStrictValidation) {
411
+ (0, import_safe.validatePayload)(eventDataLength === 16);
412
+ }
413
+ break;
414
+ }
415
+ } else {
416
+ dataType = import_Types.EntryControlDataTypes.None;
531
417
  }
532
- };
533
- }
534
- };
535
- __decorate([
536
- (0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.keyCacheSize)
537
- ], EntryControlCCConfigurationReport.prototype, "keyCacheSize", void 0);
538
- __decorate([
539
- (0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.keyCacheTimeout)
540
- ], EntryControlCCConfigurationReport.prototype, "keyCacheTimeout", void 0);
541
- EntryControlCCConfigurationReport = EntryControlCCConfigurationReport_1 = __decorate([
542
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationReport)
543
- ], EntryControlCCConfigurationReport);
544
- let EntryControlCCConfigurationGet = class EntryControlCCConfigurationGet2 extends EntryControlCC {
545
- };
546
- EntryControlCCConfigurationGet = __decorate([
547
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationGet),
548
- (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCConfigurationReport)
549
- ], EntryControlCCConfigurationGet);
550
- let EntryControlCCConfigurationSet = class EntryControlCCConfigurationSet2 extends EntryControlCC {
551
- constructor(options) {
552
- super(options);
553
- this.keyCacheSize = options.keyCacheSize;
554
- this.keyCacheTimeout = options.keyCacheTimeout;
555
- }
556
- static from(_raw, _ctx) {
557
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
558
- }
559
- keyCacheSize;
560
- keyCacheTimeout;
561
- serialize(ctx) {
562
- this.payload = import_safe2.Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
563
- return super.serialize(ctx);
564
- }
565
- toLogEntry(ctx) {
566
- return {
567
- ...super.toLogEntry(ctx),
568
- message: {
569
- "key cache size": this.keyCacheSize,
570
- "key cache timeout": this.keyCacheTimeout
418
+ return new this({
419
+ nodeId: ctx.sourceNodeId,
420
+ sequenceNumber,
421
+ dataType,
422
+ eventType,
423
+ eventData
424
+ });
425
+ }
426
+ sequenceNumber;
427
+ dataType;
428
+ eventType;
429
+ eventData;
430
+ toLogEntry(ctx) {
431
+ const message = {
432
+ "sequence number": this.sequenceNumber,
433
+ "data type": this.dataType,
434
+ "event type": this.eventType
435
+ };
436
+ if (this.eventData) {
437
+ switch (this.eventType) {
438
+ case import_Types.EntryControlEventTypes.CachedKeys:
439
+ case import_Types.EntryControlEventTypes.Enter:
440
+ message["event data"] = "*".repeat(this.eventData.length);
441
+ break;
442
+ default:
443
+ message["event data"] = typeof this.eventData === "string" ? this.eventData : (0, import_safe3.buffer2hex)(this.eventData);
444
+ }
571
445
  }
572
- };
573
- }
574
- };
575
- EntryControlCCConfigurationSet = __decorate([
576
- (0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationSet),
577
- (0, import_CommandClassDecorators.useSupervision)()
578
- ], EntryControlCCConfigurationSet);
446
+ return {
447
+ ...super.toLogEntry(ctx),
448
+ message
449
+ };
450
+ }
451
+ };
452
+ return EntryControlCCNotification2 = _classThis;
453
+ })();
454
+ let EntryControlCCKeySupportedReport = (() => {
455
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedKeys", EntryControlCCValues.supportedKeys)];
456
+ let _classDescriptor;
457
+ let _classExtraInitializers = [];
458
+ let _classThis;
459
+ let _classSuper = EntryControlCC;
460
+ var EntryControlCCKeySupportedReport2 = class extends _classSuper {
461
+ static {
462
+ _classThis = this;
463
+ }
464
+ static {
465
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
466
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
467
+ EntryControlCCKeySupportedReport2 = _classThis = _classDescriptor.value;
468
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
469
+ __runInitializers(_classThis, _classExtraInitializers);
470
+ }
471
+ constructor(options) {
472
+ super(options);
473
+ this.supportedKeys = options.supportedKeys;
474
+ }
475
+ static from(raw, ctx) {
476
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
477
+ const length = raw.payload[0];
478
+ (0, import_safe.validatePayload)(raw.payload.length >= 1 + length);
479
+ const supportedKeys = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 1 + length), 0);
480
+ return new this({
481
+ nodeId: ctx.sourceNodeId,
482
+ supportedKeys
483
+ });
484
+ }
485
+ supportedKeys;
486
+ toLogEntry(ctx) {
487
+ return {
488
+ ...super.toLogEntry(ctx),
489
+ message: { "supported keys": this.supportedKeys.toString() }
490
+ };
491
+ }
492
+ };
493
+ return EntryControlCCKeySupportedReport2 = _classThis;
494
+ })();
495
+ let EntryControlCCKeySupportedGet = (() => {
496
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCKeySupportedReport)];
497
+ let _classDescriptor;
498
+ let _classExtraInitializers = [];
499
+ let _classThis;
500
+ let _classSuper = EntryControlCC;
501
+ var EntryControlCCKeySupportedGet2 = class extends _classSuper {
502
+ static {
503
+ _classThis = this;
504
+ }
505
+ static {
506
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
507
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
508
+ EntryControlCCKeySupportedGet2 = _classThis = _classDescriptor.value;
509
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
510
+ __runInitializers(_classThis, _classExtraInitializers);
511
+ }
512
+ };
513
+ return EntryControlCCKeySupportedGet2 = _classThis;
514
+ })();
515
+ let EntryControlCCEventSupportedReport = (() => {
516
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedDataTypes", EntryControlCCValues.supportedDataTypes), (0, import_CommandClassDecorators.ccValueProperty)("supportedEventTypes", EntryControlCCValues.supportedEventTypes)];
517
+ let _classDescriptor;
518
+ let _classExtraInitializers = [];
519
+ let _classThis;
520
+ let _classSuper = EntryControlCC;
521
+ var EntryControlCCEventSupportedReport2 = class extends _classSuper {
522
+ static {
523
+ _classThis = this;
524
+ }
525
+ static {
526
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
527
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
528
+ EntryControlCCEventSupportedReport2 = _classThis = _classDescriptor.value;
529
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
530
+ __runInitializers(_classThis, _classExtraInitializers);
531
+ }
532
+ constructor(options) {
533
+ super(options);
534
+ this.supportedDataTypes = options.supportedDataTypes;
535
+ this.supportedEventTypes = options.supportedEventTypes;
536
+ this.minKeyCacheSize = options.minKeyCacheSize;
537
+ this.maxKeyCacheSize = options.maxKeyCacheSize;
538
+ this.minKeyCacheTimeout = options.minKeyCacheTimeout;
539
+ this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
540
+ }
541
+ static from(raw, ctx) {
542
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
543
+ const dataTypeLength = raw.payload[0] & 3;
544
+ let offset = 1;
545
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + dataTypeLength);
546
+ const supportedDataTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + dataTypeLength), import_Types.EntryControlDataTypes.None);
547
+ offset += dataTypeLength;
548
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + 1);
549
+ const eventTypeLength = raw.payload[offset] & 31;
550
+ offset += 1;
551
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + eventTypeLength);
552
+ const supportedEventTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + eventTypeLength), import_Types.EntryControlEventTypes.Caching);
553
+ offset += eventTypeLength;
554
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + 4);
555
+ const minKeyCacheSize = raw.payload[offset];
556
+ (0, import_safe.validatePayload)(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
557
+ const maxKeyCacheSize = raw.payload[offset + 1];
558
+ (0, import_safe.validatePayload)(maxKeyCacheSize >= minKeyCacheSize && maxKeyCacheSize <= 32);
559
+ const minKeyCacheTimeout = raw.payload[offset + 2];
560
+ const maxKeyCacheTimeout = raw.payload[offset + 3];
561
+ return new this({
562
+ nodeId: ctx.sourceNodeId,
563
+ supportedDataTypes,
564
+ supportedEventTypes,
565
+ minKeyCacheSize,
566
+ maxKeyCacheSize,
567
+ minKeyCacheTimeout,
568
+ maxKeyCacheTimeout
569
+ });
570
+ }
571
+ persistValues(ctx) {
572
+ if (!super.persistValues(ctx))
573
+ return false;
574
+ const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
575
+ this.setMetadata(ctx, keyCacheSizeValue, {
576
+ ...keyCacheSizeValue.meta,
577
+ min: this.minKeyCacheSize,
578
+ max: this.maxKeyCacheSize
579
+ });
580
+ const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
581
+ this.setMetadata(ctx, keyCacheTimeoutValue, {
582
+ ...keyCacheTimeoutValue.meta,
583
+ min: this.minKeyCacheTimeout,
584
+ max: this.maxKeyCacheTimeout
585
+ });
586
+ return true;
587
+ }
588
+ supportedDataTypes;
589
+ supportedEventTypes;
590
+ minKeyCacheSize;
591
+ maxKeyCacheSize;
592
+ minKeyCacheTimeout;
593
+ maxKeyCacheTimeout;
594
+ toLogEntry(ctx) {
595
+ return {
596
+ ...super.toLogEntry(ctx),
597
+ message: {
598
+ "supported data types": this.supportedDataTypes.map((dt) => import_Types.EntryControlDataTypes[dt]).toString(),
599
+ "supported event types": this.supportedEventTypes.map((et) => import_Types.EntryControlEventTypes[et]).toString(),
600
+ "min key cache size": this.minKeyCacheSize,
601
+ "max key cache size": this.maxKeyCacheSize,
602
+ "min key cache timeout": this.minKeyCacheTimeout,
603
+ "max key cache timeout": this.maxKeyCacheTimeout
604
+ }
605
+ };
606
+ }
607
+ };
608
+ return EntryControlCCEventSupportedReport2 = _classThis;
609
+ })();
610
+ let EntryControlCCEventSupportedGet = (() => {
611
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCEventSupportedReport)];
612
+ let _classDescriptor;
613
+ let _classExtraInitializers = [];
614
+ let _classThis;
615
+ let _classSuper = EntryControlCC;
616
+ var EntryControlCCEventSupportedGet2 = class extends _classSuper {
617
+ static {
618
+ _classThis = this;
619
+ }
620
+ static {
621
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
622
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
623
+ EntryControlCCEventSupportedGet2 = _classThis = _classDescriptor.value;
624
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
625
+ __runInitializers(_classThis, _classExtraInitializers);
626
+ }
627
+ };
628
+ return EntryControlCCEventSupportedGet2 = _classThis;
629
+ })();
630
+ let EntryControlCCConfigurationReport = (() => {
631
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationReport), (0, import_CommandClassDecorators.ccValueProperty)("keyCacheSize", EntryControlCCValues.keyCacheSize), (0, import_CommandClassDecorators.ccValueProperty)("keyCacheTimeout", EntryControlCCValues.keyCacheTimeout)];
632
+ let _classDescriptor;
633
+ let _classExtraInitializers = [];
634
+ let _classThis;
635
+ let _classSuper = EntryControlCC;
636
+ var EntryControlCCConfigurationReport2 = class extends _classSuper {
637
+ static {
638
+ _classThis = this;
639
+ }
640
+ static {
641
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
642
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
643
+ EntryControlCCConfigurationReport2 = _classThis = _classDescriptor.value;
644
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
645
+ __runInitializers(_classThis, _classExtraInitializers);
646
+ }
647
+ constructor(options) {
648
+ super(options);
649
+ this.keyCacheSize = options.keyCacheSize;
650
+ this.keyCacheTimeout = options.keyCacheTimeout;
651
+ }
652
+ static from(raw, ctx) {
653
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
654
+ const keyCacheSize = raw.payload[0];
655
+ (0, import_safe.validatePayload)(keyCacheSize >= 1 && keyCacheSize <= 32);
656
+ const keyCacheTimeout = raw.payload[1];
657
+ return new this({
658
+ nodeId: ctx.sourceNodeId,
659
+ keyCacheSize,
660
+ keyCacheTimeout
661
+ });
662
+ }
663
+ keyCacheSize;
664
+ keyCacheTimeout;
665
+ toLogEntry(ctx) {
666
+ return {
667
+ ...super.toLogEntry(ctx),
668
+ message: {
669
+ "key cache size": this.keyCacheSize,
670
+ "key cache timeout": this.keyCacheTimeout
671
+ }
672
+ };
673
+ }
674
+ };
675
+ return EntryControlCCConfigurationReport2 = _classThis;
676
+ })();
677
+ let EntryControlCCConfigurationGet = (() => {
678
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCConfigurationReport)];
679
+ let _classDescriptor;
680
+ let _classExtraInitializers = [];
681
+ let _classThis;
682
+ let _classSuper = EntryControlCC;
683
+ var EntryControlCCConfigurationGet2 = class extends _classSuper {
684
+ static {
685
+ _classThis = this;
686
+ }
687
+ static {
688
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
689
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
690
+ EntryControlCCConfigurationGet2 = _classThis = _classDescriptor.value;
691
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
692
+ __runInitializers(_classThis, _classExtraInitializers);
693
+ }
694
+ };
695
+ return EntryControlCCConfigurationGet2 = _classThis;
696
+ })();
697
+ let EntryControlCCConfigurationSet = (() => {
698
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationSet), (0, import_CommandClassDecorators.useSupervision)()];
699
+ let _classDescriptor;
700
+ let _classExtraInitializers = [];
701
+ let _classThis;
702
+ let _classSuper = EntryControlCC;
703
+ var EntryControlCCConfigurationSet2 = class extends _classSuper {
704
+ static {
705
+ _classThis = this;
706
+ }
707
+ static {
708
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
709
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
710
+ EntryControlCCConfigurationSet2 = _classThis = _classDescriptor.value;
711
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
712
+ __runInitializers(_classThis, _classExtraInitializers);
713
+ }
714
+ constructor(options) {
715
+ super(options);
716
+ this.keyCacheSize = options.keyCacheSize;
717
+ this.keyCacheTimeout = options.keyCacheTimeout;
718
+ }
719
+ static from(_raw, _ctx) {
720
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
721
+ }
722
+ keyCacheSize;
723
+ keyCacheTimeout;
724
+ serialize(ctx) {
725
+ this.payload = import_safe2.Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
726
+ return super.serialize(ctx);
727
+ }
728
+ toLogEntry(ctx) {
729
+ return {
730
+ ...super.toLogEntry(ctx),
731
+ message: {
732
+ "key cache size": this.keyCacheSize,
733
+ "key cache timeout": this.keyCacheTimeout
734
+ }
735
+ };
736
+ }
737
+ };
738
+ return EntryControlCCConfigurationSet2 = _classThis;
739
+ })();
579
740
  // Annotate the CommonJS export names for ESM import in node:
580
741
  0 && (module.exports = {
581
742
  EntryControlCC,