@zwave-js/cc 14.0.0-beta.1 → 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 (923) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
  2. package/build/cjs/cc/AlarmSensorCC.js +510 -0
  3. package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
  4. package/build/cjs/cc/AssociationCC.d.ts +253 -0
  5. package/build/cjs/cc/AssociationCC.js +877 -0
  6. package/build/cjs/cc/AssociationCC.js.map +7 -0
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +887 -0
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
  11. package/build/cjs/cc/BarrierOperatorCC.js +748 -0
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
  13. package/build/cjs/cc/BasicCC.d.ts +191 -0
  14. package/build/cjs/cc/BasicCC.js +478 -0
  15. package/build/cjs/cc/BasicCC.js.map +7 -0
  16. package/build/cjs/cc/BatteryCC.d.ts +406 -0
  17. package/build/cjs/cc/BatteryCC.js +590 -0
  18. package/build/cjs/cc/BatteryCC.js.map +7 -0
  19. package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
  20. package/build/cjs/cc/BinarySensorCC.js +546 -0
  21. package/build/cjs/cc/BinarySensorCC.js.map +7 -0
  22. package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
  23. package/build/cjs/cc/BinarySwitchCC.js +472 -0
  24. package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
  25. package/build/cjs/cc/CRC16CC.d.ts +29 -0
  26. package/build/cjs/cc/CRC16CC.js +208 -0
  27. package/build/cjs/cc/CRC16CC.js.map +7 -0
  28. package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
  29. package/build/cjs/cc/CentralSceneCC.js +584 -0
  30. package/build/cjs/cc/CentralSceneCC.js.map +7 -0
  31. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
  32. package/build/cjs/cc/ClimateControlScheduleCC.js +646 -0
  33. package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
  34. package/build/cjs/cc/ClockCC.d.ts +47 -0
  35. package/build/cjs/cc/ClockCC.js +330 -0
  36. package/build/cjs/cc/ClockCC.js.map +7 -0
  37. package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
  38. package/build/cjs/cc/ColorSwitchCC.js +1265 -0
  39. package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
  40. package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
  41. package/build/cjs/cc/ConfigurationCC.js +2477 -0
  42. package/build/cjs/cc/ConfigurationCC.js.map +7 -0
  43. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
  44. package/build/cjs/cc/DeviceResetLocallyCC.js +168 -0
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
  46. package/build/cjs/cc/DoorLockCC.d.ts +837 -0
  47. package/build/cjs/cc/DoorLockCC.js +1366 -0
  48. package/build/cjs/cc/DoorLockCC.js.map +7 -0
  49. package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
  50. package/build/cjs/cc/DoorLockLoggingCC.js +458 -0
  51. package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
  52. package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
  53. package/build/cjs/cc/EnergyProductionCC.js +329 -0
  54. package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
  55. package/build/cjs/cc/EntryControlCC.d.ts +231 -0
  56. package/build/cjs/cc/EntryControlCC.js +754 -0
  57. package/build/cjs/cc/EntryControlCC.js.map +7 -0
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1322 -0
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
  61. package/build/cjs/cc/HailCC.d.ts +6 -0
  62. package/build/cjs/cc/HailCC.js +91 -0
  63. package/build/cjs/cc/HailCC.js.map +7 -0
  64. package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
  65. package/build/cjs/cc/HumidityControlModeCC.js +449 -0
  66. package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  68. package/build/cjs/cc/HumidityControlOperatingStateCC.js +250 -0
  69. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
  70. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
  71. package/build/cjs/cc/HumidityControlSetpointCC.js +821 -0
  72. package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
  73. package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
  74. package/build/cjs/cc/InclusionControllerCC.js +251 -0
  75. package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
  76. package/build/cjs/cc/IndicatorCC.d.ts +338 -0
  77. package/build/cjs/cc/IndicatorCC.js +1395 -0
  78. package/build/cjs/cc/IndicatorCC.js.map +7 -0
  79. package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
  80. package/build/cjs/cc/IrrigationCC.js +2224 -0
  81. package/build/cjs/cc/IrrigationCC.js.map +7 -0
  82. package/build/cjs/cc/LanguageCC.d.ts +101 -0
  83. package/build/cjs/cc/LanguageCC.js +364 -0
  84. package/build/cjs/cc/LanguageCC.js.map +7 -0
  85. package/build/cjs/cc/LockCC.d.ts +73 -0
  86. package/build/cjs/cc/LockCC.js +322 -0
  87. package/build/cjs/cc/LockCC.js.map +7 -0
  88. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
  89. package/build/cjs/cc/ManufacturerProprietaryCC.js +269 -0
  90. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
  91. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
  92. package/build/cjs/cc/ManufacturerSpecificCC.js +440 -0
  93. package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
  94. package/build/cjs/cc/MeterCC.d.ts +318 -0
  95. package/build/cjs/cc/MeterCC.js +1355 -0
  96. package/build/cjs/cc/MeterCC.js.map +7 -0
  97. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
  98. package/build/cjs/cc/MultiChannelAssociationCC.js +1090 -0
  99. package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
  100. package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
  101. package/build/cjs/cc/MultiChannelCC.js +1268 -0
  102. package/build/cjs/cc/MultiChannelCC.js.map +7 -0
  103. package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
  104. package/build/cjs/cc/MultiCommandCC.js +234 -0
  105. package/build/cjs/cc/MultiCommandCC.js.map +7 -0
  106. package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
  107. package/build/cjs/cc/MultilevelSensorCC.js +856 -0
  108. package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
  109. package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
  110. package/build/cjs/cc/MultilevelSwitchCC.js +928 -0
  111. package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
  112. package/build/cjs/cc/NoOperationCC.d.ts +9 -0
  113. package/build/cjs/cc/NoOperationCC.js +126 -0
  114. package/build/cjs/cc/NoOperationCC.js.map +7 -0
  115. package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
  116. package/build/cjs/cc/NodeNamingCC.js +504 -0
  117. package/build/cjs/cc/NodeNamingCC.js.map +7 -0
  118. package/build/cjs/cc/NotificationCC.d.ts +479 -0
  119. package/build/cjs/cc/NotificationCC.js +1399 -0
  120. package/build/cjs/cc/NotificationCC.js.map +7 -0
  121. package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
  122. package/build/cjs/cc/PowerlevelCC.js +657 -0
  123. package/build/cjs/cc/PowerlevelCC.js.map +7 -0
  124. package/build/cjs/cc/ProtectionCC.d.ts +325 -0
  125. package/build/cjs/cc/ProtectionCC.js +859 -0
  126. package/build/cjs/cc/ProtectionCC.js.map +7 -0
  127. package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
  128. package/build/cjs/cc/SceneActivationCC.js +261 -0
  129. package/build/cjs/cc/SceneActivationCC.js.map +7 -0
  130. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  131. package/build/cjs/cc/SceneActuatorConfigurationCC.js +473 -0
  132. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
  133. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
  134. package/build/cjs/cc/SceneControllerConfigurationCC.js +526 -0
  135. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
  136. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
  137. package/build/cjs/cc/ScheduleEntryLockCC.js +2043 -0
  138. package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
  139. package/build/cjs/cc/Security2CC.d.ts +251 -0
  140. package/build/cjs/cc/Security2CC.js +1853 -0
  141. package/build/cjs/cc/Security2CC.js.map +7 -0
  142. package/build/cjs/cc/SecurityCC.d.ts +128 -0
  143. package/build/cjs/cc/SecurityCC.js +977 -0
  144. package/build/cjs/cc/SecurityCC.js.map +7 -0
  145. package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
  146. package/build/cjs/cc/SoundSwitchCC.js +853 -0
  147. package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
  148. package/build/cjs/cc/SupervisionCC.d.ts +104 -0
  149. package/build/cjs/cc/SupervisionCC.js +398 -0
  150. package/build/cjs/cc/SupervisionCC.js.map +7 -0
  151. package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
  152. package/build/cjs/cc/ThermostatFanModeCC.js +495 -0
  153. package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
  154. package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
  155. package/build/cjs/cc/ThermostatFanStateCC.js +252 -0
  156. package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
  157. package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
  158. package/build/cjs/cc/ThermostatModeCC.js +559 -0
  159. package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
  160. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
  161. package/build/cjs/cc/ThermostatOperatingStateCC.js +248 -0
  162. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
  163. package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
  164. package/build/cjs/cc/ThermostatSetbackCC.js +366 -0
  165. package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
  166. package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
  167. package/build/cjs/cc/ThermostatSetpointCC.js +792 -0
  168. package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
  169. package/build/cjs/cc/TimeCC.d.ts +88 -0
  170. package/build/cjs/cc/TimeCC.js +635 -0
  171. package/build/cjs/cc/TimeCC.js.map +7 -0
  172. package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
  173. package/build/cjs/cc/TimeParametersCC.js +413 -0
  174. package/build/cjs/cc/TimeParametersCC.js.map +7 -0
  175. package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
  176. package/build/cjs/cc/TransportServiceCC.js +522 -0
  177. package/build/cjs/cc/TransportServiceCC.js.map +7 -0
  178. package/build/cjs/cc/UserCodeCC.d.ts +683 -0
  179. package/build/cjs/cc/UserCodeCC.js +1903 -0
  180. package/build/cjs/cc/UserCodeCC.js.map +7 -0
  181. package/build/cjs/cc/VersionCC.d.ts +469 -0
  182. package/build/cjs/cc/VersionCC.js +962 -0
  183. package/build/cjs/cc/VersionCC.js.map +7 -0
  184. package/build/cjs/cc/WakeUpCC.d.ts +150 -0
  185. package/build/cjs/cc/WakeUpCC.js +609 -0
  186. package/build/cjs/cc/WakeUpCC.js.map +7 -0
  187. package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
  188. package/build/cjs/cc/WindowCoveringCC.js +924 -0
  189. package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
  190. package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
  191. package/build/cjs/cc/ZWaveLongRangeCC.js +90 -0
  192. package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
  193. package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
  194. package/build/cjs/cc/ZWavePlusCC.js +362 -0
  195. package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
  196. package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
  197. package/build/cjs/cc/ZWaveProtocolCC.js +1638 -0
  198. package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
  199. package/build/cjs/cc/index.d.ts +132 -0
  200. package/build/cjs/cc/index.js +1180 -0
  201. package/build/cjs/cc/index.js.map +7 -0
  202. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  203. package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
  204. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
  205. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  206. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +533 -0
  207. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
  208. package/build/cjs/index.d.ts +15 -0
  209. package/build/cjs/index.js +77 -0
  210. package/build/cjs/index.js.map +7 -0
  211. package/build/cjs/index_safe.d.ts +3 -0
  212. package/build/cjs/index_safe.js +25 -0
  213. package/build/cjs/index_safe.js.map +7 -0
  214. package/build/cjs/lib/API.d.ts +271 -0
  215. package/build/cjs/lib/API.js +413 -0
  216. package/build/cjs/lib/API.js.map +7 -0
  217. package/build/cjs/lib/CommandClass.d.ts +234 -0
  218. package/build/cjs/lib/CommandClass.js +692 -0
  219. package/build/cjs/lib/CommandClass.js.map +7 -0
  220. package/build/cjs/lib/CommandClassDecorators.d.ts +108 -0
  221. package/build/cjs/lib/CommandClassDecorators.js +181 -0
  222. package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
  223. package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
  224. package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
  225. package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
  226. package/build/cjs/lib/ICommandClassContainer.js +17 -0
  227. package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
  228. package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
  229. package/build/cjs/lib/NotificationEventPayload.js +31 -0
  230. package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
  231. package/build/cjs/lib/Security2/Extension.d.ts +106 -0
  232. package/build/cjs/lib/Security2/Extension.js +424 -0
  233. package/build/cjs/lib/Security2/Extension.js.map +7 -0
  234. package/build/cjs/lib/Security2/shared.js +69 -0
  235. package/build/cjs/lib/Security2/shared.js.map +7 -0
  236. package/build/cjs/lib/SetValueResult.js +65 -0
  237. package/build/cjs/lib/SetValueResult.js.map +7 -0
  238. package/build/cjs/lib/Values.d.ts +223 -0
  239. package/build/cjs/lib/Values.js +191 -0
  240. package/build/cjs/lib/Values.js.map +7 -0
  241. package/build/cjs/lib/_Types.js +1676 -0
  242. package/build/cjs/lib/_Types.js.map +7 -0
  243. package/build/cjs/lib/serializers.d.ts +34 -0
  244. package/build/cjs/lib/serializers.js +110 -0
  245. package/build/cjs/lib/serializers.js.map +7 -0
  246. package/build/cjs/lib/utils.d.ts +17 -0
  247. package/build/cjs/lib/utils.js +678 -0
  248. package/build/cjs/lib/utils.js.map +7 -0
  249. package/build/cjs/package.json +3 -0
  250. package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
  251. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
  252. package/build/esm/cc/AlarmSensorCC.js +490 -0
  253. package/build/esm/cc/AlarmSensorCC.js.map +1 -0
  254. package/build/esm/cc/AssociationCC.d.ts +253 -0
  255. package/build/esm/cc/AssociationCC.d.ts.map +1 -0
  256. package/build/esm/cc/AssociationCC.js +847 -0
  257. package/build/esm/cc/AssociationCC.js.map +1 -0
  258. package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
  259. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
  260. package/build/esm/cc/AssociationGroupInfoCC.js +889 -0
  261. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
  262. package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
  263. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
  264. package/build/esm/cc/BarrierOperatorCC.js +751 -0
  265. package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
  266. package/build/esm/cc/BasicCC.d.ts +191 -0
  267. package/build/esm/cc/BasicCC.d.ts.map +1 -0
  268. package/build/esm/cc/BasicCC.js +468 -0
  269. package/build/esm/cc/BasicCC.js.map +1 -0
  270. package/build/esm/cc/BatteryCC.d.ts +406 -0
  271. package/build/esm/cc/BatteryCC.d.ts.map +1 -0
  272. package/build/esm/cc/BatteryCC.js +578 -0
  273. package/build/esm/cc/BatteryCC.js.map +1 -0
  274. package/build/esm/cc/BinarySensorCC.d.ts +122 -0
  275. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
  276. package/build/esm/cc/BinarySensorCC.js +515 -0
  277. package/build/esm/cc/BinarySensorCC.js.map +1 -0
  278. package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
  279. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
  280. package/build/esm/cc/BinarySwitchCC.js +441 -0
  281. package/build/esm/cc/BinarySwitchCC.js.map +1 -0
  282. package/build/esm/cc/CRC16CC.d.ts +29 -0
  283. package/build/esm/cc/CRC16CC.d.ts.map +1 -0
  284. package/build/esm/cc/CRC16CC.js +187 -0
  285. package/build/esm/cc/CRC16CC.js.map +1 -0
  286. package/build/esm/cc/CentralSceneCC.d.ts +210 -0
  287. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
  288. package/build/esm/cc/CentralSceneCC.js +541 -0
  289. package/build/esm/cc/CentralSceneCC.js.map +1 -0
  290. package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
  291. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
  292. package/build/esm/cc/ClimateControlScheduleCC.js +607 -0
  293. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
  294. package/build/esm/cc/ClockCC.d.ts +47 -0
  295. package/build/esm/cc/ClockCC.d.ts.map +1 -0
  296. package/build/esm/cc/ClockCC.js +294 -0
  297. package/build/esm/cc/ClockCC.js.map +1 -0
  298. package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
  299. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
  300. package/build/esm/cc/ColorSwitchCC.js +1274 -0
  301. package/build/esm/cc/ColorSwitchCC.js.map +1 -0
  302. package/build/esm/cc/ConfigurationCC.d.ts +396 -0
  303. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
  304. package/build/esm/cc/ConfigurationCC.js +2666 -0
  305. package/build/esm/cc/ConfigurationCC.js.map +1 -0
  306. package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
  307. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
  308. package/build/esm/cc/DeviceResetLocallyCC.js +138 -0
  309. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
  310. package/build/esm/cc/DoorLockCC.d.ts +837 -0
  311. package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
  312. package/build/esm/cc/DoorLockCC.js +1372 -0
  313. package/build/esm/cc/DoorLockCC.js.map +1 -0
  314. package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
  315. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
  316. package/build/esm/cc/DoorLockLoggingCC.js +414 -0
  317. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
  318. package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
  319. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
  320. package/build/esm/cc/EnergyProductionCC.js +289 -0
  321. package/build/esm/cc/EnergyProductionCC.js.map +1 -0
  322. package/build/esm/cc/EntryControlCC.d.ts +231 -0
  323. package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
  324. package/build/esm/cc/EntryControlCC.js +717 -0
  325. package/build/esm/cc/EntryControlCC.js.map +1 -0
  326. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  327. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
  328. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1311 -0
  329. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
  330. package/build/esm/cc/HailCC.d.ts +6 -0
  331. package/build/esm/cc/HailCC.d.ts.map +1 -0
  332. package/build/esm/cc/HailCC.js +60 -0
  333. package/build/esm/cc/HailCC.js.map +1 -0
  334. package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
  335. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
  336. package/build/esm/cc/HumidityControlModeCC.js +412 -0
  337. package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
  338. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  339. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
  340. package/build/esm/cc/HumidityControlOperatingStateCC.js +210 -0
  341. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
  342. package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
  343. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
  344. package/build/esm/cc/HumidityControlSetpointCC.js +805 -0
  345. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
  346. package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
  347. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
  348. package/build/esm/cc/InclusionControllerCC.js +211 -0
  349. package/build/esm/cc/InclusionControllerCC.js.map +1 -0
  350. package/build/esm/cc/IndicatorCC.d.ts +338 -0
  351. package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
  352. package/build/esm/cc/IndicatorCC.js +1455 -0
  353. package/build/esm/cc/IndicatorCC.js.map +1 -0
  354. package/build/esm/cc/IrrigationCC.d.ts +1496 -0
  355. package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
  356. package/build/esm/cc/IrrigationCC.js +2239 -0
  357. package/build/esm/cc/IrrigationCC.js.map +1 -0
  358. package/build/esm/cc/LanguageCC.d.ts +101 -0
  359. package/build/esm/cc/LanguageCC.d.ts.map +1 -0
  360. package/build/esm/cc/LanguageCC.js +325 -0
  361. package/build/esm/cc/LanguageCC.js.map +1 -0
  362. package/build/esm/cc/LockCC.d.ts +73 -0
  363. package/build/esm/cc/LockCC.d.ts.map +1 -0
  364. package/build/esm/cc/LockCC.js +282 -0
  365. package/build/esm/cc/LockCC.js.map +1 -0
  366. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
  367. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
  368. package/build/esm/cc/ManufacturerProprietaryCC.js +252 -0
  369. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
  370. package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
  371. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
  372. package/build/esm/cc/ManufacturerSpecificCC.js +404 -0
  373. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
  374. package/build/esm/cc/MeterCC.d.ts +318 -0
  375. package/build/esm/cc/MeterCC.d.ts.map +1 -0
  376. package/build/esm/cc/MeterCC.js +1409 -0
  377. package/build/esm/cc/MeterCC.js.map +1 -0
  378. package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
  379. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
  380. package/build/esm/cc/MultiChannelAssociationCC.js +1094 -0
  381. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
  382. package/build/esm/cc/MultiChannelCC.d.ts +394 -0
  383. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
  384. package/build/esm/cc/MultiChannelCC.js +1312 -0
  385. package/build/esm/cc/MultiChannelCC.js.map +1 -0
  386. package/build/esm/cc/MultiCommandCC.d.ts +27 -0
  387. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
  388. package/build/esm/cc/MultiCommandCC.js +206 -0
  389. package/build/esm/cc/MultiCommandCC.js.map +1 -0
  390. package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
  391. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
  392. package/build/esm/cc/MultilevelSensorCC.js +872 -0
  393. package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
  394. package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
  395. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
  396. package/build/esm/cc/MultilevelSwitchCC.js +935 -0
  397. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
  398. package/build/esm/cc/NoOperationCC.d.ts +9 -0
  399. package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
  400. package/build/esm/cc/NoOperationCC.js +92 -0
  401. package/build/esm/cc/NoOperationCC.js.map +1 -0
  402. package/build/esm/cc/NodeNamingCC.d.ts +118 -0
  403. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
  404. package/build/esm/cc/NodeNamingCC.js +464 -0
  405. package/build/esm/cc/NodeNamingCC.js.map +1 -0
  406. package/build/esm/cc/NotificationCC.d.ts +479 -0
  407. package/build/esm/cc/NotificationCC.d.ts.map +1 -0
  408. package/build/esm/cc/NotificationCC.js +1481 -0
  409. package/build/esm/cc/NotificationCC.js.map +1 -0
  410. package/build/esm/cc/PowerlevelCC.d.ts +82 -0
  411. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
  412. package/build/esm/cc/PowerlevelCC.js +611 -0
  413. package/build/esm/cc/PowerlevelCC.js.map +1 -0
  414. package/build/esm/cc/ProtectionCC.d.ts +325 -0
  415. package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
  416. package/build/esm/cc/ProtectionCC.js +830 -0
  417. package/build/esm/cc/ProtectionCC.js.map +1 -0
  418. package/build/esm/cc/SceneActivationCC.d.ts +89 -0
  419. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
  420. package/build/esm/cc/SceneActivationCC.js +223 -0
  421. package/build/esm/cc/SceneActivationCC.js.map +1 -0
  422. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  423. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
  424. package/build/esm/cc/SceneActuatorConfigurationCC.js +462 -0
  425. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
  426. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
  427. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
  428. package/build/esm/cc/SceneControllerConfigurationCC.js +534 -0
  429. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
  430. package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
  431. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
  432. package/build/esm/cc/ScheduleEntryLockCC.js +2065 -0
  433. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
  434. package/build/esm/cc/Security2CC.d.ts +251 -0
  435. package/build/esm/cc/Security2CC.d.ts.map +1 -0
  436. package/build/esm/cc/Security2CC.js +2041 -0
  437. package/build/esm/cc/Security2CC.js.map +1 -0
  438. package/build/esm/cc/SecurityCC.d.ts +128 -0
  439. package/build/esm/cc/SecurityCC.d.ts.map +1 -0
  440. package/build/esm/cc/SecurityCC.js +989 -0
  441. package/build/esm/cc/SecurityCC.js.map +1 -0
  442. package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
  443. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
  444. package/build/esm/cc/SoundSwitchCC.js +796 -0
  445. package/build/esm/cc/SoundSwitchCC.js.map +1 -0
  446. package/build/esm/cc/SupervisionCC.d.ts +104 -0
  447. package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
  448. package/build/esm/cc/SupervisionCC.js +396 -0
  449. package/build/esm/cc/SupervisionCC.js.map +1 -0
  450. package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
  451. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
  452. package/build/esm/cc/ThermostatFanModeCC.js +463 -0
  453. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
  454. package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
  455. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
  456. package/build/esm/cc/ThermostatFanStateCC.js +212 -0
  457. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
  458. package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
  459. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
  460. package/build/esm/cc/ThermostatModeCC.js +530 -0
  461. package/build/esm/cc/ThermostatModeCC.js.map +1 -0
  462. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
  463. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
  464. package/build/esm/cc/ThermostatOperatingStateCC.js +208 -0
  465. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
  466. package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
  467. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
  468. package/build/esm/cc/ThermostatSetbackCC.js +333 -0
  469. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
  470. package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
  471. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
  472. package/build/esm/cc/ThermostatSetpointCC.js +786 -0
  473. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
  474. package/build/esm/cc/TimeCC.d.ts +88 -0
  475. package/build/esm/cc/TimeCC.d.ts.map +1 -0
  476. package/build/esm/cc/TimeCC.js +590 -0
  477. package/build/esm/cc/TimeCC.js.map +1 -0
  478. package/build/esm/cc/TimeParametersCC.d.ts +72 -0
  479. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
  480. package/build/esm/cc/TimeParametersCC.js +385 -0
  481. package/build/esm/cc/TimeParametersCC.js.map +1 -0
  482. package/build/esm/cc/TransportServiceCC.d.ts +107 -0
  483. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
  484. package/build/esm/cc/TransportServiceCC.js +523 -0
  485. package/build/esm/cc/TransportServiceCC.js.map +1 -0
  486. package/build/esm/cc/UserCodeCC.d.ts +683 -0
  487. package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
  488. package/build/esm/cc/UserCodeCC.js +1933 -0
  489. package/build/esm/cc/UserCodeCC.js.map +1 -0
  490. package/build/esm/cc/VersionCC.d.ts +469 -0
  491. package/build/esm/cc/VersionCC.d.ts.map +1 -0
  492. package/build/esm/cc/VersionCC.js +971 -0
  493. package/build/esm/cc/VersionCC.js.map +1 -0
  494. package/build/esm/cc/WakeUpCC.d.ts +150 -0
  495. package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
  496. package/build/esm/cc/WakeUpCC.js +568 -0
  497. package/build/esm/cc/WakeUpCC.js.map +1 -0
  498. package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
  499. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
  500. package/build/esm/cc/WindowCoveringCC.js +905 -0
  501. package/build/esm/cc/WindowCoveringCC.js.map +1 -0
  502. package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
  503. package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
  504. package/build/esm/cc/ZWaveLongRangeCC.js +57 -0
  505. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
  506. package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
  507. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
  508. package/build/esm/cc/ZWavePlusCC.js +328 -0
  509. package/build/esm/cc/ZWavePlusCC.js.map +1 -0
  510. package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
  511. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
  512. package/build/esm/cc/ZWaveProtocolCC.js +1520 -0
  513. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
  514. package/build/esm/cc/index.d.ts +132 -0
  515. package/build/esm/cc/index.d.ts.map +1 -0
  516. package/build/esm/cc/index.js +71 -0
  517. package/build/esm/cc/index.js.map +1 -0
  518. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  519. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
  520. package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
  521. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
  522. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  523. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
  524. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +489 -0
  525. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
  526. package/build/esm/index.d.ts +15 -0
  527. package/build/esm/index.d.ts.map +1 -0
  528. package/build/esm/index.js +14 -0
  529. package/build/esm/index.js.map +1 -0
  530. package/build/esm/index_safe.d.ts +3 -0
  531. package/build/esm/index_safe.d.ts.map +1 -0
  532. package/build/esm/index_safe.js +4 -0
  533. package/build/esm/index_safe.js.map +1 -0
  534. package/build/esm/lib/API.d.ts +271 -0
  535. package/build/esm/lib/API.d.ts.map +1 -0
  536. package/build/esm/lib/API.js +448 -0
  537. package/build/esm/lib/API.js.map +1 -0
  538. package/build/esm/lib/CommandClass.d.ts +234 -0
  539. package/build/esm/lib/CommandClass.d.ts.map +1 -0
  540. package/build/esm/lib/CommandClass.js +781 -0
  541. package/build/esm/lib/CommandClass.js.map +1 -0
  542. package/build/esm/lib/CommandClassDecorators.d.ts +108 -0
  543. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
  544. package/build/esm/lib/CommandClassDecorators.js +229 -0
  545. package/build/esm/lib/CommandClassDecorators.js.map +1 -0
  546. package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
  547. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
  548. package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
  549. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
  550. package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
  551. package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
  552. package/build/esm/lib/ICommandClassContainer.js +2 -0
  553. package/build/esm/lib/ICommandClassContainer.js.map +1 -0
  554. package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
  555. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
  556. package/build/esm/lib/NotificationEventPayload.js +7 -0
  557. package/build/esm/lib/NotificationEventPayload.js.map +1 -0
  558. package/build/esm/lib/Security2/Extension.d.ts +106 -0
  559. package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
  560. package/build/esm/lib/Security2/Extension.js +380 -0
  561. package/build/esm/lib/Security2/Extension.js.map +1 -0
  562. package/build/esm/lib/Security2/shared.d.ts +37 -0
  563. package/build/esm/lib/Security2/shared.d.ts.map +1 -0
  564. package/build/esm/lib/Security2/shared.js +40 -0
  565. package/build/esm/lib/Security2/shared.js.map +1 -0
  566. package/build/esm/lib/SetValueResult.d.ts +55 -0
  567. package/build/esm/lib/SetValueResult.d.ts.map +1 -0
  568. package/build/esm/lib/SetValueResult.js +53 -0
  569. package/build/esm/lib/SetValueResult.js.map +1 -0
  570. package/build/esm/lib/Values.d.ts +223 -0
  571. package/build/esm/lib/Values.d.ts.map +1 -0
  572. package/build/esm/lib/Values.js +169 -0
  573. package/build/esm/lib/Values.js.map +1 -0
  574. package/build/esm/lib/_Types.d.ts +1461 -0
  575. package/build/esm/lib/_Types.d.ts.map +1 -0
  576. package/build/esm/lib/_Types.js +1432 -0
  577. package/build/esm/lib/_Types.js.map +1 -0
  578. package/build/esm/lib/serializers.d.ts +34 -0
  579. package/build/esm/lib/serializers.d.ts.map +1 -0
  580. package/build/esm/lib/serializers.js +98 -0
  581. package/build/esm/lib/serializers.js.map +1 -0
  582. package/build/esm/lib/utils.d.ts +17 -0
  583. package/build/esm/lib/utils.d.ts.map +1 -0
  584. package/build/esm/lib/utils.js +847 -0
  585. package/build/esm/lib/utils.js.map +1 -0
  586. package/build/esm/package.json +3 -0
  587. package/package.json +28 -23
  588. package/build/cc/AlarmSensorCC.d.ts +0 -194
  589. package/build/cc/AlarmSensorCC.d.ts.map +0 -1
  590. package/build/cc/AlarmSensorCC.js +0 -395
  591. package/build/cc/AlarmSensorCC.js.map +0 -1
  592. package/build/cc/AssociationCC.d.ts +0 -253
  593. package/build/cc/AssociationCC.d.ts.map +0 -1
  594. package/build/cc/AssociationCC.js +0 -732
  595. package/build/cc/AssociationCC.js.map +0 -1
  596. package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
  597. package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
  598. package/build/cc/AssociationGroupInfoCC.js +0 -772
  599. package/build/cc/AssociationGroupInfoCC.js.map +0 -1
  600. package/build/cc/BarrierOperatorCC.d.ts +0 -243
  601. package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
  602. package/build/cc/BarrierOperatorCC.js +0 -613
  603. package/build/cc/BarrierOperatorCC.js.map +0 -1
  604. package/build/cc/BasicCC.d.ts +0 -191
  605. package/build/cc/BasicCC.d.ts.map +0 -1
  606. package/build/cc/BasicCC.js +0 -393
  607. package/build/cc/BasicCC.js.map +0 -1
  608. package/build/cc/BatteryCC.d.ts +0 -406
  609. package/build/cc/BatteryCC.d.ts.map +0 -1
  610. package/build/cc/BatteryCC.js +0 -516
  611. package/build/cc/BatteryCC.js.map +0 -1
  612. package/build/cc/BinarySensorCC.d.ts +0 -122
  613. package/build/cc/BinarySensorCC.d.ts.map +0 -1
  614. package/build/cc/BinarySensorCC.js +0 -420
  615. package/build/cc/BinarySensorCC.js.map +0 -1
  616. package/build/cc/BinarySwitchCC.d.ts +0 -139
  617. package/build/cc/BinarySwitchCC.d.ts.map +0 -1
  618. package/build/cc/BinarySwitchCC.js +0 -365
  619. package/build/cc/BinarySwitchCC.js.map +0 -1
  620. package/build/cc/CRC16CC.d.ts +0 -29
  621. package/build/cc/CRC16CC.d.ts.map +0 -1
  622. package/build/cc/CRC16CC.js +0 -126
  623. package/build/cc/CRC16CC.js.map +0 -1
  624. package/build/cc/CentralSceneCC.d.ts +0 -210
  625. package/build/cc/CentralSceneCC.d.ts.map +0 -1
  626. package/build/cc/CentralSceneCC.js +0 -453
  627. package/build/cc/CentralSceneCC.js.map +0 -1
  628. package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
  629. package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
  630. package/build/cc/ClimateControlScheduleCC.js +0 -469
  631. package/build/cc/ClimateControlScheduleCC.js.map +0 -1
  632. package/build/cc/ClockCC.d.ts +0 -47
  633. package/build/cc/ClockCC.d.ts.map +0 -1
  634. package/build/cc/ClockCC.js +0 -208
  635. package/build/cc/ClockCC.js.map +0 -1
  636. package/build/cc/ColorSwitchCC.d.ts +0 -339
  637. package/build/cc/ColorSwitchCC.d.ts.map +0 -1
  638. package/build/cc/ColorSwitchCC.js +0 -1152
  639. package/build/cc/ColorSwitchCC.js.map +0 -1
  640. package/build/cc/ConfigurationCC.d.ts +0 -396
  641. package/build/cc/ConfigurationCC.d.ts.map +0 -1
  642. package/build/cc/ConfigurationCC.js +0 -2458
  643. package/build/cc/ConfigurationCC.js.map +0 -1
  644. package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
  645. package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
  646. package/build/cc/DeviceResetLocallyCC.js +0 -76
  647. package/build/cc/DeviceResetLocallyCC.js.map +0 -1
  648. package/build/cc/DoorLockCC.d.ts +0 -837
  649. package/build/cc/DoorLockCC.d.ts.map +0 -1
  650. package/build/cc/DoorLockCC.js +0 -1273
  651. package/build/cc/DoorLockCC.js.map +0 -1
  652. package/build/cc/DoorLockLoggingCC.d.ts +0 -77
  653. package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
  654. package/build/cc/DoorLockLoggingCC.js +0 -319
  655. package/build/cc/DoorLockLoggingCC.js.map +0 -1
  656. package/build/cc/EnergyProductionCC.d.ts +0 -77
  657. package/build/cc/EnergyProductionCC.d.ts.map +0 -1
  658. package/build/cc/EnergyProductionCC.js +0 -216
  659. package/build/cc/EnergyProductionCC.js.map +0 -1
  660. package/build/cc/EntryControlCC.d.ts +0 -231
  661. package/build/cc/EntryControlCC.d.ts.map +0 -1
  662. package/build/cc/EntryControlCC.js +0 -607
  663. package/build/cc/EntryControlCC.js.map +0 -1
  664. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
  665. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
  666. package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
  667. package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
  668. package/build/cc/HailCC.d.ts +0 -6
  669. package/build/cc/HailCC.d.ts.map +0 -1
  670. package/build/cc/HailCC.js +0 -24
  671. package/build/cc/HailCC.js.map +0 -1
  672. package/build/cc/HumidityControlModeCC.d.ts +0 -111
  673. package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
  674. package/build/cc/HumidityControlModeCC.js +0 -308
  675. package/build/cc/HumidityControlModeCC.js.map +0 -1
  676. package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
  677. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
  678. package/build/cc/HumidityControlOperatingStateCC.js +0 -140
  679. package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
  680. package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
  681. package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
  682. package/build/cc/HumidityControlSetpointCC.js +0 -648
  683. package/build/cc/HumidityControlSetpointCC.js.map +0 -1
  684. package/build/cc/InclusionControllerCC.d.ts +0 -42
  685. package/build/cc/InclusionControllerCC.d.ts.map +0 -1
  686. package/build/cc/InclusionControllerCC.js +0 -136
  687. package/build/cc/InclusionControllerCC.js.map +0 -1
  688. package/build/cc/IndicatorCC.d.ts +0 -338
  689. package/build/cc/IndicatorCC.d.ts.map +0 -1
  690. package/build/cc/IndicatorCC.js +0 -1320
  691. package/build/cc/IndicatorCC.js.map +0 -1
  692. package/build/cc/IrrigationCC.d.ts +0 -1496
  693. package/build/cc/IrrigationCC.d.ts.map +0 -1
  694. package/build/cc/IrrigationCC.js +0 -2041
  695. package/build/cc/IrrigationCC.js.map +0 -1
  696. package/build/cc/LanguageCC.d.ts +0 -101
  697. package/build/cc/LanguageCC.d.ts.map +0 -1
  698. package/build/cc/LanguageCC.js +0 -246
  699. package/build/cc/LanguageCC.js.map +0 -1
  700. package/build/cc/LockCC.d.ts +0 -73
  701. package/build/cc/LockCC.d.ts.map +0 -1
  702. package/build/cc/LockCC.js +0 -200
  703. package/build/cc/LockCC.js.map +0 -1
  704. package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
  705. package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
  706. package/build/cc/ManufacturerProprietaryCC.js +0 -204
  707. package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
  708. package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
  709. package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
  710. package/build/cc/ManufacturerSpecificCC.js +0 -318
  711. package/build/cc/ManufacturerSpecificCC.js.map +0 -1
  712. package/build/cc/MeterCC.d.ts +0 -318
  713. package/build/cc/MeterCC.d.ts.map +0 -1
  714. package/build/cc/MeterCC.js +0 -1312
  715. package/build/cc/MeterCC.js.map +0 -1
  716. package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
  717. package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
  718. package/build/cc/MultiChannelAssociationCC.js +0 -1007
  719. package/build/cc/MultiChannelAssociationCC.js.map +0 -1
  720. package/build/cc/MultiChannelCC.d.ts +0 -394
  721. package/build/cc/MultiChannelCC.d.ts.map +0 -1
  722. package/build/cc/MultiChannelCC.js +0 -1130
  723. package/build/cc/MultiChannelCC.js.map +0 -1
  724. package/build/cc/MultiCommandCC.d.ts +0 -27
  725. package/build/cc/MultiCommandCC.d.ts.map +0 -1
  726. package/build/cc/MultiCommandCC.js +0 -145
  727. package/build/cc/MultiCommandCC.js.map +0 -1
  728. package/build/cc/MultilevelSensorCC.d.ts +0 -185
  729. package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
  730. package/build/cc/MultilevelSensorCC.js +0 -756
  731. package/build/cc/MultilevelSensorCC.js.map +0 -1
  732. package/build/cc/MultilevelSwitchCC.d.ts +0 -357
  733. package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
  734. package/build/cc/MultilevelSwitchCC.js +0 -813
  735. package/build/cc/MultilevelSwitchCC.js.map +0 -1
  736. package/build/cc/NoOperationCC.d.ts +0 -9
  737. package/build/cc/NoOperationCC.d.ts.map +0 -1
  738. package/build/cc/NoOperationCC.js +0 -42
  739. package/build/cc/NoOperationCC.js.map +0 -1
  740. package/build/cc/NodeNamingCC.d.ts +0 -118
  741. package/build/cc/NodeNamingCC.d.ts.map +0 -1
  742. package/build/cc/NodeNamingCC.js +0 -348
  743. package/build/cc/NodeNamingCC.js.map +0 -1
  744. package/build/cc/NotificationCC.d.ts +0 -479
  745. package/build/cc/NotificationCC.d.ts.map +0 -1
  746. package/build/cc/NotificationCC.js +0 -1379
  747. package/build/cc/NotificationCC.js.map +0 -1
  748. package/build/cc/PowerlevelCC.d.ts +0 -82
  749. package/build/cc/PowerlevelCC.d.ts.map +0 -1
  750. package/build/cc/PowerlevelCC.js +0 -488
  751. package/build/cc/PowerlevelCC.js.map +0 -1
  752. package/build/cc/ProtectionCC.d.ts +0 -325
  753. package/build/cc/ProtectionCC.d.ts.map +0 -1
  754. package/build/cc/ProtectionCC.js +0 -672
  755. package/build/cc/ProtectionCC.js.map +0 -1
  756. package/build/cc/SceneActivationCC.d.ts +0 -89
  757. package/build/cc/SceneActivationCC.d.ts.map +0 -1
  758. package/build/cc/SceneActivationCC.js +0 -169
  759. package/build/cc/SceneActivationCC.js.map +0 -1
  760. package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
  761. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
  762. package/build/cc/SceneActuatorConfigurationCC.js +0 -377
  763. package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
  764. package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
  765. package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
  766. package/build/cc/SceneControllerConfigurationCC.js +0 -449
  767. package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
  768. package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
  769. package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
  770. package/build/cc/ScheduleEntryLockCC.js +0 -1829
  771. package/build/cc/ScheduleEntryLockCC.js.map +0 -1
  772. package/build/cc/Security2CC.d.ts +0 -251
  773. package/build/cc/Security2CC.d.ts.map +0 -1
  774. package/build/cc/Security2CC.js +0 -1817
  775. package/build/cc/Security2CC.js.map +0 -1
  776. package/build/cc/SecurityCC.d.ts +0 -128
  777. package/build/cc/SecurityCC.d.ts.map +0 -1
  778. package/build/cc/SecurityCC.js +0 -803
  779. package/build/cc/SecurityCC.js.map +0 -1
  780. package/build/cc/SoundSwitchCC.d.ts +0 -232
  781. package/build/cc/SoundSwitchCC.d.ts.map +0 -1
  782. package/build/cc/SoundSwitchCC.js +0 -636
  783. package/build/cc/SoundSwitchCC.js.map +0 -1
  784. package/build/cc/SupervisionCC.d.ts +0 -104
  785. package/build/cc/SupervisionCC.d.ts.map +0 -1
  786. package/build/cc/SupervisionCC.js +0 -322
  787. package/build/cc/SupervisionCC.js.map +0 -1
  788. package/build/cc/ThermostatFanModeCC.d.ts +0 -141
  789. package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
  790. package/build/cc/ThermostatFanModeCC.js +0 -362
  791. package/build/cc/ThermostatFanModeCC.js.map +0 -1
  792. package/build/cc/ThermostatFanStateCC.d.ts +0 -60
  793. package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
  794. package/build/cc/ThermostatFanStateCC.js +0 -142
  795. package/build/cc/ThermostatFanStateCC.js.map +0 -1
  796. package/build/cc/ThermostatModeCC.d.ts +0 -150
  797. package/build/cc/ThermostatModeCC.d.ts.map +0 -1
  798. package/build/cc/ThermostatModeCC.js +0 -429
  799. package/build/cc/ThermostatModeCC.js.map +0 -1
  800. package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
  801. package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
  802. package/build/cc/ThermostatOperatingStateCC.js +0 -138
  803. package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
  804. package/build/cc/ThermostatSetbackCC.d.ts +0 -46
  805. package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
  806. package/build/cc/ThermostatSetbackCC.js +0 -247
  807. package/build/cc/ThermostatSetbackCC.js.map +0 -1
  808. package/build/cc/ThermostatSetpointCC.d.ts +0 -197
  809. package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
  810. package/build/cc/ThermostatSetpointCC.js +0 -658
  811. package/build/cc/ThermostatSetpointCC.js.map +0 -1
  812. package/build/cc/TimeCC.d.ts +0 -88
  813. package/build/cc/TimeCC.d.ts.map +0 -1
  814. package/build/cc/TimeCC.js +0 -454
  815. package/build/cc/TimeCC.js.map +0 -1
  816. package/build/cc/TimeParametersCC.d.ts +0 -72
  817. package/build/cc/TimeParametersCC.d.ts.map +0 -1
  818. package/build/cc/TimeParametersCC.js +0 -303
  819. package/build/cc/TimeParametersCC.js.map +0 -1
  820. package/build/cc/TransportServiceCC.d.ts +0 -107
  821. package/build/cc/TransportServiceCC.d.ts.map +0 -1
  822. package/build/cc/TransportServiceCC.js +0 -426
  823. package/build/cc/TransportServiceCC.js.map +0 -1
  824. package/build/cc/UserCodeCC.d.ts +0 -683
  825. package/build/cc/UserCodeCC.d.ts.map +0 -1
  826. package/build/cc/UserCodeCC.js +0 -1699
  827. package/build/cc/UserCodeCC.js.map +0 -1
  828. package/build/cc/VersionCC.d.ts +0 -469
  829. package/build/cc/VersionCC.d.ts.map +0 -1
  830. package/build/cc/VersionCC.js +0 -865
  831. package/build/cc/VersionCC.js.map +0 -1
  832. package/build/cc/WakeUpCC.d.ts +0 -150
  833. package/build/cc/WakeUpCC.d.ts.map +0 -1
  834. package/build/cc/WakeUpCC.js +0 -441
  835. package/build/cc/WakeUpCC.js.map +0 -1
  836. package/build/cc/WindowCoveringCC.d.ts +0 -315
  837. package/build/cc/WindowCoveringCC.d.ts.map +0 -1
  838. package/build/cc/WindowCoveringCC.js +0 -783
  839. package/build/cc/WindowCoveringCC.js.map +0 -1
  840. package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
  841. package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
  842. package/build/cc/ZWaveLongRangeCC.js +0 -20
  843. package/build/cc/ZWaveLongRangeCC.js.map +0 -1
  844. package/build/cc/ZWavePlusCC.d.ts +0 -163
  845. package/build/cc/ZWavePlusCC.d.ts.map +0 -1
  846. package/build/cc/ZWavePlusCC.js +0 -270
  847. package/build/cc/ZWavePlusCC.js.map +0 -1
  848. package/build/cc/ZWaveProtocolCC.d.ts +0 -344
  849. package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
  850. package/build/cc/ZWaveProtocolCC.js +0 -1033
  851. package/build/cc/ZWaveProtocolCC.js.map +0 -1
  852. package/build/cc/index.d.ts +0 -132
  853. package/build/cc/index.d.ts.map +0 -1
  854. package/build/cc/index.js +0 -627
  855. package/build/cc/index.js.map +0 -1
  856. package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
  857. package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
  858. package/build/cc/manufacturerProprietary/Decorators.js +0 -83
  859. package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
  860. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
  861. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
  862. package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
  863. package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
  864. package/build/index.d.ts +0 -15
  865. package/build/index.d.ts.map +0 -1
  866. package/build/index.js +0 -52
  867. package/build/index.js.map +0 -1
  868. package/build/index_safe.d.ts +0 -3
  869. package/build/index_safe.d.ts.map +0 -1
  870. package/build/index_safe.js +0 -20
  871. package/build/index_safe.js.map +0 -1
  872. package/build/lib/API.d.ts +0 -271
  873. package/build/lib/API.d.ts.map +0 -1
  874. package/build/lib/API.js +0 -458
  875. package/build/lib/API.js.map +0 -1
  876. package/build/lib/CommandClass.d.ts +0 -234
  877. package/build/lib/CommandClass.d.ts.map +0 -1
  878. package/build/lib/CommandClass.js +0 -788
  879. package/build/lib/CommandClass.js.map +0 -1
  880. package/build/lib/CommandClassDecorators.d.ts +0 -112
  881. package/build/lib/CommandClassDecorators.d.ts.map +0 -1
  882. package/build/lib/CommandClassDecorators.js +0 -243
  883. package/build/lib/CommandClassDecorators.js.map +0 -1
  884. package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
  885. package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
  886. package/build/lib/EncapsulatingCommandClass.js +0 -61
  887. package/build/lib/EncapsulatingCommandClass.js.map +0 -1
  888. package/build/lib/ICommandClassContainer.d.ts.map +0 -1
  889. package/build/lib/ICommandClassContainer.js +0 -3
  890. package/build/lib/ICommandClassContainer.js.map +0 -1
  891. package/build/lib/NotificationEventPayload.d.ts +0 -10
  892. package/build/lib/NotificationEventPayload.d.ts.map +0 -1
  893. package/build/lib/NotificationEventPayload.js +0 -10
  894. package/build/lib/NotificationEventPayload.js.map +0 -1
  895. package/build/lib/Security2/Extension.d.ts +0 -106
  896. package/build/lib/Security2/Extension.d.ts.map +0 -1
  897. package/build/lib/Security2/Extension.js +0 -303
  898. package/build/lib/Security2/Extension.js.map +0 -1
  899. package/build/lib/Security2/shared.d.ts.map +0 -1
  900. package/build/lib/Security2/shared.js +0 -43
  901. package/build/lib/Security2/shared.js.map +0 -1
  902. package/build/lib/SetValueResult.d.ts.map +0 -1
  903. package/build/lib/SetValueResult.js +0 -60
  904. package/build/lib/SetValueResult.js.map +0 -1
  905. package/build/lib/Values.d.ts +0 -223
  906. package/build/lib/Values.d.ts.map +0 -1
  907. package/build/lib/Values.js +0 -172
  908. package/build/lib/Values.js.map +0 -1
  909. package/build/lib/_Types.d.ts.map +0 -1
  910. package/build/lib/_Types.js +0 -1443
  911. package/build/lib/_Types.js.map +0 -1
  912. package/build/lib/serializers.d.ts +0 -34
  913. package/build/lib/serializers.d.ts.map +0 -1
  914. package/build/lib/serializers.js +0 -107
  915. package/build/lib/serializers.js.map +0 -1
  916. package/build/lib/utils.d.ts +0 -17
  917. package/build/lib/utils.d.ts.map +0 -1
  918. package/build/lib/utils.js +0 -860
  919. package/build/lib/utils.js.map +0 -1
  920. /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
  921. /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
  922. /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
  923. /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
@@ -0,0 +1,2477 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ConfigurationCC_exports = {};
20
+ __export(ConfigurationCC_exports, {
21
+ ConfigurationCC: () => ConfigurationCC,
22
+ ConfigurationCCAPI: () => ConfigurationCCAPI,
23
+ ConfigurationCCBulkGet: () => ConfigurationCCBulkGet,
24
+ ConfigurationCCBulkReport: () => ConfigurationCCBulkReport,
25
+ ConfigurationCCBulkSet: () => ConfigurationCCBulkSet,
26
+ ConfigurationCCDefaultReset: () => ConfigurationCCDefaultReset,
27
+ ConfigurationCCError: () => ConfigurationCCError,
28
+ ConfigurationCCGet: () => ConfigurationCCGet,
29
+ ConfigurationCCInfoGet: () => ConfigurationCCInfoGet,
30
+ ConfigurationCCInfoReport: () => ConfigurationCCInfoReport,
31
+ ConfigurationCCNameGet: () => ConfigurationCCNameGet,
32
+ ConfigurationCCNameReport: () => ConfigurationCCNameReport,
33
+ ConfigurationCCPropertiesGet: () => ConfigurationCCPropertiesGet,
34
+ ConfigurationCCPropertiesReport: () => ConfigurationCCPropertiesReport,
35
+ ConfigurationCCReport: () => ConfigurationCCReport,
36
+ ConfigurationCCSet: () => ConfigurationCCSet,
37
+ ConfigurationCCValues: () => ConfigurationCCValues
38
+ });
39
+ module.exports = __toCommonJS(ConfigurationCC_exports);
40
+ var import_safe = require("@zwave-js/core/safe");
41
+ var import_safe2 = require("@zwave-js/shared/safe");
42
+ var import_safe3 = require("@zwave-js/shared/safe");
43
+ var import_arrays = require("alcalzone-shared/arrays/index.js");
44
+ var import_objects = require("alcalzone-shared/objects/index.js");
45
+ var import_strings = require("alcalzone-shared/strings/index.js");
46
+ var import_API = require("../lib/API.js");
47
+ var import_CommandClass = require("../lib/CommandClass.js");
48
+ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
49
+ var import_Values = require("../lib/Values.js");
50
+ var import_Types = require("../lib/_Types.js");
51
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
52
+ function accept(f) {
53
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
54
+ return f;
55
+ }
56
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
57
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
58
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
59
+ var _, done = false;
60
+ for (var i = decorators.length - 1; i >= 0; i--) {
61
+ var context = {};
62
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
63
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
64
+ context.addInitializer = function(f) {
65
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
66
+ extraInitializers.push(accept(f || null));
67
+ };
68
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
69
+ if (kind === "accessor") {
70
+ if (result === void 0) continue;
71
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
72
+ if (_ = accept(result.get)) descriptor.get = _;
73
+ if (_ = accept(result.set)) descriptor.set = _;
74
+ if (_ = accept(result.init)) initializers.unshift(_);
75
+ } else if (_ = accept(result)) {
76
+ if (kind === "field") initializers.unshift(_);
77
+ else descriptor[key] = _;
78
+ }
79
+ }
80
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
81
+ done = true;
82
+ };
83
+ var __runInitializers = function(thisArg, initializers, value) {
84
+ var useValue = arguments.length > 2;
85
+ for (var i = 0; i < initializers.length; i++) {
86
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
87
+ }
88
+ return useValue ? value : void 0;
89
+ };
90
+ function __assertType(argName, typeName, boundHasError) {
91
+ const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
92
+ if (boundHasError()) {
93
+ throw new ZWaveError2(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes2.Argument_Invalid);
94
+ }
95
+ }
96
+ const __assertType__number = ($o) => {
97
+ function _number($o2) {
98
+ return typeof $o2 !== "number" ? {} : null;
99
+ }
100
+ return _number($o);
101
+ };
102
+ const __assertType__optional__0 = ($o) => {
103
+ function _number($o2) {
104
+ return typeof $o2 !== "number" ? {} : null;
105
+ }
106
+ function _boolean($o2) {
107
+ return typeof $o2 !== "boolean" ? {} : null;
108
+ }
109
+ function _0($o2) {
110
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
111
+ return {};
112
+ if ("valueBitMask" in $o2 && $o2["valueBitMask"] !== void 0) {
113
+ const error = _number($o2["valueBitMask"]);
114
+ if (error)
115
+ return error;
116
+ }
117
+ if ("allowUnexpectedResponse" in $o2 && $o2["allowUnexpectedResponse"] !== void 0) {
118
+ const error = _boolean($o2["allowUnexpectedResponse"]);
119
+ if (error)
120
+ return error;
121
+ }
122
+ return null;
123
+ }
124
+ function optional__0($o2) {
125
+ if ($o2 !== void 0) {
126
+ const error = _0($o2);
127
+ if (error)
128
+ return error;
129
+ }
130
+ return null;
131
+ }
132
+ return optional__0($o);
133
+ };
134
+ const __assertType__sa__2_ea_2 = ($o) => {
135
+ function _number($o2) {
136
+ return typeof $o2 !== "number" ? {} : null;
137
+ }
138
+ function _2($o2) {
139
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
140
+ return {};
141
+ if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
142
+ const error = _number($o2["parameter"]);
143
+ if (error)
144
+ return error;
145
+ } else
146
+ return {};
147
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
148
+ const error = _number($o2["bitMask"]);
149
+ if (error)
150
+ return error;
151
+ }
152
+ return null;
153
+ }
154
+ function sa__2_ea_2($o2) {
155
+ if (!Array.isArray($o2))
156
+ return {};
157
+ for (let i = 0; i < $o2.length; i++) {
158
+ const error = _2($o2[i]);
159
+ if (error)
160
+ return error;
161
+ }
162
+ return null;
163
+ }
164
+ return sa__2_ea_2($o);
165
+ };
166
+ const __assertType__ConfigurationCCAPISetOptions = ($o) => {
167
+ function _number($o2) {
168
+ return typeof $o2 !== "number" ? {} : null;
169
+ }
170
+ function _2($o2) {
171
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
172
+ return {};
173
+ if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
174
+ const error = _number($o2["parameter"]);
175
+ if (error)
176
+ return error;
177
+ } else
178
+ return {};
179
+ return null;
180
+ }
181
+ function _undefined($o2) {
182
+ return $o2 !== void 0 ? {} : null;
183
+ }
184
+ function _3($o2) {
185
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
186
+ return {};
187
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
188
+ const error = _undefined($o2["bitMask"]);
189
+ if (error)
190
+ return error;
191
+ }
192
+ if ("value" in $o2 && $o2["value"] !== void 0) {
193
+ const error = _number($o2["value"]);
194
+ if (error)
195
+ return error;
196
+ } else
197
+ return {};
198
+ return null;
199
+ }
200
+ function si__2__3_ei($o2) {
201
+ const conditions = [_2, _3];
202
+ for (const condition of conditions) {
203
+ const error = condition($o2);
204
+ if (error)
205
+ return error;
206
+ }
207
+ return null;
208
+ }
209
+ function _9($o2) {
210
+ return $o2 !== 1 ? {} : null;
211
+ }
212
+ function _10($o2) {
213
+ return $o2 !== 2 ? {} : null;
214
+ }
215
+ function _11($o2) {
216
+ return $o2 !== 4 ? {} : null;
217
+ }
218
+ function su__9__10__11_eu($o2) {
219
+ const conditions = [_9, _10, _11];
220
+ for (const condition of conditions) {
221
+ const error = condition($o2);
222
+ if (!error)
223
+ return null;
224
+ }
225
+ return {};
226
+ }
227
+ function su__13__14__15__16_eu($o2) {
228
+ return ![0, 1, 2, 3].includes($o2) ? {} : null;
229
+ }
230
+ function _5($o2) {
231
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
232
+ return {};
233
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
234
+ const error = _undefined($o2["bitMask"]);
235
+ if (error)
236
+ return error;
237
+ }
238
+ if ("value" in $o2 && $o2["value"] !== void 0) {
239
+ const error = _number($o2["value"]);
240
+ if (error)
241
+ return error;
242
+ } else
243
+ return {};
244
+ if ("valueSize" in $o2 && $o2["valueSize"] !== void 0) {
245
+ const error = su__9__10__11_eu($o2["valueSize"]);
246
+ if (error)
247
+ return error;
248
+ } else
249
+ return {};
250
+ if ("valueFormat" in $o2 && $o2["valueFormat"] !== void 0) {
251
+ const error = su__13__14__15__16_eu($o2["valueFormat"]);
252
+ if (error)
253
+ return error;
254
+ } else
255
+ return {};
256
+ return null;
257
+ }
258
+ function si__2__5_ei($o2) {
259
+ const conditions = [_2, _5];
260
+ for (const condition of conditions) {
261
+ const error = condition($o2);
262
+ if (error)
263
+ return error;
264
+ }
265
+ return null;
266
+ }
267
+ function _7($o2) {
268
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
269
+ return {};
270
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
271
+ const error = _number($o2["bitMask"]);
272
+ if (error)
273
+ return error;
274
+ } else
275
+ return {};
276
+ if ("value" in $o2 && $o2["value"] !== void 0) {
277
+ const error = _number($o2["value"]);
278
+ if (error)
279
+ return error;
280
+ } else
281
+ return {};
282
+ return null;
283
+ }
284
+ function si__2__7_ei($o2) {
285
+ const conditions = [_2, _7];
286
+ for (const condition of conditions) {
287
+ const error = condition($o2);
288
+ if (error)
289
+ return error;
290
+ }
291
+ return null;
292
+ }
293
+ function su_si__2__3_ei_si__2__5_ei_si__2__7_ei_eu($o2) {
294
+ const conditions = [si__2__3_ei, si__2__5_ei, si__2__7_ei];
295
+ for (const condition of conditions) {
296
+ const error = condition($o2);
297
+ if (!error)
298
+ return null;
299
+ }
300
+ return {};
301
+ }
302
+ return su_si__2__3_ei_si__2__5_ei_si__2__7_ei_eu($o);
303
+ };
304
+ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = ($o) => {
305
+ function _number($o2) {
306
+ return typeof $o2 !== "number" ? {} : null;
307
+ }
308
+ function _4($o2) {
309
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
310
+ return {};
311
+ if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
312
+ const error = _number($o2["parameter"]);
313
+ if (error)
314
+ return error;
315
+ } else
316
+ return {};
317
+ return null;
318
+ }
319
+ function _undefined($o2) {
320
+ return $o2 !== void 0 ? {} : null;
321
+ }
322
+ function _5($o2) {
323
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
324
+ return {};
325
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
326
+ const error = _undefined($o2["bitMask"]);
327
+ if (error)
328
+ return error;
329
+ }
330
+ if ("value" in $o2 && $o2["value"] !== void 0) {
331
+ const error = _number($o2["value"]);
332
+ if (error)
333
+ return error;
334
+ } else
335
+ return {};
336
+ return null;
337
+ }
338
+ function si__4__5_ei($o2) {
339
+ const conditions = [_4, _5];
340
+ for (const condition of conditions) {
341
+ const error = condition($o2);
342
+ if (error)
343
+ return error;
344
+ }
345
+ return null;
346
+ }
347
+ function _11($o2) {
348
+ return $o2 !== 1 ? {} : null;
349
+ }
350
+ function _12($o2) {
351
+ return $o2 !== 2 ? {} : null;
352
+ }
353
+ function _13($o2) {
354
+ return $o2 !== 4 ? {} : null;
355
+ }
356
+ function su__11__12__13_eu($o2) {
357
+ const conditions = [_11, _12, _13];
358
+ for (const condition of conditions) {
359
+ const error = condition($o2);
360
+ if (!error)
361
+ return null;
362
+ }
363
+ return {};
364
+ }
365
+ function su__15__16__17__18_eu($o2) {
366
+ return ![0, 1, 2, 3].includes($o2) ? {} : null;
367
+ }
368
+ function _7($o2) {
369
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
370
+ return {};
371
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
372
+ const error = _undefined($o2["bitMask"]);
373
+ if (error)
374
+ return error;
375
+ }
376
+ if ("value" in $o2 && $o2["value"] !== void 0) {
377
+ const error = _number($o2["value"]);
378
+ if (error)
379
+ return error;
380
+ } else
381
+ return {};
382
+ if ("valueSize" in $o2 && $o2["valueSize"] !== void 0) {
383
+ const error = su__11__12__13_eu($o2["valueSize"]);
384
+ if (error)
385
+ return error;
386
+ } else
387
+ return {};
388
+ if ("valueFormat" in $o2 && $o2["valueFormat"] !== void 0) {
389
+ const error = su__15__16__17__18_eu($o2["valueFormat"]);
390
+ if (error)
391
+ return error;
392
+ } else
393
+ return {};
394
+ return null;
395
+ }
396
+ function si__4__7_ei($o2) {
397
+ const conditions = [_4, _7];
398
+ for (const condition of conditions) {
399
+ const error = condition($o2);
400
+ if (error)
401
+ return error;
402
+ }
403
+ return null;
404
+ }
405
+ function _9($o2) {
406
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
407
+ return {};
408
+ if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
409
+ const error = _number($o2["bitMask"]);
410
+ if (error)
411
+ return error;
412
+ } else
413
+ return {};
414
+ if ("value" in $o2 && $o2["value"] !== void 0) {
415
+ const error = _number($o2["value"]);
416
+ if (error)
417
+ return error;
418
+ } else
419
+ return {};
420
+ return null;
421
+ }
422
+ function si__4__9_ei($o2) {
423
+ const conditions = [_4, _9];
424
+ for (const condition of conditions) {
425
+ const error = condition($o2);
426
+ if (error)
427
+ return error;
428
+ }
429
+ return null;
430
+ }
431
+ function su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu($o2) {
432
+ const conditions = [si__4__5_ei, si__4__7_ei, si__4__9_ei];
433
+ for (const condition of conditions) {
434
+ const error = condition($o2);
435
+ if (!error)
436
+ return null;
437
+ }
438
+ return {};
439
+ }
440
+ function sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2($o2) {
441
+ if (!Array.isArray($o2))
442
+ return {};
443
+ for (let i = 0; i < $o2.length; i++) {
444
+ const error = su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu($o2[i]);
445
+ if (error)
446
+ return error;
447
+ }
448
+ return null;
449
+ }
450
+ return sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2($o);
451
+ };
452
+ const __assertType__sa__number_ea_2 = ($o) => {
453
+ function _number($o2) {
454
+ return typeof $o2 !== "number" ? {} : null;
455
+ }
456
+ function sa__number_ea_2($o2) {
457
+ if (!Array.isArray($o2))
458
+ return {};
459
+ for (let i = 0; i < $o2.length; i++) {
460
+ const error = _number($o2[i]);
461
+ if (error)
462
+ return error;
463
+ }
464
+ return null;
465
+ }
466
+ return sa__number_ea_2($o);
467
+ };
468
+ function configValueToString(value) {
469
+ if (typeof value === "number")
470
+ return value.toString();
471
+ else
472
+ return [...value].join(", ");
473
+ }
474
+ class ConfigurationCCError extends import_safe.ZWaveError {
475
+ message;
476
+ code;
477
+ argument;
478
+ constructor(message, code, argument) {
479
+ super(message, code);
480
+ this.message = message;
481
+ this.code = code;
482
+ this.argument = argument;
483
+ Object.setPrototypeOf(this, ConfigurationCCError.prototype);
484
+ }
485
+ }
486
+ const ConfigurationCCValues = Object.freeze({
487
+ ...import_Values.V.defineStaticCCValues(import_safe.CommandClasses.Configuration, {
488
+ ...import_Values.V.staticProperty(
489
+ "isParamInformationFromConfig",
490
+ void 0,
491
+ // meta
492
+ { internal: true, supportsEndpoints: false }
493
+ )
494
+ }),
495
+ ...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses.Configuration, {
496
+ ...import_Values.V.dynamicPropertyAndKeyWithName(
497
+ "paramInformation",
498
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
499
+ (parameter, bitMask) => parameter,
500
+ (parameter, bitMask) => bitMask,
501
+ ({ property, propertyKey }) => typeof property === "number" && (typeof propertyKey === "number" || propertyKey == void 0),
502
+ // Metadata is determined dynamically depending on other factors
503
+ void 0
504
+ )
505
+ })
506
+ });
507
+ function createConfigurationCCInstance(endpoint) {
508
+ return import_CommandClass.CommandClass.createInstanceUnchecked(endpoint.virtual ? endpoint.node.physicalNodes[0] : endpoint, ConfigurationCC);
509
+ }
510
+ function normalizeConfigurationCCAPISetOptions(ctx, endpoint, options) {
511
+ if ("bitMask" in options && options.bitMask) {
512
+ const ccc = createConfigurationCCInstance(endpoint);
513
+ const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
514
+ if (!paramInfo.isFromConfig) {
515
+ throw new import_safe.ZWaveError("Setting a partial configuration parameter requires it to be defined in a device config file!", import_safe.ZWaveErrorCodes.Argument_Invalid);
516
+ }
517
+ return {
518
+ parameter: options.parameter,
519
+ bitMask: options.bitMask,
520
+ value: options.value,
521
+ valueSize: paramInfo.valueSize,
522
+ valueFormat: paramInfo.format
523
+ };
524
+ } else if ("valueSize" in options) {
525
+ return (0, import_safe3.pick)(options, [
526
+ "parameter",
527
+ "value",
528
+ "valueSize",
529
+ "valueFormat"
530
+ ]);
531
+ } else {
532
+ const ccc = createConfigurationCCInstance(endpoint);
533
+ const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
534
+ if (!paramInfo.isFromConfig) {
535
+ throw new import_safe.ZWaveError("Setting a configuration parameter without specifying a value size and format requires it to be defined in a device config file!", import_safe.ZWaveErrorCodes.Argument_Invalid);
536
+ }
537
+ return {
538
+ parameter: options.parameter,
539
+ value: options.value,
540
+ valueSize: paramInfo.valueSize,
541
+ valueFormat: paramInfo.format
542
+ };
543
+ }
544
+ }
545
+ function bulkMergePartialParamValues(ctx, endpoint, options) {
546
+ const allParams = options.filter((o) => o.bitMask == void 0);
547
+ const unmergedPartials = /* @__PURE__ */ new Map();
548
+ for (const partial of options.filter((o) => o.bitMask != void 0)) {
549
+ if (!unmergedPartials.has(partial.parameter)) {
550
+ unmergedPartials.set(partial.parameter, []);
551
+ }
552
+ unmergedPartials.get(partial.parameter).push(partial);
553
+ }
554
+ if (unmergedPartials.size) {
555
+ const ccc = createConfigurationCCInstance(endpoint);
556
+ for (const [parameter, partials] of unmergedPartials) {
557
+ allParams.push({
558
+ parameter,
559
+ value: ccc.composePartialParamValues(ctx, parameter, partials.map((p) => ({
560
+ bitMask: p.bitMask,
561
+ partialValue: p.value
562
+ }))),
563
+ valueSize: partials[0].valueSize,
564
+ valueFormat: partials[0].valueFormat
565
+ });
566
+ }
567
+ }
568
+ return allParams;
569
+ }
570
+ function isSignedPartial(bitMask, format) {
571
+ return (0, import_safe.getBitMaskWidth)(bitMask) > 1 && (format ?? import_safe.ConfigValueFormat.SignedInteger) === import_safe.ConfigValueFormat.SignedInteger;
572
+ }
573
+ function reInterpretSignedValue(value, valueSize, targetFormat) {
574
+ const raw = new import_safe2.Bytes(valueSize);
575
+ serializeValue(raw, 0, valueSize, import_safe.ConfigValueFormat.SignedInteger, value);
576
+ return parseValue(raw, valueSize, targetFormat);
577
+ }
578
+ function getParamInformationFromConfigFile(ctx, nodeId, endpointIndex) {
579
+ const deviceConfig = ctx.getDeviceConfig?.(nodeId);
580
+ if (endpointIndex === 0) {
581
+ return deviceConfig?.paramInformation ?? deviceConfig?.endpoints?.get(0)?.paramInformation;
582
+ } else {
583
+ return deviceConfig?.endpoints?.get(endpointIndex)?.paramInformation;
584
+ }
585
+ }
586
+ let ConfigurationCCAPI = (() => {
587
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Configuration)];
588
+ let _classDescriptor;
589
+ let _classExtraInitializers = [];
590
+ let _classThis;
591
+ let _classSuper = import_API.CCAPI;
592
+ var ConfigurationCCAPI2 = class extends _classSuper {
593
+ static {
594
+ _classThis = this;
595
+ }
596
+ static {
597
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
598
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
599
+ ConfigurationCCAPI2 = _classThis = _classDescriptor.value;
600
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
601
+ __runInitializers(_classThis, _classExtraInitializers);
602
+ }
603
+ supportsCommand(cmd) {
604
+ switch (cmd) {
605
+ case import_Types.ConfigurationCommand.Get:
606
+ case import_Types.ConfigurationCommand.Set:
607
+ return true;
608
+ // This is mandatory
609
+ case import_Types.ConfigurationCommand.BulkGet:
610
+ case import_Types.ConfigurationCommand.BulkSet:
611
+ return this.version >= 2;
612
+ case import_Types.ConfigurationCommand.NameGet:
613
+ case import_Types.ConfigurationCommand.InfoGet:
614
+ case import_Types.ConfigurationCommand.PropertiesGet:
615
+ return this.version >= 3;
616
+ case import_Types.ConfigurationCommand.DefaultReset:
617
+ return this.version >= 4;
618
+ }
619
+ return super.supportsCommand(cmd);
620
+ }
621
+ get [import_API.SET_VALUE]() {
622
+ return async function({ property, propertyKey }, value) {
623
+ if (typeof property !== "number") {
624
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
625
+ }
626
+ if (propertyKey != void 0 && typeof propertyKey !== "number") {
627
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
628
+ }
629
+ if (typeof value !== "number") {
630
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
631
+ }
632
+ let ccInstance;
633
+ const applHost = this.host;
634
+ if (this.isSinglecast()) {
635
+ ccInstance = createConfigurationCCInstance(this.endpoint);
636
+ } else if (this.isMulticast()) {
637
+ const nodes = this.endpoint.node.physicalNodes;
638
+ if (!nodes.every((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(import_safe.CommandClasses.Configuration))) {
639
+ throw new import_safe.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target endpoints to support Configuration CC!`, import_safe.ZWaveErrorCodes.CC_Invalid);
640
+ }
641
+ const paramInfos = this.endpoint.node.physicalNodes.map((node) => createConfigurationCCInstance(node.getEndpoint(this.endpoint.index)).getParamInformation(this.host, property, propertyKey));
642
+ if (!paramInfos.length || !paramInfos.every((info, index) => {
643
+ if (index === 0)
644
+ return true;
645
+ return info.valueSize === paramInfos[0].valueSize && info.format === paramInfos[0].format;
646
+ })) {
647
+ throw new import_safe.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target nodes to have the same parameter definition!`, import_safe.ZWaveErrorCodes.CC_Invalid);
648
+ }
649
+ ccInstance = createConfigurationCCInstance(this.endpoint);
650
+ } else {
651
+ throw new import_safe.ZWaveError(`The setValue API for Configuration CC is not supported via broadcast!`, import_safe.ZWaveErrorCodes.CC_NotSupported);
652
+ }
653
+ let { valueSize, format: valueFormat = import_safe.ConfigValueFormat.SignedInteger } = ccInstance.getParamInformation(applHost, property);
654
+ let targetValue;
655
+ if (propertyKey) {
656
+ if (!valueSize) {
657
+ valueSize = ccInstance.getParamInformation(applHost, property, propertyKey).valueSize;
658
+ }
659
+ targetValue = ccInstance.composePartialParamValue(applHost, property, propertyKey, value);
660
+ valueFormat = import_safe.ConfigValueFormat.UnsignedInteger;
661
+ } else {
662
+ targetValue = value;
663
+ }
664
+ if (!valueSize) {
665
+ valueSize = (0, import_safe.getMinIntegerSize)(targetValue, valueFormat === import_safe.ConfigValueFormat.SignedInteger);
666
+ if (!valueSize) {
667
+ throw new import_safe.ZWaveError(`The value ${targetValue} is not valid for configuration parameters!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
668
+ }
669
+ }
670
+ if (!isSafeValue(targetValue, valueSize, valueFormat)) {
671
+ throwInvalidValueError(targetValue, property, valueSize, valueFormat);
672
+ }
673
+ const result = await this.set({
674
+ parameter: property,
675
+ value: targetValue,
676
+ valueSize,
677
+ valueFormat
678
+ });
679
+ if (!(0, import_safe.supervisedCommandSucceeded)(result) && this.isSinglecast()) {
680
+ this.schedulePoll(
681
+ { property, propertyKey },
682
+ targetValue,
683
+ // Configuration changes are instant
684
+ { transition: "fast" }
685
+ );
686
+ }
687
+ return result;
688
+ };
689
+ }
690
+ get [import_API.POLL_VALUE]() {
691
+ return async function({ property, propertyKey }) {
692
+ if (typeof property !== "number") {
693
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
694
+ }
695
+ if (propertyKey != void 0 && typeof propertyKey !== "number") {
696
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
697
+ }
698
+ return this.get(property, { valueBitMask: propertyKey });
699
+ };
700
+ }
701
+ /**
702
+ * Requests the current value of a given config parameter from the device.
703
+ * This may timeout and return `undefined` if the node does not respond.
704
+ * If the node replied with a different parameter number, a `ConfigurationCCError`
705
+ * is thrown with the `argument` property set to the reported parameter number.
706
+ */
707
+ async get(parameter, options) {
708
+ __assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
709
+ __assertType("options", void 0, __assertType__optional__0.bind(void 0, options));
710
+ this.assertPhysicalEndpoint(this.endpoint);
711
+ if (parameter > 255) {
712
+ const result = await this.getBulk([
713
+ {
714
+ parameter,
715
+ bitMask: options?.valueBitMask
716
+ }
717
+ ]);
718
+ return result.find((r) => r.parameter === parameter)?.value;
719
+ }
720
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Get);
721
+ const { valueBitMask, allowUnexpectedResponse } = options ?? {};
722
+ const cc = new ConfigurationCCGet({
723
+ nodeId: this.endpoint.nodeId,
724
+ endpointIndex: this.endpoint.index,
725
+ parameter,
726
+ allowUnexpectedResponse
727
+ });
728
+ const response = await this.host.sendCommand(cc, this.commandOptions);
729
+ if (!response)
730
+ return;
731
+ if (response.parameter === parameter) {
732
+ if (!valueBitMask)
733
+ return response.value;
734
+ const paramInfo = cc.getParamInformation(this.host, response.parameter, valueBitMask);
735
+ return (0, import_safe.parsePartial)(response.value, valueBitMask, isSignedPartial(valueBitMask, paramInfo.format));
736
+ }
737
+ this.host.logNode(this.endpoint.nodeId, {
738
+ endpoint: this.endpoint.index,
739
+ message: `Received unexpected ConfigurationReport (param = ${response.parameter}, value = ${response.value.toString()})`,
740
+ direction: "inbound",
741
+ level: "error"
742
+ });
743
+ throw new ConfigurationCCError(`The first existing parameter on this node is ${response.parameter}`, import_safe.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber, response.parameter);
744
+ }
745
+ /**
746
+ * Requests the current value of the config parameters from the device.
747
+ * When the node does not respond due to a timeout, the `value` in the returned array will be `undefined`.
748
+ */
749
+ async getBulk(options) {
750
+ __assertType("options", void 0, __assertType__sa__2_ea_2.bind(void 0, options));
751
+ this.assertPhysicalEndpoint(this.endpoint);
752
+ let values;
753
+ const distinctParameters = (0, import_arrays.distinct)(options.map((o) => o.parameter));
754
+ if (this.supportsCommand(import_Types.ConfigurationCommand.BulkGet) && (0, import_safe.isConsecutiveArray)(distinctParameters)) {
755
+ const cc2 = new ConfigurationCCBulkGet({
756
+ nodeId: this.endpoint.nodeId,
757
+ endpointIndex: this.endpoint.index,
758
+ parameters: distinctParameters
759
+ });
760
+ const response = await this.host.sendCommand(cc2, this.commandOptions);
761
+ if (response)
762
+ values = response.values;
763
+ } else {
764
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Get);
765
+ const _values = /* @__PURE__ */ new Map();
766
+ for (const parameter of distinctParameters) {
767
+ const cc2 = new ConfigurationCCGet({
768
+ nodeId: this.endpoint.nodeId,
769
+ endpointIndex: this.endpoint.index,
770
+ parameter
771
+ });
772
+ const response = await this.host.sendCommand(cc2, this.commandOptions);
773
+ if (response) {
774
+ _values.set(response.parameter, response.value);
775
+ }
776
+ }
777
+ values = _values;
778
+ }
779
+ const cc = createConfigurationCCInstance(this.endpoint);
780
+ return options.map((o) => {
781
+ let value = values?.get(o.parameter);
782
+ if (typeof value === "number" && o.bitMask) {
783
+ const paramInfo = cc.getParamInformation(this.host, o.parameter, o.bitMask);
784
+ value = (0, import_safe.parsePartial)(value, o.bitMask, isSignedPartial(o.bitMask, paramInfo.format));
785
+ }
786
+ return { ...o, value };
787
+ });
788
+ }
789
+ /**
790
+ * Sets a new value for a given config parameter of the device.
791
+ */
792
+ async set(options) {
793
+ __assertType("options", "ConfigurationCCAPISetOptions", __assertType__ConfigurationCCAPISetOptions.bind(void 0, options));
794
+ if (options.parameter > 255) {
795
+ return this.setBulk([options]);
796
+ }
797
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
798
+ const normalized = normalizeConfigurationCCAPISetOptions(this.host, this.endpoint, options);
799
+ let value = normalized.value;
800
+ if (normalized.bitMask) {
801
+ const ccc = createConfigurationCCInstance(this.endpoint);
802
+ value = ccc.composePartialParamValue(this.host, normalized.parameter, normalized.bitMask, normalized.value);
803
+ }
804
+ const cc = new ConfigurationCCSet({
805
+ nodeId: this.endpoint.nodeId,
806
+ endpointIndex: this.endpoint.index,
807
+ resetToDefault: false,
808
+ parameter: normalized.parameter,
809
+ value,
810
+ valueSize: normalized.valueSize,
811
+ valueFormat: normalized.valueFormat
812
+ });
813
+ return this.host.sendCommand(cc, this.commandOptions);
814
+ }
815
+ /**
816
+ * Sets new values for multiple config parameters of the device. Uses the `BulkSet` command if supported, otherwise falls back to individual `Set` commands.
817
+ */
818
+ async setBulk(values) {
819
+ __assertType("values", void 0, __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2.bind(void 0, values));
820
+ const normalized = values.map((v) => normalizeConfigurationCCAPISetOptions(this.host, this.endpoint, v));
821
+ const allParams = bulkMergePartialParamValues(this.host, this.endpoint, normalized);
822
+ const canUseBulkSet = this.supportsCommand(import_Types.ConfigurationCommand.BulkSet) && (0, import_safe.isConsecutiveArray)(allParams.map((v) => v.parameter)) && new Set(allParams.map((v) => v.valueFormat)).size === 1 && new Set(allParams.map((v) => v.valueSize)).size === 1;
823
+ if (canUseBulkSet) {
824
+ const cc = new ConfigurationCCBulkSet({
825
+ nodeId: this.endpoint.nodeId,
826
+ endpointIndex: this.endpoint.index,
827
+ parameters: allParams.map((v) => v.parameter),
828
+ valueSize: allParams[0].valueSize,
829
+ valueFormat: allParams[0].valueFormat,
830
+ values: allParams.map((v) => v.value),
831
+ handshake: true
832
+ });
833
+ const result = await this.host.sendCommand(cc, this.commandOptions);
834
+ if (result) {
835
+ const sentValues = cc.values;
836
+ const receivedValues = [...result.values.values()];
837
+ const success = sentValues.length === receivedValues.length && sentValues.every((v, i) => v === receivedValues[i]);
838
+ return {
839
+ status: success ? import_safe.SupervisionStatus.Success : import_safe.SupervisionStatus.Fail
840
+ };
841
+ } else {
842
+ return void 0;
843
+ }
844
+ } else {
845
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
846
+ const supervisionResults = [];
847
+ for (const { parameter, value, valueSize, valueFormat } of allParams) {
848
+ const cc = new ConfigurationCCSet({
849
+ nodeId: this.endpoint.nodeId,
850
+ endpointIndex: this.endpoint.index,
851
+ parameter,
852
+ value,
853
+ valueSize,
854
+ valueFormat
855
+ });
856
+ supervisionResults.push(await this.host.sendCommand(cc, this.commandOptions));
857
+ }
858
+ return (0, import_safe.mergeSupervisionResults)(supervisionResults);
859
+ }
860
+ }
861
+ /**
862
+ * Resets a configuration parameter to its default value.
863
+ *
864
+ * WARNING: This will throw on legacy devices (ConfigurationCC v3 and below)
865
+ */
866
+ async reset(parameter) {
867
+ __assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
868
+ if (parameter > 255) {
869
+ return this.resetBulk([parameter]);
870
+ }
871
+ if (this.version <= 3) {
872
+ throw new import_safe.ZWaveError(`Resetting configuration parameters to default MUST not be done on nodes implementing ConfigurationCC V3 or below!`, import_safe.ZWaveErrorCodes.ConfigurationCC_NoResetToDefaultOnLegacyDevices);
873
+ }
874
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
875
+ const cc = new ConfigurationCCSet({
876
+ nodeId: this.endpoint.nodeId,
877
+ endpointIndex: this.endpoint.index,
878
+ parameter,
879
+ resetToDefault: true
880
+ });
881
+ return this.host.sendCommand(cc, this.commandOptions);
882
+ }
883
+ /**
884
+ * Resets multiple configuration parameters to their default value. Uses BulkSet if supported, otherwise falls back to individual Set commands.
885
+ *
886
+ * WARNING: This will throw on legacy devices (ConfigurationCC v3 and below)
887
+ */
888
+ async resetBulk(parameters) {
889
+ __assertType("parameters", void 0, __assertType__sa__number_ea_2.bind(void 0, parameters));
890
+ if ((0, import_safe.isConsecutiveArray)(parameters) && this.supportsCommand(import_Types.ConfigurationCommand.BulkSet)) {
891
+ const cc = new ConfigurationCCBulkSet({
892
+ nodeId: this.endpoint.nodeId,
893
+ endpointIndex: this.endpoint.index,
894
+ parameters,
895
+ resetToDefault: true
896
+ });
897
+ return this.host.sendCommand(cc, this.commandOptions);
898
+ } else {
899
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
900
+ const CCs = (0, import_arrays.distinct)(parameters).map((parameter) => new ConfigurationCCSet({
901
+ nodeId: this.endpoint.nodeId,
902
+ endpointIndex: this.endpoint.index,
903
+ parameter,
904
+ resetToDefault: true
905
+ }));
906
+ for (const cc of CCs) {
907
+ await this.host.sendCommand(cc, this.commandOptions);
908
+ }
909
+ }
910
+ }
911
+ /** Resets all configuration parameters to their default value */
912
+ async resetAll() {
913
+ this.assertPhysicalEndpoint(this.endpoint);
914
+ this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.DefaultReset);
915
+ const cc = new ConfigurationCCDefaultReset({
916
+ nodeId: this.endpoint.nodeId,
917
+ endpointIndex: this.endpoint.index
918
+ });
919
+ await this.host.sendCommand(cc, this.commandOptions);
920
+ }
921
+ async getProperties(parameter) {
922
+ __assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
923
+ this.assertPhysicalEndpoint(this.endpoint);
924
+ const cc = new ConfigurationCCPropertiesGet({
925
+ nodeId: this.endpoint.nodeId,
926
+ endpointIndex: this.endpoint.index,
927
+ parameter
928
+ });
929
+ const response = await this.host.sendCommand(cc, this.commandOptions);
930
+ if (response) {
931
+ return (0, import_safe3.pick)(response, [
932
+ "valueSize",
933
+ "valueFormat",
934
+ "minValue",
935
+ "maxValue",
936
+ "defaultValue",
937
+ "nextParameter",
938
+ "altersCapabilities",
939
+ "isReadonly",
940
+ "isAdvanced",
941
+ "noBulkSupport"
942
+ ]);
943
+ }
944
+ }
945
+ /** Requests the name of a configuration parameter from the node */
946
+ async getName(parameter) {
947
+ __assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
948
+ this.assertPhysicalEndpoint(this.endpoint);
949
+ const cc = new ConfigurationCCNameGet({
950
+ nodeId: this.endpoint.nodeId,
951
+ endpointIndex: this.endpoint.index,
952
+ parameter
953
+ });
954
+ const response = await this.host.sendCommand(cc, this.commandOptions);
955
+ return response?.name;
956
+ }
957
+ /** Requests usage info for a configuration parameter from the node */
958
+ async getInfo(parameter) {
959
+ __assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
960
+ this.assertPhysicalEndpoint(this.endpoint);
961
+ const cc = new ConfigurationCCInfoGet({
962
+ nodeId: this.endpoint.nodeId,
963
+ endpointIndex: this.endpoint.index,
964
+ parameter
965
+ });
966
+ const response = await this.host.sendCommand(cc, this.commandOptions);
967
+ return response?.info;
968
+ }
969
+ /**
970
+ * This scans the node for the existing parameters. Found parameters will be reported
971
+ * through the `value added` and `value updated` events.
972
+ *
973
+ * WARNING: This method throws for newer devices.
974
+ *
975
+ * WARNING: On nodes implementing V1 and V2, this process may take
976
+ * **up to an hour**, depending on the configured timeout.
977
+ *
978
+ * WARNING: On nodes implementing V2, all parameters after 255 will be ignored.
979
+ */
980
+ async scanParametersLegacy() {
981
+ if (this.version >= 3) {
982
+ throw new import_safe.ZWaveError("Use ConfigurationCC.interview instead of scanning parameters for versions 3 and above.", import_safe.ZWaveErrorCodes.ConfigurationCC_NoLegacyScanOnNewDevices);
983
+ }
984
+ this.assertPhysicalEndpoint(this.endpoint);
985
+ this.host.logNode(this.endpoint.nodeId, {
986
+ endpoint: this.endpoint.index,
987
+ message: `Scanning available parameters...`
988
+ });
989
+ const ccInstance = createConfigurationCCInstance(this.endpoint);
990
+ for (let param = 1; param <= 255; param++) {
991
+ let originalValue;
992
+ this.host.logNode(this.endpoint.nodeId, {
993
+ endpoint: this.endpoint.index,
994
+ message: ` trying param ${param}...`,
995
+ direction: "outbound"
996
+ });
997
+ try {
998
+ originalValue = await this.get(param, {
999
+ // When requesting a non-existing parameter, a node SHOULD respond with the
1000
+ // first available parameter. We use this for the first param only,
1001
+ // because delayed responses might otherwise confuse the interview process
1002
+ allowUnexpectedResponse: param === 1
1003
+ });
1004
+ if (originalValue != void 0) {
1005
+ const logMessage = ` Param ${param}:
1006
+ readable = true
1007
+ valueSize = ${ccInstance.getParamInformation(this.host, param).valueSize}
1008
+ value = ${originalValue.toString()}`;
1009
+ this.host.logNode(this.endpoint.nodeId, {
1010
+ endpoint: this.endpoint.index,
1011
+ message: logMessage,
1012
+ direction: "inbound"
1013
+ });
1014
+ }
1015
+ } catch (e) {
1016
+ if (e instanceof ConfigurationCCError && e.code === import_safe.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber) {
1017
+ if (e.argument - 1 > param)
1018
+ param = e.argument - 1;
1019
+ continue;
1020
+ }
1021
+ throw e;
1022
+ }
1023
+ }
1024
+ }
1025
+ };
1026
+ return ConfigurationCCAPI2 = _classThis;
1027
+ })();
1028
+ let ConfigurationCC = (() => {
1029
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Configuration), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(ConfigurationCCValues)];
1030
+ let _classDescriptor;
1031
+ let _classExtraInitializers = [];
1032
+ let _classThis;
1033
+ let _classSuper = import_CommandClass.CommandClass;
1034
+ var ConfigurationCC2 = class extends _classSuper {
1035
+ static {
1036
+ _classThis = this;
1037
+ }
1038
+ static {
1039
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1040
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1041
+ ConfigurationCC2 = _classThis = _classDescriptor.value;
1042
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1043
+ __runInitializers(_classThis, _classExtraInitializers);
1044
+ }
1045
+ async interview(ctx) {
1046
+ const node = this.getNode(ctx);
1047
+ const endpoint = this.getEndpoint(ctx);
1048
+ const api = import_API.CCAPI.create(import_safe.CommandClasses.Configuration, ctx, endpoint).withOptions({
1049
+ priority: import_safe.MessagePriority.NodeQuery
1050
+ });
1051
+ ctx.logNode(node.id, {
1052
+ endpoint: this.endpointIndex,
1053
+ message: `Interviewing ${this.ccName}...`,
1054
+ direction: "none"
1055
+ });
1056
+ const deviceConfig = ctx.getDeviceConfig?.(node.id);
1057
+ const paramInfo = getParamInformationFromConfigFile(ctx, node.id, this.endpointIndex);
1058
+ if (paramInfo) {
1059
+ ctx.logNode(node.id, {
1060
+ endpoint: this.endpointIndex,
1061
+ message: `${this.constructor.name}: Loading configuration parameters from device config`,
1062
+ direction: "none"
1063
+ });
1064
+ this.deserializeParamInformationFromConfig(ctx, paramInfo);
1065
+ }
1066
+ const documentedParamNumbers = new Set(Array.from(paramInfo?.keys() ?? []).map((k) => k.parameter));
1067
+ if (api.version >= 3) {
1068
+ ctx.logNode(node.id, {
1069
+ endpoint: this.endpointIndex,
1070
+ message: "finding first configuration parameter...",
1071
+ direction: "outbound"
1072
+ });
1073
+ const param0props = await api.getProperties(0);
1074
+ let param;
1075
+ if (param0props) {
1076
+ param = param0props.nextParameter;
1077
+ if (param === 0) {
1078
+ ctx.logNode(node.id, {
1079
+ endpoint: this.endpointIndex,
1080
+ message: `didn't report any config params, trying #1 just to be sure...`,
1081
+ direction: "inbound"
1082
+ });
1083
+ param = 1;
1084
+ }
1085
+ } else {
1086
+ ctx.logNode(node.id, {
1087
+ endpoint: this.endpointIndex,
1088
+ message: "Finding first configuration parameter timed out, skipping interview...",
1089
+ level: "warn"
1090
+ });
1091
+ return;
1092
+ }
1093
+ while (param > 0) {
1094
+ ctx.logNode(node.id, {
1095
+ endpoint: this.endpointIndex,
1096
+ message: `querying parameter #${param} information...`,
1097
+ direction: "outbound"
1098
+ });
1099
+ const props = await api.getProperties(param).catch(
1100
+ // If querying the properties fails, don't abort the entire interview
1101
+ () => void 0
1102
+ );
1103
+ if (!props) {
1104
+ ctx.logNode(node.id, {
1105
+ endpoint: this.endpointIndex,
1106
+ message: `Querying parameter #${param} information timed out, skipping scan...`,
1107
+ level: "warn"
1108
+ });
1109
+ break;
1110
+ }
1111
+ const { nextParameter, ...properties } = props;
1112
+ let logMessage;
1113
+ if (properties.valueSize === 0) {
1114
+ logMessage = `Parameter #${param} is unsupported. Next parameter: ${nextParameter}`;
1115
+ } else {
1116
+ let name;
1117
+ if (!documentedParamNumbers.has(param)) {
1118
+ if (!deviceConfig?.compat?.skipConfigurationNameQuery) {
1119
+ name = await api.getName(param).catch(
1120
+ // If querying the name fails, don't abort the entire interview
1121
+ () => void 0
1122
+ );
1123
+ }
1124
+ if (!deviceConfig?.compat?.skipConfigurationInfoQuery) {
1125
+ await api.getInfo(param).catch(
1126
+ // If querying the info fails, don't abort the entire interview
1127
+ () => void 0
1128
+ );
1129
+ }
1130
+ }
1131
+ logMessage = `received information for parameter #${param}:`;
1132
+ if (name) {
1133
+ logMessage += `
1134
+ parameter name: ${name}`;
1135
+ }
1136
+ logMessage += `
1137
+ value format: ${(0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, properties.valueFormat)}
1138
+ value size: ${properties.valueSize} bytes
1139
+ min value: ${properties.minValue?.toString() ?? "undefined"}
1140
+ max value: ${properties.maxValue?.toString() ?? "undefined"}
1141
+ default value: ${properties.defaultValue?.toString() ?? "undefined"}
1142
+ is read-only: ${!!properties.isReadonly}
1143
+ is advanced (UI): ${!!properties.isAdvanced}
1144
+ has bulk support: ${!properties.noBulkSupport}
1145
+ alters capabilities: ${!!properties.altersCapabilities}`;
1146
+ }
1147
+ ctx.logNode(node.id, {
1148
+ endpoint: this.endpointIndex,
1149
+ message: logMessage,
1150
+ direction: "inbound"
1151
+ });
1152
+ if (nextParameter > param) {
1153
+ param = nextParameter;
1154
+ } else {
1155
+ break;
1156
+ }
1157
+ }
1158
+ }
1159
+ await this.refreshValues(ctx);
1160
+ this.setInterviewComplete(ctx, true);
1161
+ }
1162
+ async refreshValues(ctx) {
1163
+ const node = this.getNode(ctx);
1164
+ const endpoint = this.getEndpoint(ctx);
1165
+ const api = import_API.CCAPI.create(import_safe.CommandClasses.Configuration, ctx, endpoint).withOptions({
1166
+ priority: import_safe.MessagePriority.NodeQuery
1167
+ });
1168
+ if (api.version < 3) {
1169
+ const paramInfo = getParamInformationFromConfigFile(ctx, node.id, this.endpointIndex);
1170
+ if (paramInfo?.size) {
1171
+ const alreadyQueried = /* @__PURE__ */ new Set();
1172
+ for (const param of paramInfo.keys()) {
1173
+ if (paramInfo.get(param)?.writeOnly)
1174
+ continue;
1175
+ if (alreadyQueried.has(param.parameter))
1176
+ continue;
1177
+ alreadyQueried.add(param.parameter);
1178
+ ctx.logNode(node.id, {
1179
+ endpoint: this.endpointIndex,
1180
+ message: `querying parameter #${param.parameter} value...`,
1181
+ direction: "outbound"
1182
+ });
1183
+ const paramValue = await api.get(param.parameter);
1184
+ if (typeof paramValue === "number") {
1185
+ ctx.logNode(node.id, {
1186
+ endpoint: this.endpointIndex,
1187
+ message: `parameter #${param.parameter} has value: ${paramValue}`,
1188
+ direction: "inbound"
1189
+ });
1190
+ } else if (!paramValue) {
1191
+ ctx.logNode(node.id, {
1192
+ endpoint: this.endpointIndex,
1193
+ message: `received no value for parameter #${param.parameter}`,
1194
+ direction: "inbound",
1195
+ level: "warn"
1196
+ });
1197
+ }
1198
+ }
1199
+ } else {
1200
+ ctx.logNode(node.id, {
1201
+ endpoint: this.endpointIndex,
1202
+ message: `${this.constructor.name}: skipping interview because CC version is < 3 and there is no config file`,
1203
+ direction: "none"
1204
+ });
1205
+ }
1206
+ } else {
1207
+ const parameters = (0, import_arrays.distinct)(this.getDefinedValueIDs(ctx).map((v) => v.property).filter((p) => typeof p === "number"));
1208
+ for (const param of parameters) {
1209
+ if (this.getParamInformation(ctx, param).readable !== false) {
1210
+ ctx.logNode(node.id, {
1211
+ endpoint: this.endpointIndex,
1212
+ message: `querying parameter #${param} value...`,
1213
+ direction: "outbound"
1214
+ });
1215
+ await api.get(param);
1216
+ } else {
1217
+ ctx.logNode(node.id, {
1218
+ endpoint: this.endpointIndex,
1219
+ message: `not querying parameter #${param} value, because it is writeonly`,
1220
+ direction: "none"
1221
+ });
1222
+ }
1223
+ }
1224
+ }
1225
+ }
1226
+ /**
1227
+ * Whether this node's param information was loaded from a config file.
1228
+ * If this is true, we don't trust what the node reports
1229
+ */
1230
+ paramExistsInConfigFile(ctx, parameter, valueBitMask) {
1231
+ if (this.getValue(ctx, ConfigurationCCValues.isParamInformationFromConfig) !== true) {
1232
+ return false;
1233
+ }
1234
+ const paramInformation = getParamInformationFromConfigFile(ctx, this.nodeId, this.endpointIndex);
1235
+ if (!paramInformation)
1236
+ return false;
1237
+ if (paramInformation.has({ parameter, valueBitMask })) {
1238
+ return true;
1239
+ } else if (valueBitMask == void 0) {
1240
+ for (const key of paramInformation.keys()) {
1241
+ if (key.parameter === parameter)
1242
+ return true;
1243
+ }
1244
+ }
1245
+ return false;
1246
+ }
1247
+ /**
1248
+ * @internal
1249
+ * Stores config parameter metadata for this CC's node
1250
+ */
1251
+ extendParamInformation(ctx, parameter, valueBitMask, info) {
1252
+ if (valueBitMask === void 0 && this.paramExistsInConfigFile(ctx, parameter)) {
1253
+ return;
1254
+ }
1255
+ const metadata = this.getParamInformation(ctx, parameter, valueBitMask);
1256
+ Object.assign(metadata, info);
1257
+ this.setMetadata(ctx, ConfigurationCCValues.paramInformation(parameter, valueBitMask), metadata);
1258
+ }
1259
+ /**
1260
+ * @internal
1261
+ * Returns stored config parameter metadata for this CC's node
1262
+ */
1263
+ getParamInformation(ctx, parameter, valueBitMask) {
1264
+ return this.getMetadata(ctx, ConfigurationCCValues.paramInformation(parameter, valueBitMask)) ?? {
1265
+ ...import_safe.ValueMetadata.Any
1266
+ };
1267
+ }
1268
+ /**
1269
+ * **INTERNAL:** Returns the param info that was queried for this node. This returns the information that was returned by the node
1270
+ * and does not include partial parameters.
1271
+ */
1272
+ getQueriedParamInfos(ctx) {
1273
+ const parameters = (0, import_arrays.distinct)(this.getDefinedValueIDs(ctx).map((v) => v.property).filter((p) => typeof p === "number"));
1274
+ return (0, import_objects.composeObject)(parameters.map((p) => [
1275
+ p,
1276
+ this.getParamInformation(ctx, p)
1277
+ ]));
1278
+ }
1279
+ /**
1280
+ * Returns stored config parameter metadata for all partial config params addressed with the given parameter number
1281
+ */
1282
+ getPartialParamInfos(ctx, parameter) {
1283
+ const valueDB = this.getValueDB(ctx);
1284
+ return valueDB.findMetadata((id) => id.commandClass === this.ccId && (id.endpoint ?? 0) === this.endpointIndex && id.property === parameter && id.propertyKey != void 0);
1285
+ }
1286
+ /**
1287
+ * Computes the full value of a parameter after applying a partial param value
1288
+ */
1289
+ composePartialParamValue(ctx, parameter, bitMask, partialValue) {
1290
+ return this.composePartialParamValues(ctx, parameter, [
1291
+ { bitMask, partialValue }
1292
+ ]);
1293
+ }
1294
+ /**
1295
+ * Computes the full value of a parameter after applying multiple partial param values
1296
+ */
1297
+ composePartialParamValues(ctx, parameter, partials) {
1298
+ const valueDB = this.getValueDB(ctx);
1299
+ const otherValues = valueDB.findValues((id) => id.commandClass === this.ccId && (id.endpoint ?? 0) === this.endpointIndex && id.property === parameter && id.propertyKey != void 0 && !partials.some((p) => id.propertyKey === p.bitMask));
1300
+ let ret = 0;
1301
+ for (const { propertyKey: bitMask, value: partialValue } of otherValues) {
1302
+ ret = (0, import_safe.encodePartial)(ret, partialValue, bitMask);
1303
+ }
1304
+ for (const { bitMask, partialValue } of partials) {
1305
+ ret = (0, import_safe.encodePartial)(ret, partialValue, bitMask);
1306
+ }
1307
+ return ret;
1308
+ }
1309
+ /** Deserializes the config parameter info from a config file */
1310
+ deserializeParamInformationFromConfig(ctx, config) {
1311
+ const valueDB = this.getValueDB(ctx);
1312
+ for (const meta of valueDB.getAllMetadata(this.ccId)) {
1313
+ if (typeof meta.property === "number" && (meta.endpoint ?? 0) === this.endpointIndex) {
1314
+ valueDB.setMetadata(
1315
+ meta,
1316
+ void 0,
1317
+ // Don't emit the added/updated events, as this will spam applications with untranslated events
1318
+ { noEvent: true }
1319
+ );
1320
+ }
1321
+ }
1322
+ this.setValue(ctx, ConfigurationCCValues.isParamInformationFromConfig, false);
1323
+ for (const [param, info] of config.entries()) {
1324
+ const paramInfo = (0, import_safe.stripUndefined)({
1325
+ // TODO: Make this smarter! (0...1 ==> boolean)
1326
+ type: "number",
1327
+ valueSize: info.valueSize,
1328
+ min: info.minValue,
1329
+ max: info.maxValue,
1330
+ default: info.defaultValue,
1331
+ unit: info.unit,
1332
+ format: info.unsigned ? import_safe.ConfigValueFormat.UnsignedInteger : import_safe.ConfigValueFormat.SignedInteger,
1333
+ readable: !info.writeOnly,
1334
+ writeable: !info.readOnly,
1335
+ allowManualEntry: info.allowManualEntry,
1336
+ states: info.options.length > 0 ? (0, import_objects.composeObject)(info.options.map(({ label, value }) => [
1337
+ value.toString(),
1338
+ label
1339
+ ])) : void 0,
1340
+ label: info.label,
1341
+ description: info.description,
1342
+ isFromConfig: true
1343
+ });
1344
+ this.extendParamInformation(ctx, param.parameter, param.valueBitMask, paramInfo);
1345
+ }
1346
+ this.setValue(ctx, ConfigurationCCValues.isParamInformationFromConfig, true);
1347
+ }
1348
+ translatePropertyKey(ctx, property, propertyKey) {
1349
+ if (typeof property === "number" && (propertyKey == void 0 || typeof propertyKey === "number")) {
1350
+ return void 0;
1351
+ }
1352
+ return super.translateProperty(ctx, property, propertyKey);
1353
+ }
1354
+ translateProperty(ctx, property, propertyKey) {
1355
+ if (typeof property === "number" && (propertyKey == void 0 || typeof propertyKey === "number")) {
1356
+ const paramInfo = this.getParamInformation(ctx, property, propertyKey);
1357
+ if (paramInfo.label)
1358
+ return paramInfo.label;
1359
+ let ret = `param${(0, import_strings.padStart)(property.toString(), 3, "0")}`;
1360
+ if (propertyKey != void 0) {
1361
+ ret += "_" + propertyKey.toString();
1362
+ }
1363
+ return ret;
1364
+ }
1365
+ return super.translateProperty(ctx, property, propertyKey);
1366
+ }
1367
+ };
1368
+ return ConfigurationCC2 = _classThis;
1369
+ })();
1370
+ let ConfigurationCCReport = (() => {
1371
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Report)];
1372
+ let _classDescriptor;
1373
+ let _classExtraInitializers = [];
1374
+ let _classThis;
1375
+ let _classSuper = ConfigurationCC;
1376
+ var ConfigurationCCReport2 = class extends _classSuper {
1377
+ static {
1378
+ _classThis = this;
1379
+ }
1380
+ static {
1381
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1382
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1383
+ ConfigurationCCReport2 = _classThis = _classDescriptor.value;
1384
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1385
+ __runInitializers(_classThis, _classExtraInitializers);
1386
+ }
1387
+ constructor(options) {
1388
+ super(options);
1389
+ this.parameter = options.parameter;
1390
+ this.value = options.value;
1391
+ this.valueSize = options.valueSize;
1392
+ this.valueFormat = options.valueFormat;
1393
+ }
1394
+ static from(raw, ctx) {
1395
+ (0, import_safe.validatePayload)(raw.payload.length > 2);
1396
+ const parameter = raw.payload[0];
1397
+ const valueSize = raw.payload[1] & 7;
1398
+ (0, import_safe.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
1399
+ const value = parseValue(raw.payload.subarray(2), valueSize, import_safe.ConfigValueFormat.SignedInteger);
1400
+ return new this({
1401
+ nodeId: ctx.sourceNodeId,
1402
+ parameter,
1403
+ valueSize,
1404
+ value
1405
+ });
1406
+ }
1407
+ parameter;
1408
+ value;
1409
+ valueSize;
1410
+ valueFormat;
1411
+ // only used for serialization
1412
+ persistValues(ctx) {
1413
+ if (!super.persistValues(ctx))
1414
+ return false;
1415
+ const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
1416
+ const partialParams = this.getPartialParamInfos(ctx, this.parameter);
1417
+ let cachedValueFormat;
1418
+ if (partialParams.length > 0) {
1419
+ cachedValueFormat = partialParams[0].metadata.format;
1420
+ } else {
1421
+ const oldParamInformation = this.getParamInformation(ctx, this.parameter);
1422
+ cachedValueFormat = oldParamInformation.format;
1423
+ this.extendParamInformation(ctx, this.parameter, void 0, {
1424
+ valueSize: this.valueSize
1425
+ });
1426
+ if (ccVersion < 3 && !this.paramExistsInConfigFile(ctx, this.parameter) && oldParamInformation.min == void 0 && oldParamInformation.max == void 0) {
1427
+ const isSigned = oldParamInformation.format == void 0 || oldParamInformation.format === import_safe.ConfigValueFormat.SignedInteger;
1428
+ this.extendParamInformation(ctx, this.parameter, void 0, (0, import_safe.getIntegerLimits)(this.valueSize, isSigned));
1429
+ }
1430
+ }
1431
+ if (cachedValueFormat != void 0 && cachedValueFormat !== import_safe.ConfigValueFormat.SignedInteger) {
1432
+ this.value = reInterpretSignedValue(this.value, this.valueSize, cachedValueFormat);
1433
+ }
1434
+ if (partialParams.length > 0) {
1435
+ for (const param of partialParams) {
1436
+ if (typeof param.propertyKey === "number") {
1437
+ this.setValue(ctx, ConfigurationCCValues.paramInformation(this.parameter, param.propertyKey), (0, import_safe.parsePartial)(this.value, param.propertyKey, isSignedPartial(param.propertyKey, param.metadata.format)));
1438
+ }
1439
+ }
1440
+ } else {
1441
+ this.setValue(ctx, ConfigurationCCValues.paramInformation(this.parameter), this.value);
1442
+ }
1443
+ return true;
1444
+ }
1445
+ serialize(ctx) {
1446
+ this.payload = import_safe2.Bytes.concat([
1447
+ import_safe2.Bytes.from([this.parameter, this.valueSize & 7]),
1448
+ new import_safe2.Bytes(this.valueSize)
1449
+ ]);
1450
+ serializeValue(this.payload, 2, this.valueSize, this.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger, this.value);
1451
+ return super.serialize(ctx);
1452
+ }
1453
+ toLogEntry(ctx) {
1454
+ return {
1455
+ ...super.toLogEntry(ctx),
1456
+ message: {
1457
+ "parameter #": this.parameter,
1458
+ "value size": this.valueSize,
1459
+ value: configValueToString(this.value)
1460
+ }
1461
+ };
1462
+ }
1463
+ };
1464
+ return ConfigurationCCReport2 = _classThis;
1465
+ })();
1466
+ function testResponseForConfigurationGet(sent, received) {
1467
+ return sent.parameter === received.parameter || sent.allowUnexpectedResponse;
1468
+ }
1469
+ let ConfigurationCCGet = (() => {
1470
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCReport, testResponseForConfigurationGet)];
1471
+ let _classDescriptor;
1472
+ let _classExtraInitializers = [];
1473
+ let _classThis;
1474
+ let _classSuper = ConfigurationCC;
1475
+ var ConfigurationCCGet2 = class extends _classSuper {
1476
+ static {
1477
+ _classThis = this;
1478
+ }
1479
+ static {
1480
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1481
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1482
+ ConfigurationCCGet2 = _classThis = _classDescriptor.value;
1483
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1484
+ __runInitializers(_classThis, _classExtraInitializers);
1485
+ }
1486
+ constructor(options) {
1487
+ super(options);
1488
+ this.parameter = options.parameter;
1489
+ this.allowUnexpectedResponse = options.allowUnexpectedResponse ?? false;
1490
+ }
1491
+ static from(raw, ctx) {
1492
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1493
+ const parameter = raw.payload[0];
1494
+ return new this({
1495
+ nodeId: ctx.sourceNodeId,
1496
+ parameter
1497
+ });
1498
+ }
1499
+ parameter;
1500
+ allowUnexpectedResponse;
1501
+ serialize(ctx) {
1502
+ this.payload = import_safe2.Bytes.from([this.parameter]);
1503
+ return super.serialize(ctx);
1504
+ }
1505
+ toLogEntry(ctx) {
1506
+ return {
1507
+ ...super.toLogEntry(ctx),
1508
+ message: { "parameter #": this.parameter }
1509
+ };
1510
+ }
1511
+ };
1512
+ return ConfigurationCCGet2 = _classThis;
1513
+ })();
1514
+ let ConfigurationCCSet = (() => {
1515
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
1516
+ let _classDescriptor;
1517
+ let _classExtraInitializers = [];
1518
+ let _classThis;
1519
+ let _classSuper = ConfigurationCC;
1520
+ var ConfigurationCCSet2 = class extends _classSuper {
1521
+ static {
1522
+ _classThis = this;
1523
+ }
1524
+ static {
1525
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1526
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1527
+ ConfigurationCCSet2 = _classThis = _classDescriptor.value;
1528
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1529
+ __runInitializers(_classThis, _classExtraInitializers);
1530
+ }
1531
+ constructor(options) {
1532
+ super(options);
1533
+ this.parameter = options.parameter;
1534
+ this.resetToDefault = !!options.resetToDefault;
1535
+ if (!options.resetToDefault) {
1536
+ this.valueSize = options.valueSize;
1537
+ this.valueFormat = options.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger;
1538
+ this.value = options.value;
1539
+ }
1540
+ }
1541
+ static from(raw, ctx) {
1542
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
1543
+ const parameter = raw.payload[0];
1544
+ const resetToDefault = !!(raw.payload[1] & 128);
1545
+ const valueSize = raw.payload[1] & 7;
1546
+ (0, import_safe.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
1547
+ const value = parseValue(raw.payload.subarray(2), valueSize, import_safe.ConfigValueFormat.SignedInteger);
1548
+ return new this({
1549
+ nodeId: ctx.sourceNodeId,
1550
+ parameter,
1551
+ resetToDefault,
1552
+ valueSize,
1553
+ value
1554
+ });
1555
+ }
1556
+ resetToDefault;
1557
+ parameter;
1558
+ valueSize;
1559
+ valueFormat;
1560
+ value;
1561
+ serialize(ctx) {
1562
+ const valueSize = this.resetToDefault ? 1 : this.valueSize;
1563
+ const payloadLength = 2 + valueSize;
1564
+ this.payload = import_safe2.Bytes.alloc(payloadLength, 0);
1565
+ this.payload[0] = this.parameter;
1566
+ this.payload[1] = (this.resetToDefault ? 128 : 0) | valueSize & 7;
1567
+ if (!this.resetToDefault) {
1568
+ if (typeof this.value === "number" && !isSafeValue(this.value, valueSize, this.valueFormat)) {
1569
+ throwInvalidValueError(this.value, this.parameter, valueSize, this.valueFormat);
1570
+ }
1571
+ try {
1572
+ serializeValue(this.payload, 2, valueSize, this.valueFormat, this.value);
1573
+ } catch (e) {
1574
+ tryCatchOutOfBoundsError(e, this.value, this.parameter, valueSize, this.valueFormat);
1575
+ }
1576
+ }
1577
+ return super.serialize(ctx);
1578
+ }
1579
+ toLogEntry(ctx) {
1580
+ const message = {
1581
+ "parameter #": this.parameter,
1582
+ "reset to default": this.resetToDefault
1583
+ };
1584
+ if (this.valueSize != void 0) {
1585
+ message["value size"] = this.valueSize;
1586
+ }
1587
+ if (this.valueFormat != void 0) {
1588
+ message["value format"] = (0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, this.valueFormat);
1589
+ }
1590
+ if (this.value != void 0) {
1591
+ message.value = configValueToString(this.value);
1592
+ }
1593
+ return {
1594
+ ...super.toLogEntry(ctx),
1595
+ message
1596
+ };
1597
+ }
1598
+ };
1599
+ return ConfigurationCCSet2 = _classThis;
1600
+ })();
1601
+ function getResponseForBulkSet(cc) {
1602
+ return cc.handshake ? ConfigurationCCBulkReport : void 0;
1603
+ }
1604
+ let ConfigurationCCBulkSet = (() => {
1605
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkSet), (0, import_CommandClassDecorators.expectedCCResponse)(getResponseForBulkSet), (0, import_CommandClassDecorators.useSupervision)()];
1606
+ let _classDescriptor;
1607
+ let _classExtraInitializers = [];
1608
+ let _classThis;
1609
+ let _classSuper = ConfigurationCC;
1610
+ var ConfigurationCCBulkSet2 = class extends _classSuper {
1611
+ static {
1612
+ _classThis = this;
1613
+ }
1614
+ static {
1615
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1616
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1617
+ ConfigurationCCBulkSet2 = _classThis = _classDescriptor.value;
1618
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1619
+ __runInitializers(_classThis, _classExtraInitializers);
1620
+ }
1621
+ constructor(options) {
1622
+ super(options);
1623
+ this._parameters = options.parameters;
1624
+ if (this._parameters.length < 1) {
1625
+ throw new import_safe.ZWaveError(`In a ConfigurationCC.BulkSet, parameters must be a non-empty array`, import_safe.ZWaveErrorCodes.CC_Invalid);
1626
+ } else if (!(0, import_safe.isConsecutiveArray)(this._parameters)) {
1627
+ throw new import_safe.ZWaveError(`A ConfigurationCC.BulkSet can only be used for consecutive parameters`, import_safe.ZWaveErrorCodes.CC_Invalid);
1628
+ }
1629
+ this._handshake = !!options.handshake;
1630
+ this._resetToDefault = !!options.resetToDefault;
1631
+ if (!!options.resetToDefault) {
1632
+ this._valueSize = 1;
1633
+ this._valueFormat = import_safe.ConfigValueFormat.SignedInteger;
1634
+ this._values = this._parameters.map(() => 0);
1635
+ } else {
1636
+ this._valueSize = options.valueSize;
1637
+ this._valueFormat = options.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger;
1638
+ this._values = options.values;
1639
+ }
1640
+ }
1641
+ static from(_raw, _ctx) {
1642
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
1643
+ }
1644
+ _parameters;
1645
+ get parameters() {
1646
+ return this._parameters;
1647
+ }
1648
+ _resetToDefault;
1649
+ get resetToDefault() {
1650
+ return this._resetToDefault;
1651
+ }
1652
+ _valueSize;
1653
+ get valueSize() {
1654
+ return this._valueSize;
1655
+ }
1656
+ _valueFormat;
1657
+ get valueFormat() {
1658
+ return this._valueFormat;
1659
+ }
1660
+ _values;
1661
+ get values() {
1662
+ return this._values;
1663
+ }
1664
+ _handshake;
1665
+ get handshake() {
1666
+ return this._handshake;
1667
+ }
1668
+ serialize(ctx) {
1669
+ const valueSize = this._resetToDefault ? 1 : this.valueSize;
1670
+ const payloadLength = 4 + valueSize * this.parameters.length;
1671
+ this.payload = import_safe2.Bytes.alloc(payloadLength, 0);
1672
+ this.payload.writeUInt16BE(this.parameters[0], 0);
1673
+ this.payload[2] = this.parameters.length;
1674
+ this.payload[3] = (this._resetToDefault ? 128 : 0) | (this.handshake ? 64 : 0) | valueSize & 7;
1675
+ if (!this._resetToDefault) {
1676
+ for (let i = 0; i < this.parameters.length; i++) {
1677
+ const value = this._values[i];
1678
+ const param = this._parameters[i];
1679
+ if (!isSafeValue(value, valueSize, this._valueFormat)) {
1680
+ throwInvalidValueError(value, param, valueSize, this._valueFormat);
1681
+ }
1682
+ try {
1683
+ serializeValue(this.payload, 4 + i * valueSize, valueSize, this._valueFormat, value);
1684
+ } catch (e) {
1685
+ tryCatchOutOfBoundsError(e, value, param, valueSize, this._valueFormat);
1686
+ }
1687
+ }
1688
+ }
1689
+ return super.serialize(ctx);
1690
+ }
1691
+ toLogEntry(ctx) {
1692
+ const message = {
1693
+ handshake: this.handshake,
1694
+ "reset to default": this.resetToDefault,
1695
+ "value size": this.valueSize
1696
+ };
1697
+ if (this._values.length > 0) {
1698
+ message.values = this._values.map((value, i) => `
1699
+ \xB7 #${this._parameters[i]}: ${configValueToString(value)}`).join("");
1700
+ }
1701
+ return {
1702
+ ...super.toLogEntry(ctx),
1703
+ message
1704
+ };
1705
+ }
1706
+ };
1707
+ return ConfigurationCCBulkSet2 = _classThis;
1708
+ })();
1709
+ let ConfigurationCCBulkReport = (() => {
1710
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkReport)];
1711
+ let _classDescriptor;
1712
+ let _classExtraInitializers = [];
1713
+ let _classThis;
1714
+ let _classSuper = ConfigurationCC;
1715
+ var ConfigurationCCBulkReport2 = class extends _classSuper {
1716
+ static {
1717
+ _classThis = this;
1718
+ }
1719
+ static {
1720
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1721
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1722
+ ConfigurationCCBulkReport2 = _classThis = _classDescriptor.value;
1723
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1724
+ __runInitializers(_classThis, _classExtraInitializers);
1725
+ }
1726
+ constructor(options) {
1727
+ super(options);
1728
+ this.reportsToFollow = options.reportsToFollow;
1729
+ this.defaultValues = options.defaultValues;
1730
+ this.isHandshakeResponse = options.isHandshakeResponse;
1731
+ this.valueSize = options.valueSize;
1732
+ for (const [param, value] of Object.entries(options.values)) {
1733
+ this._values.set(parseInt(param), value);
1734
+ }
1735
+ }
1736
+ static from(raw, ctx) {
1737
+ (0, import_safe.validatePayload)(raw.payload.length >= 5);
1738
+ const firstParameter = raw.payload.readUInt16BE(0);
1739
+ const numParams = raw.payload[2];
1740
+ const reportsToFollow = raw.payload[3];
1741
+ const defaultValues = !!(raw.payload[4] & 128);
1742
+ const isHandshakeResponse = !!(raw.payload[4] & 64);
1743
+ const valueSize = raw.payload[4] & 7;
1744
+ (0, import_safe.validatePayload)(raw.payload.length >= 5 + numParams * valueSize);
1745
+ const values = {};
1746
+ for (let i = 0; i < numParams; i++) {
1747
+ const param = firstParameter + i;
1748
+ values[param] = parseValue(raw.payload.subarray(5 + i * valueSize), valueSize, import_safe.ConfigValueFormat.SignedInteger);
1749
+ }
1750
+ return new this({
1751
+ nodeId: ctx.sourceNodeId,
1752
+ reportsToFollow,
1753
+ defaultValues,
1754
+ isHandshakeResponse,
1755
+ valueSize,
1756
+ values
1757
+ });
1758
+ }
1759
+ persistValues(ctx) {
1760
+ if (!super.persistValues(ctx))
1761
+ return false;
1762
+ for (let [parameter, value] of this._values.entries()) {
1763
+ const oldParamInformation = this.getParamInformation(ctx, parameter);
1764
+ if (oldParamInformation.format != void 0 && oldParamInformation.format !== import_safe.ConfigValueFormat.SignedInteger) {
1765
+ value = reInterpretSignedValue(value, this.valueSize, oldParamInformation.format);
1766
+ this._values.set(parameter, value);
1767
+ }
1768
+ this.setValue(ctx, ConfigurationCCValues.paramInformation(parameter), value);
1769
+ }
1770
+ return true;
1771
+ }
1772
+ reportsToFollow;
1773
+ defaultValues;
1774
+ isHandshakeResponse;
1775
+ valueSize;
1776
+ _values = /* @__PURE__ */ new Map();
1777
+ get values() {
1778
+ return this._values;
1779
+ }
1780
+ getPartialCCSessionId() {
1781
+ return {};
1782
+ }
1783
+ expectMoreMessages() {
1784
+ return this.reportsToFollow > 0;
1785
+ }
1786
+ toLogEntry(ctx) {
1787
+ const message = {
1788
+ "handshake response": this.isHandshakeResponse,
1789
+ "default values": this.defaultValues,
1790
+ "value size": this.valueSize,
1791
+ "reports to follow": this.reportsToFollow
1792
+ };
1793
+ if (this._values.size > 0) {
1794
+ message.values = [...this._values].map(([param, value]) => `
1795
+ \xB7 #${param}: ${configValueToString(value)}`).join("");
1796
+ }
1797
+ return {
1798
+ ...super.toLogEntry(ctx),
1799
+ message
1800
+ };
1801
+ }
1802
+ };
1803
+ return ConfigurationCCBulkReport2 = _classThis;
1804
+ })();
1805
+ let ConfigurationCCBulkGet = (() => {
1806
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkGet), (0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCBulkReport)];
1807
+ let _classDescriptor;
1808
+ let _classExtraInitializers = [];
1809
+ let _classThis;
1810
+ let _classSuper = ConfigurationCC;
1811
+ var ConfigurationCCBulkGet2 = class extends _classSuper {
1812
+ static {
1813
+ _classThis = this;
1814
+ }
1815
+ static {
1816
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1817
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1818
+ ConfigurationCCBulkGet2 = _classThis = _classDescriptor.value;
1819
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1820
+ __runInitializers(_classThis, _classExtraInitializers);
1821
+ }
1822
+ constructor(options) {
1823
+ super(options);
1824
+ this._parameters = options.parameters.sort();
1825
+ if (!(0, import_safe.isConsecutiveArray)(this.parameters)) {
1826
+ throw new import_safe.ZWaveError(`A ConfigurationCC.BulkGet can only be used for consecutive parameters`, import_safe.ZWaveErrorCodes.CC_Invalid);
1827
+ }
1828
+ }
1829
+ static from(_raw, _ctx) {
1830
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
1831
+ }
1832
+ _parameters;
1833
+ get parameters() {
1834
+ return this._parameters;
1835
+ }
1836
+ serialize(ctx) {
1837
+ this.payload = new import_safe2.Bytes(3);
1838
+ this.payload.writeUInt16BE(this.parameters[0], 0);
1839
+ this.payload[2] = this.parameters.length;
1840
+ return super.serialize(ctx);
1841
+ }
1842
+ toLogEntry(ctx) {
1843
+ return {
1844
+ ...super.toLogEntry(ctx),
1845
+ message: { parameters: this.parameters.join(", ") }
1846
+ };
1847
+ }
1848
+ };
1849
+ return ConfigurationCCBulkGet2 = _classThis;
1850
+ })();
1851
+ let ConfigurationCCNameReport = (() => {
1852
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.NameReport)];
1853
+ let _classDescriptor;
1854
+ let _classExtraInitializers = [];
1855
+ let _classThis;
1856
+ let _classSuper = ConfigurationCC;
1857
+ var ConfigurationCCNameReport2 = class extends _classSuper {
1858
+ static {
1859
+ _classThis = this;
1860
+ }
1861
+ static {
1862
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1863
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1864
+ ConfigurationCCNameReport2 = _classThis = _classDescriptor.value;
1865
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1866
+ __runInitializers(_classThis, _classExtraInitializers);
1867
+ }
1868
+ constructor(options) {
1869
+ super(options);
1870
+ this.parameter = options.parameter;
1871
+ this.name = options.name;
1872
+ this.reportsToFollow = options.reportsToFollow;
1873
+ }
1874
+ static from(raw, ctx) {
1875
+ (0, import_safe.validatePayload)(raw.payload.length >= 3);
1876
+ const parameter = raw.payload.readUInt16BE(0);
1877
+ const reportsToFollow = raw.payload[2];
1878
+ if (reportsToFollow > 0) {
1879
+ (0, import_safe.validatePayload)(raw.payload.length >= 4);
1880
+ }
1881
+ const name = raw.payload.subarray(3).toString("utf8");
1882
+ return new this({
1883
+ nodeId: ctx.sourceNodeId,
1884
+ parameter,
1885
+ reportsToFollow,
1886
+ name
1887
+ });
1888
+ }
1889
+ parameter;
1890
+ name;
1891
+ reportsToFollow;
1892
+ persistValues(ctx) {
1893
+ if (!super.persistValues(ctx))
1894
+ return false;
1895
+ const partialParams = this.getPartialParamInfos(ctx, this.parameter);
1896
+ if (partialParams.length === 0) {
1897
+ this.extendParamInformation(ctx, this.parameter, void 0, {
1898
+ label: this.name
1899
+ });
1900
+ } else {
1901
+ for (const param of partialParams) {
1902
+ const paramNumber = param.property;
1903
+ const bitMask = param.propertyKey;
1904
+ const bitNumber = Math.log2(bitMask) % 1 === 0 ? Math.log2(bitMask) : void 0;
1905
+ let label = `${this.name} - ${bitMask}`;
1906
+ if (bitNumber != void 0) {
1907
+ label += ` (bit ${bitNumber})`;
1908
+ }
1909
+ this.extendParamInformation(ctx, paramNumber, bitMask, {
1910
+ label
1911
+ });
1912
+ }
1913
+ }
1914
+ return true;
1915
+ }
1916
+ serialize(ctx) {
1917
+ const nameBuffer = import_safe2.Bytes.from(this.name, "utf8");
1918
+ this.payload = new import_safe2.Bytes(3 + nameBuffer.length);
1919
+ this.payload.writeUInt16BE(this.parameter, 0);
1920
+ this.payload[2] = this.reportsToFollow;
1921
+ this.payload.set(nameBuffer, 3);
1922
+ return super.serialize(ctx);
1923
+ }
1924
+ getPartialCCSessionId() {
1925
+ return { parameter: this.parameter };
1926
+ }
1927
+ expectMoreMessages() {
1928
+ return this.reportsToFollow > 0;
1929
+ }
1930
+ mergePartialCCs(partials, _ctx) {
1931
+ this.name = [...partials, this].map((report) => report.name).reduce((prev, cur) => prev + cur, "");
1932
+ }
1933
+ toLogEntry(ctx) {
1934
+ return {
1935
+ ...super.toLogEntry(ctx),
1936
+ message: {
1937
+ "parameter #": this.parameter,
1938
+ name: this.name,
1939
+ "reports to follow": this.reportsToFollow
1940
+ }
1941
+ };
1942
+ }
1943
+ };
1944
+ return ConfigurationCCNameReport2 = _classThis;
1945
+ })();
1946
+ let ConfigurationCCNameGet = (() => {
1947
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.NameGet), (0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCNameReport)];
1948
+ let _classDescriptor;
1949
+ let _classExtraInitializers = [];
1950
+ let _classThis;
1951
+ let _classSuper = ConfigurationCC;
1952
+ var ConfigurationCCNameGet2 = class extends _classSuper {
1953
+ static {
1954
+ _classThis = this;
1955
+ }
1956
+ static {
1957
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1958
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1959
+ ConfigurationCCNameGet2 = _classThis = _classDescriptor.value;
1960
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1961
+ __runInitializers(_classThis, _classExtraInitializers);
1962
+ }
1963
+ constructor(options) {
1964
+ super(options);
1965
+ this.parameter = options.parameter;
1966
+ }
1967
+ static from(raw, ctx) {
1968
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
1969
+ const parameter = raw.payload.readUInt16BE(0);
1970
+ return new this({
1971
+ nodeId: ctx.sourceNodeId,
1972
+ parameter
1973
+ });
1974
+ }
1975
+ parameter;
1976
+ serialize(ctx) {
1977
+ this.payload = new import_safe2.Bytes(2);
1978
+ this.payload.writeUInt16BE(this.parameter, 0);
1979
+ return super.serialize(ctx);
1980
+ }
1981
+ toLogEntry(ctx) {
1982
+ return {
1983
+ ...super.toLogEntry(ctx),
1984
+ message: { "parameter #": this.parameter }
1985
+ };
1986
+ }
1987
+ };
1988
+ return ConfigurationCCNameGet2 = _classThis;
1989
+ })();
1990
+ let ConfigurationCCInfoReport = (() => {
1991
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.InfoReport)];
1992
+ let _classDescriptor;
1993
+ let _classExtraInitializers = [];
1994
+ let _classThis;
1995
+ let _classSuper = ConfigurationCC;
1996
+ var ConfigurationCCInfoReport2 = class extends _classSuper {
1997
+ static {
1998
+ _classThis = this;
1999
+ }
2000
+ static {
2001
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2002
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2003
+ ConfigurationCCInfoReport2 = _classThis = _classDescriptor.value;
2004
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2005
+ __runInitializers(_classThis, _classExtraInitializers);
2006
+ }
2007
+ constructor(options) {
2008
+ super(options);
2009
+ this.parameter = options.parameter;
2010
+ this.info = options.info;
2011
+ this.reportsToFollow = options.reportsToFollow;
2012
+ }
2013
+ static from(raw, ctx) {
2014
+ (0, import_safe.validatePayload)(raw.payload.length >= 3);
2015
+ const parameter = raw.payload.readUInt16BE(0);
2016
+ const reportsToFollow = raw.payload[2];
2017
+ if (reportsToFollow > 0) {
2018
+ (0, import_safe.validatePayload)(raw.payload.length >= 4);
2019
+ }
2020
+ const info = raw.payload.subarray(3).toString("utf8");
2021
+ return new this({
2022
+ nodeId: ctx.sourceNodeId,
2023
+ parameter,
2024
+ reportsToFollow,
2025
+ info
2026
+ });
2027
+ }
2028
+ parameter;
2029
+ info;
2030
+ reportsToFollow;
2031
+ persistValues(ctx) {
2032
+ if (!super.persistValues(ctx))
2033
+ return false;
2034
+ const partialParams = this.getPartialParamInfos(ctx, this.parameter).sort((a, b) => (a.propertyKey ?? 0) - (b.propertyKey ?? 0));
2035
+ if (partialParams.length === 0) {
2036
+ this.extendParamInformation(ctx, this.parameter, void 0, {
2037
+ description: this.info
2038
+ });
2039
+ } else {
2040
+ let firstParamLabel;
2041
+ for (const param of partialParams) {
2042
+ const paramNumber = param.property;
2043
+ const bitMask = param.propertyKey;
2044
+ const description = firstParamLabel ? `Refer to ${firstParamLabel}` : this.info;
2045
+ this.extendParamInformation(ctx, paramNumber, bitMask, {
2046
+ description
2047
+ });
2048
+ if (firstParamLabel == void 0) {
2049
+ firstParamLabel = this.getParamInformation(ctx, paramNumber, bitMask).label ?? `parameter ${paramNumber} - ${bitMask}`;
2050
+ }
2051
+ }
2052
+ }
2053
+ return true;
2054
+ }
2055
+ serialize(ctx) {
2056
+ const infoBuffer = import_safe2.Bytes.from(this.info, "utf8");
2057
+ this.payload = new import_safe2.Bytes(3 + infoBuffer.length);
2058
+ this.payload.writeUInt16BE(this.parameter, 0);
2059
+ this.payload[2] = this.reportsToFollow;
2060
+ this.payload.set(infoBuffer, 3);
2061
+ return super.serialize(ctx);
2062
+ }
2063
+ getPartialCCSessionId() {
2064
+ return { parameter: this.parameter };
2065
+ }
2066
+ expectMoreMessages() {
2067
+ return this.reportsToFollow > 0;
2068
+ }
2069
+ mergePartialCCs(partials, _ctx) {
2070
+ this.info = [...partials, this].map((report) => report.info).reduce((prev, cur) => prev + cur, "");
2071
+ }
2072
+ toLogEntry(ctx) {
2073
+ return {
2074
+ ...super.toLogEntry(ctx),
2075
+ message: {
2076
+ "parameter #": this.parameter,
2077
+ info: this.info,
2078
+ "reports to follow": this.reportsToFollow
2079
+ }
2080
+ };
2081
+ }
2082
+ };
2083
+ return ConfigurationCCInfoReport2 = _classThis;
2084
+ })();
2085
+ let ConfigurationCCInfoGet = (() => {
2086
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.InfoGet), (0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCInfoReport)];
2087
+ let _classDescriptor;
2088
+ let _classExtraInitializers = [];
2089
+ let _classThis;
2090
+ let _classSuper = ConfigurationCC;
2091
+ var ConfigurationCCInfoGet2 = class extends _classSuper {
2092
+ static {
2093
+ _classThis = this;
2094
+ }
2095
+ static {
2096
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2097
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2098
+ ConfigurationCCInfoGet2 = _classThis = _classDescriptor.value;
2099
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2100
+ __runInitializers(_classThis, _classExtraInitializers);
2101
+ }
2102
+ constructor(options) {
2103
+ super(options);
2104
+ this.parameter = options.parameter;
2105
+ }
2106
+ static from(raw, ctx) {
2107
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
2108
+ const parameter = raw.payload.readUInt16BE(0);
2109
+ return new this({
2110
+ nodeId: ctx.sourceNodeId,
2111
+ parameter
2112
+ });
2113
+ }
2114
+ parameter;
2115
+ serialize(ctx) {
2116
+ this.payload = new import_safe2.Bytes(2);
2117
+ this.payload.writeUInt16BE(this.parameter, 0);
2118
+ return super.serialize(ctx);
2119
+ }
2120
+ toLogEntry(ctx) {
2121
+ return {
2122
+ ...super.toLogEntry(ctx),
2123
+ message: { "parameter #": this.parameter }
2124
+ };
2125
+ }
2126
+ };
2127
+ return ConfigurationCCInfoGet2 = _classThis;
2128
+ })();
2129
+ let ConfigurationCCPropertiesReport = (() => {
2130
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.PropertiesReport)];
2131
+ let _classDescriptor;
2132
+ let _classExtraInitializers = [];
2133
+ let _classThis;
2134
+ let _classSuper = ConfigurationCC;
2135
+ var ConfigurationCCPropertiesReport2 = class extends _classSuper {
2136
+ static {
2137
+ _classThis = this;
2138
+ }
2139
+ static {
2140
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2141
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2142
+ ConfigurationCCPropertiesReport2 = _classThis = _classDescriptor.value;
2143
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2144
+ __runInitializers(_classThis, _classExtraInitializers);
2145
+ }
2146
+ constructor(options) {
2147
+ super(options);
2148
+ this.parameter = options.parameter;
2149
+ this.valueSize = options.valueSize;
2150
+ this.valueFormat = options.valueFormat;
2151
+ if (this.valueSize > 0) {
2152
+ if (options.minValue == void 0) {
2153
+ throw new import_safe.ZWaveError("The minimum value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
2154
+ } else if (options.maxValue == void 0) {
2155
+ throw new import_safe.ZWaveError("The maximum value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
2156
+ } else if (options.defaultValue == void 0) {
2157
+ throw new import_safe.ZWaveError("The default value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
2158
+ }
2159
+ this.minValue = options.minValue;
2160
+ this.maxValue = options.maxValue;
2161
+ this.defaultValue = options.defaultValue;
2162
+ }
2163
+ this.nextParameter = options.nextParameter;
2164
+ this.altersCapabilities = options.altersCapabilities;
2165
+ this.isReadonly = options.isReadonly;
2166
+ this.isAdvanced = options.isAdvanced;
2167
+ this.noBulkSupport = options.noBulkSupport;
2168
+ }
2169
+ static from(raw, ctx) {
2170
+ (0, import_safe.validatePayload)(raw.payload.length >= 3);
2171
+ const parameter = raw.payload.readUInt16BE(0);
2172
+ const valueFormat = (raw.payload[2] & 56) >>> 3;
2173
+ const valueSize = raw.payload[2] & 7;
2174
+ let nextParameter;
2175
+ if (valueSize === 0 && raw.payload.length < 5) {
2176
+ nextParameter = 0;
2177
+ return new this({
2178
+ nodeId: ctx.sourceNodeId,
2179
+ parameter,
2180
+ valueFormat,
2181
+ valueSize,
2182
+ nextParameter
2183
+ });
2184
+ }
2185
+ const nextParameterOffset = 3 + 3 * valueSize;
2186
+ (0, import_safe.validatePayload)(raw.payload.length >= nextParameterOffset + 2);
2187
+ let minValue;
2188
+ let maxValue;
2189
+ let defaultValue;
2190
+ if (valueSize > 0) {
2191
+ if (valueFormat === import_safe.ConfigValueFormat.BitField) {
2192
+ minValue = 0;
2193
+ } else {
2194
+ minValue = parseValue(raw.payload.subarray(3), valueSize, valueFormat);
2195
+ }
2196
+ maxValue = parseValue(raw.payload.subarray(3 + valueSize), valueSize, valueFormat);
2197
+ defaultValue = parseValue(raw.payload.subarray(3 + 2 * valueSize), valueSize, valueFormat);
2198
+ }
2199
+ nextParameter = raw.payload.readUInt16BE(nextParameterOffset);
2200
+ let altersCapabilities;
2201
+ let isReadonly;
2202
+ let isAdvanced;
2203
+ let noBulkSupport;
2204
+ if (raw.payload.length >= nextParameterOffset + 3) {
2205
+ const options1 = raw.payload[2];
2206
+ const options2 = raw.payload[3 + 3 * valueSize + 2];
2207
+ altersCapabilities = !!(options1 & 128);
2208
+ isReadonly = !!(options1 & 64);
2209
+ isAdvanced = !!(options2 & 1);
2210
+ noBulkSupport = !!(options2 & 2);
2211
+ }
2212
+ return new this({
2213
+ nodeId: ctx.sourceNodeId,
2214
+ parameter,
2215
+ valueFormat,
2216
+ valueSize,
2217
+ nextParameter,
2218
+ minValue,
2219
+ maxValue,
2220
+ defaultValue,
2221
+ altersCapabilities,
2222
+ isReadonly,
2223
+ isAdvanced,
2224
+ noBulkSupport
2225
+ });
2226
+ }
2227
+ persistValues(ctx) {
2228
+ if (!super.persistValues(ctx))
2229
+ return false;
2230
+ if (this.valueSize > 0) {
2231
+ const baseInfo = {
2232
+ type: "number",
2233
+ format: this.valueFormat,
2234
+ valueSize: this.valueSize,
2235
+ requiresReInclusion: this.altersCapabilities,
2236
+ readable: true,
2237
+ writeable: !this.isReadonly,
2238
+ allowManualEntry: true,
2239
+ isAdvanced: this.isAdvanced,
2240
+ noBulkSupport: this.noBulkSupport,
2241
+ isFromConfig: false
2242
+ };
2243
+ if (this.valueFormat !== import_safe.ConfigValueFormat.BitField) {
2244
+ if (!this.paramExistsInConfigFile(ctx, this.parameter)) {
2245
+ const paramInfo = (0, import_safe.stripUndefined)({
2246
+ ...baseInfo,
2247
+ min: this.minValue,
2248
+ max: this.maxValue,
2249
+ default: this.defaultValue
2250
+ });
2251
+ this.extendParamInformation(ctx, this.parameter, void 0, paramInfo);
2252
+ }
2253
+ } else {
2254
+ const bits = this.maxValue;
2255
+ let mask = 1;
2256
+ while (mask <= bits) {
2257
+ if (
2258
+ // Only create partials that exist
2259
+ !!(mask & bits) && !this.paramExistsInConfigFile(ctx, this.parameter, mask)
2260
+ ) {
2261
+ const paramInfo = (0, import_safe.stripUndefined)({
2262
+ ...baseInfo,
2263
+ min: 0,
2264
+ max: 1,
2265
+ default: this.defaultValue & mask ? 1 : 0
2266
+ });
2267
+ this.extendParamInformation(ctx, this.parameter, mask, paramInfo);
2268
+ }
2269
+ mask *= 2;
2270
+ }
2271
+ }
2272
+ }
2273
+ return true;
2274
+ }
2275
+ parameter;
2276
+ valueSize;
2277
+ valueFormat;
2278
+ minValue;
2279
+ maxValue;
2280
+ defaultValue;
2281
+ nextParameter;
2282
+ altersCapabilities;
2283
+ isReadonly;
2284
+ isAdvanced;
2285
+ noBulkSupport;
2286
+ serialize(ctx) {
2287
+ this.payload = new import_safe2.Bytes(3 + 3 * this.valueSize + 2 + 1);
2288
+ this.payload.writeUInt16BE(this.parameter, 0);
2289
+ const options1 = (this.altersCapabilities ? 128 : 0) | (this.isReadonly ? 64 : 0) | (this.valueFormat & 7) << 3 | this.valueSize & 7;
2290
+ this.payload[2] = options1;
2291
+ let offset = 3;
2292
+ if (this.valueSize > 0) {
2293
+ serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.minValue);
2294
+ offset += this.valueSize;
2295
+ serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.maxValue);
2296
+ offset += this.valueSize;
2297
+ serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.defaultValue);
2298
+ offset += this.valueSize;
2299
+ }
2300
+ this.payload.writeUInt16BE(this.nextParameter, offset);
2301
+ offset += 2;
2302
+ const options2 = (this.isAdvanced ? 1 : 0) | (this.noBulkSupport ? 2 : 0);
2303
+ this.payload[offset] = options2;
2304
+ return super.serialize(ctx);
2305
+ }
2306
+ toLogEntry(ctx) {
2307
+ const message = {
2308
+ "parameter #": this.parameter,
2309
+ "next param #": this.nextParameter,
2310
+ "value size": this.valueSize,
2311
+ "value format": (0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, this.valueFormat)
2312
+ };
2313
+ if (this.minValue != void 0) {
2314
+ message["min value"] = configValueToString(this.minValue);
2315
+ }
2316
+ if (this.maxValue != void 0) {
2317
+ message["max value"] = configValueToString(this.maxValue);
2318
+ }
2319
+ if (this.defaultValue != void 0) {
2320
+ message["default value"] = configValueToString(this.defaultValue);
2321
+ }
2322
+ if (this.altersCapabilities != void 0) {
2323
+ message["alters capabilities"] = this.altersCapabilities;
2324
+ }
2325
+ if (this.isReadonly != void 0) {
2326
+ message.readonly = this.isReadonly;
2327
+ }
2328
+ if (this.isAdvanced != void 0) {
2329
+ message.advanced = this.isAdvanced;
2330
+ }
2331
+ if (this.noBulkSupport != void 0) {
2332
+ message["bulk support"] = !this.noBulkSupport;
2333
+ }
2334
+ return {
2335
+ ...super.toLogEntry(ctx),
2336
+ message
2337
+ };
2338
+ }
2339
+ };
2340
+ return ConfigurationCCPropertiesReport2 = _classThis;
2341
+ })();
2342
+ let ConfigurationCCPropertiesGet = (() => {
2343
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.PropertiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCPropertiesReport)];
2344
+ let _classDescriptor;
2345
+ let _classExtraInitializers = [];
2346
+ let _classThis;
2347
+ let _classSuper = ConfigurationCC;
2348
+ var ConfigurationCCPropertiesGet2 = class extends _classSuper {
2349
+ static {
2350
+ _classThis = this;
2351
+ }
2352
+ static {
2353
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2354
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2355
+ ConfigurationCCPropertiesGet2 = _classThis = _classDescriptor.value;
2356
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2357
+ __runInitializers(_classThis, _classExtraInitializers);
2358
+ }
2359
+ constructor(options) {
2360
+ super(options);
2361
+ this.parameter = options.parameter;
2362
+ }
2363
+ static from(raw, ctx) {
2364
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
2365
+ const parameter = raw.payload.readUInt16BE(0);
2366
+ return new this({
2367
+ nodeId: ctx.sourceNodeId,
2368
+ parameter
2369
+ });
2370
+ }
2371
+ parameter;
2372
+ serialize(ctx) {
2373
+ this.payload = new import_safe2.Bytes(2);
2374
+ this.payload.writeUInt16BE(this.parameter, 0);
2375
+ return super.serialize(ctx);
2376
+ }
2377
+ toLogEntry(ctx) {
2378
+ return {
2379
+ ...super.toLogEntry(ctx),
2380
+ message: { "parameter #": this.parameter }
2381
+ };
2382
+ }
2383
+ };
2384
+ return ConfigurationCCPropertiesGet2 = _classThis;
2385
+ })();
2386
+ let ConfigurationCCDefaultReset = (() => {
2387
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.DefaultReset)];
2388
+ let _classDescriptor;
2389
+ let _classExtraInitializers = [];
2390
+ let _classThis;
2391
+ let _classSuper = ConfigurationCC;
2392
+ var ConfigurationCCDefaultReset2 = class extends _classSuper {
2393
+ static {
2394
+ _classThis = this;
2395
+ }
2396
+ static {
2397
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2398
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2399
+ ConfigurationCCDefaultReset2 = _classThis = _classDescriptor.value;
2400
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2401
+ __runInitializers(_classThis, _classExtraInitializers);
2402
+ }
2403
+ };
2404
+ return ConfigurationCCDefaultReset2 = _classThis;
2405
+ })();
2406
+ function isSafeValue(value, size, format) {
2407
+ let minValue;
2408
+ let maxValue;
2409
+ switch (format) {
2410
+ case import_safe.ConfigValueFormat.SignedInteger:
2411
+ minValue = -Math.pow(2, 8 * size - 1);
2412
+ maxValue = Math.pow(2, 8 * size - 1) - 1;
2413
+ break;
2414
+ case import_safe.ConfigValueFormat.UnsignedInteger:
2415
+ case import_safe.ConfigValueFormat.Enumerated:
2416
+ case import_safe.ConfigValueFormat.BitField:
2417
+ minValue = 0;
2418
+ maxValue = Math.pow(2, 8 * size);
2419
+ break;
2420
+ default:
2421
+ throw new Error("not implemented");
2422
+ }
2423
+ return minValue <= value && value <= maxValue;
2424
+ }
2425
+ function parseValue(raw, size, format) {
2426
+ switch (format) {
2427
+ case import_safe.ConfigValueFormat.SignedInteger:
2428
+ return raw.readIntBE(0, size);
2429
+ case import_safe.ConfigValueFormat.UnsignedInteger:
2430
+ case import_safe.ConfigValueFormat.Enumerated:
2431
+ case import_safe.ConfigValueFormat.BitField:
2432
+ return raw.readUIntBE(0, size);
2433
+ }
2434
+ }
2435
+ function throwInvalidValueError(value, parameter, valueSize, valueFormat) {
2436
+ throw new import_safe.ZWaveError(`The value ${value} is invalid for configuration parameter ${parameter} (size = ${valueSize}, format = ${(0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, valueFormat)})!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
2437
+ }
2438
+ function tryCatchOutOfBoundsError(e, value, parameter, valueSize, valueFormat) {
2439
+ if (e.message.includes("out of bounds")) {
2440
+ throwInvalidValueError(value, parameter, valueSize, valueFormat);
2441
+ } else {
2442
+ throw e;
2443
+ }
2444
+ }
2445
+ function serializeValue(payload, offset, size, format, value) {
2446
+ switch (format) {
2447
+ case import_safe.ConfigValueFormat.SignedInteger:
2448
+ payload.writeIntBE(value, offset, size);
2449
+ return;
2450
+ case import_safe.ConfigValueFormat.UnsignedInteger:
2451
+ case import_safe.ConfigValueFormat.Enumerated:
2452
+ case import_safe.ConfigValueFormat.BitField:
2453
+ payload.writeUIntBE(value, offset, size);
2454
+ return;
2455
+ }
2456
+ }
2457
+ // Annotate the CommonJS export names for ESM import in node:
2458
+ 0 && (module.exports = {
2459
+ ConfigurationCC,
2460
+ ConfigurationCCAPI,
2461
+ ConfigurationCCBulkGet,
2462
+ ConfigurationCCBulkReport,
2463
+ ConfigurationCCBulkSet,
2464
+ ConfigurationCCDefaultReset,
2465
+ ConfigurationCCError,
2466
+ ConfigurationCCGet,
2467
+ ConfigurationCCInfoGet,
2468
+ ConfigurationCCInfoReport,
2469
+ ConfigurationCCNameGet,
2470
+ ConfigurationCCNameReport,
2471
+ ConfigurationCCPropertiesGet,
2472
+ ConfigurationCCPropertiesReport,
2473
+ ConfigurationCCReport,
2474
+ ConfigurationCCSet,
2475
+ ConfigurationCCValues
2476
+ });
2477
+ //# sourceMappingURL=ConfigurationCC.js.map