@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,2239 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ function __assertType(argName, typeName, boundHasError) {
36
+ const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
37
+ if (boundHasError()) {
38
+ throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
39
+ }
40
+ }
41
+ const __assertType__IrrigationCCSystemConfigSetOptions = $o => {
42
+ function _number($o) {
43
+ return typeof $o !== "number" ? {} : null;
44
+ }
45
+ function su__2__3_eu($o) {
46
+ return ![0, 1].includes($o) ? {} : null;
47
+ }
48
+ function _0($o) {
49
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
50
+ return {};
51
+ if ("masterValveDelay" in $o && $o["masterValveDelay"] !== undefined) {
52
+ const error = _number($o["masterValveDelay"]);
53
+ if (error)
54
+ return error;
55
+ }
56
+ else
57
+ return {};
58
+ if ("highPressureThreshold" in $o && $o["highPressureThreshold"] !== undefined) {
59
+ const error = _number($o["highPressureThreshold"]);
60
+ if (error)
61
+ return error;
62
+ }
63
+ else
64
+ return {};
65
+ if ("lowPressureThreshold" in $o && $o["lowPressureThreshold"] !== undefined) {
66
+ const error = _number($o["lowPressureThreshold"]);
67
+ if (error)
68
+ return error;
69
+ }
70
+ else
71
+ return {};
72
+ if ("rainSensorPolarity" in $o && $o["rainSensorPolarity"] !== undefined) {
73
+ const error = su__2__3_eu($o["rainSensorPolarity"]);
74
+ if (error)
75
+ return error;
76
+ }
77
+ if ("moistureSensorPolarity" in $o && $o["moistureSensorPolarity"] !== undefined) {
78
+ const error = su__2__3_eu($o["moistureSensorPolarity"]);
79
+ if (error)
80
+ return error;
81
+ }
82
+ return null;
83
+ }
84
+ return _0($o);
85
+ };
86
+ const __assertType__ValveId = $o => {
87
+ function _number($o) {
88
+ return typeof $o !== "number" ? {} : null;
89
+ }
90
+ function _2($o) {
91
+ return $o !== "master" ? {} : null;
92
+ }
93
+ function su__number__2_eu($o) {
94
+ const conditions = [_number, _2];
95
+ for (const condition of conditions) {
96
+ const error = condition($o);
97
+ if (!error)
98
+ return null;
99
+ }
100
+ return {};
101
+ }
102
+ return su__number__2_eu($o);
103
+ };
104
+ const __assertType__IrrigationCCValveConfigSetOptions = $o => {
105
+ function _number($o) {
106
+ return typeof $o !== "number" ? {} : null;
107
+ }
108
+ function _3($o) {
109
+ return $o !== "master" ? {} : null;
110
+ }
111
+ function su__number__3_eu($o) {
112
+ const conditions = [_number, _3];
113
+ for (const condition of conditions) {
114
+ const error = condition($o);
115
+ if (!error)
116
+ return null;
117
+ }
118
+ return {};
119
+ }
120
+ function _boolean($o) {
121
+ return typeof $o !== "boolean" ? {} : null;
122
+ }
123
+ function _0($o) {
124
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
125
+ return {};
126
+ if ("valveId" in $o && $o["valveId"] !== undefined) {
127
+ const error = su__number__3_eu($o["valveId"]);
128
+ if (error)
129
+ return error;
130
+ }
131
+ else
132
+ return {};
133
+ if ("nominalCurrentHighThreshold" in $o && $o["nominalCurrentHighThreshold"] !== undefined) {
134
+ const error = _number($o["nominalCurrentHighThreshold"]);
135
+ if (error)
136
+ return error;
137
+ }
138
+ else
139
+ return {};
140
+ if ("nominalCurrentLowThreshold" in $o && $o["nominalCurrentLowThreshold"] !== undefined) {
141
+ const error = _number($o["nominalCurrentLowThreshold"]);
142
+ if (error)
143
+ return error;
144
+ }
145
+ else
146
+ return {};
147
+ if ("maximumFlow" in $o && $o["maximumFlow"] !== undefined) {
148
+ const error = _number($o["maximumFlow"]);
149
+ if (error)
150
+ return error;
151
+ }
152
+ else
153
+ return {};
154
+ if ("highFlowThreshold" in $o && $o["highFlowThreshold"] !== undefined) {
155
+ const error = _number($o["highFlowThreshold"]);
156
+ if (error)
157
+ return error;
158
+ }
159
+ else
160
+ return {};
161
+ if ("lowFlowThreshold" in $o && $o["lowFlowThreshold"] !== undefined) {
162
+ const error = _number($o["lowFlowThreshold"]);
163
+ if (error)
164
+ return error;
165
+ }
166
+ else
167
+ return {};
168
+ if ("useRainSensor" in $o && $o["useRainSensor"] !== undefined) {
169
+ const error = _boolean($o["useRainSensor"]);
170
+ if (error)
171
+ return error;
172
+ }
173
+ else
174
+ return {};
175
+ if ("useMoistureSensor" in $o && $o["useMoistureSensor"] !== undefined) {
176
+ const error = _boolean($o["useMoistureSensor"]);
177
+ if (error)
178
+ return error;
179
+ }
180
+ else
181
+ return {};
182
+ return null;
183
+ }
184
+ return _0($o);
185
+ };
186
+ const __assertType__number = $o => {
187
+ function _number($o) {
188
+ return typeof $o !== "number" ? {} : null;
189
+ }
190
+ return _number($o);
191
+ };
192
+ const __assertType__sa__2_ea_2 = $o => {
193
+ function _number($o) {
194
+ return typeof $o !== "number" ? {} : null;
195
+ }
196
+ function _2($o) {
197
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
198
+ return {};
199
+ if ("valveId" in $o && $o["valveId"] !== undefined) {
200
+ const error = _number($o["valveId"]);
201
+ if (error)
202
+ return error;
203
+ }
204
+ else
205
+ return {};
206
+ if ("duration" in $o && $o["duration"] !== undefined) {
207
+ const error = _number($o["duration"]);
208
+ if (error)
209
+ return error;
210
+ }
211
+ else
212
+ return {};
213
+ return null;
214
+ }
215
+ function sa__2_ea_2($o) {
216
+ if (!Array.isArray($o))
217
+ return {};
218
+ for (let i = 0; i < $o.length; i++) {
219
+ const error = _2($o[i]);
220
+ if (error)
221
+ return error;
222
+ }
223
+ return null;
224
+ }
225
+ return sa__2_ea_2($o);
226
+ };
227
+ const __assertType__sa__number_ea_2 = $o => {
228
+ function _number($o) {
229
+ return typeof $o !== "number" ? {} : null;
230
+ }
231
+ function sa__number_ea_2($o) {
232
+ if (!Array.isArray($o))
233
+ return {};
234
+ for (let i = 0; i < $o.length; i++) {
235
+ const error = _number($o[i]);
236
+ if (error)
237
+ return error;
238
+ }
239
+ return null;
240
+ }
241
+ return sa__number_ea_2($o);
242
+ };
243
+ import { CommandClasses, MessagePriority, ValueMetadata, ZWaveError, ZWaveErrorCodes, encodeFloatWithScale, enumValuesToMetadataStates, parseFloatWithScale, validatePayload, } from "@zwave-js/core/safe";
244
+ import { Bytes } from "@zwave-js/shared/safe";
245
+ import { getEnumMemberName, pick } from "@zwave-js/shared/safe";
246
+ import { padStart } from "alcalzone-shared/strings/index.js";
247
+ import { CCAPI, POLL_VALUE, SET_VALUE, throwMissingPropertyKey, throwUnsupportedProperty, throwUnsupportedPropertyKey, throwWrongValueType, } from "../lib/API.js";
248
+ import { CommandClass, } from "../lib/CommandClass.js";
249
+ import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
250
+ import { V } from "../lib/Values.js";
251
+ import { IrrigationCommand, IrrigationSensorPolarity, ValveType, } from "../lib/_Types.js";
252
+ export const IrrigationCCValues = Object.freeze({
253
+ ...V.defineStaticCCValues(CommandClasses.Irrigation, {
254
+ ...V.staticProperty("numValves", undefined, { internal: true }),
255
+ ...V.staticProperty("numValveTables", undefined, { internal: true }),
256
+ ...V.staticProperty("supportsMasterValve", undefined, {
257
+ internal: true,
258
+ }),
259
+ ...V.staticProperty("maxValveTableSize", undefined, { internal: true }),
260
+ ...V.staticProperty("systemVoltage", {
261
+ ...ValueMetadata.ReadOnlyUInt8,
262
+ label: "System voltage",
263
+ unit: "V",
264
+ }),
265
+ ...V.staticProperty("masterValveDelay", {
266
+ ...ValueMetadata.UInt8,
267
+ label: "Master valve delay",
268
+ description: "The delay between turning on the master valve and turning on any zone valve",
269
+ unit: "seconds",
270
+ }),
271
+ ...V.staticProperty("flowSensorActive", {
272
+ ...ValueMetadata.ReadOnlyBoolean,
273
+ label: "Flow sensor active",
274
+ }),
275
+ ...V.staticProperty("pressureSensorActive", {
276
+ ...ValueMetadata.ReadOnlyBoolean,
277
+ label: "Pressure sensor active",
278
+ }),
279
+ ...V.staticProperty("rainSensorActive", {
280
+ ...ValueMetadata.ReadOnlyBoolean,
281
+ label: "Rain sensor attached and active",
282
+ }),
283
+ ...V.staticProperty("rainSensorPolarity", {
284
+ ...ValueMetadata.Number,
285
+ label: "Rain sensor polarity",
286
+ min: 0,
287
+ max: 1,
288
+ states: enumValuesToMetadataStates(IrrigationSensorPolarity),
289
+ }),
290
+ ...V.staticProperty("moistureSensorActive", {
291
+ ...ValueMetadata.ReadOnlyBoolean,
292
+ label: "Moisture sensor attached and active",
293
+ }),
294
+ ...V.staticProperty("moistureSensorPolarity", {
295
+ ...ValueMetadata.Number,
296
+ label: "Moisture sensor polarity",
297
+ min: 0,
298
+ max: 1,
299
+ states: enumValuesToMetadataStates(IrrigationSensorPolarity),
300
+ }),
301
+ ...V.staticProperty("flow", {
302
+ ...ValueMetadata.ReadOnlyNumber,
303
+ label: "Flow",
304
+ unit: "l/h",
305
+ }),
306
+ ...V.staticProperty("pressure", {
307
+ ...ValueMetadata.ReadOnlyNumber,
308
+ label: "Pressure",
309
+ unit: "kPa",
310
+ }),
311
+ ...V.staticProperty("shutoffDuration", {
312
+ ...ValueMetadata.ReadOnlyUInt8,
313
+ label: "Remaining shutoff duration",
314
+ unit: "hours",
315
+ }),
316
+ ...V.staticProperty("errorNotProgrammed", {
317
+ ...ValueMetadata.ReadOnlyBoolean,
318
+ label: "Error: device not programmed",
319
+ }),
320
+ ...V.staticProperty("errorEmergencyShutdown", {
321
+ ...ValueMetadata.ReadOnlyBoolean,
322
+ label: "Error: emergency shutdown",
323
+ }),
324
+ ...V.staticProperty("errorHighPressure", {
325
+ ...ValueMetadata.ReadOnlyBoolean,
326
+ label: "Error: high pressure",
327
+ }),
328
+ ...V.staticProperty("highPressureThreshold", {
329
+ ...ValueMetadata.Number,
330
+ label: "High pressure threshold",
331
+ unit: "kPa",
332
+ }),
333
+ ...V.staticProperty("errorLowPressure", {
334
+ ...ValueMetadata.ReadOnlyBoolean,
335
+ label: "Error: low pressure",
336
+ }),
337
+ ...V.staticProperty("lowPressureThreshold", {
338
+ ...ValueMetadata.Number,
339
+ label: "Low pressure threshold",
340
+ unit: "kPa",
341
+ }),
342
+ ...V.staticProperty("errorValve", {
343
+ ...ValueMetadata.ReadOnlyBoolean,
344
+ label: "Error: valve reporting error",
345
+ }),
346
+ ...V.staticProperty("masterValveOpen", {
347
+ ...ValueMetadata.ReadOnlyBoolean,
348
+ label: "Master valve is open",
349
+ }),
350
+ ...V.staticProperty("firstOpenZoneId", {
351
+ ...ValueMetadata.ReadOnlyNumber,
352
+ label: "First open zone valve ID",
353
+ }),
354
+ ...V.staticPropertyWithName("shutoffSystem", "shutoff", {
355
+ ...ValueMetadata.WriteOnlyBoolean,
356
+ label: `Shutoff system`,
357
+ states: {
358
+ true: "Shutoff",
359
+ },
360
+ }),
361
+ }),
362
+ ...V.defineDynamicCCValues(CommandClasses.Irrigation, {
363
+ ...V.dynamicPropertyAndKeyWithName("valveConnected", (valveId) => valveId, "valveConnected", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
364
+ && propertyKey === "valveConnected", (valveId) => ({
365
+ ...ValueMetadata.ReadOnlyBoolean,
366
+ label: `${valveIdToMetadataPrefix(valveId)}: Connected`,
367
+ })),
368
+ ...V.dynamicPropertyAndKeyWithName("nominalCurrent", (valveId) => valveId, "nominalCurrent", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
369
+ && propertyKey === "nominalCurrent", (valveId) => ({
370
+ ...ValueMetadata.ReadOnlyBoolean,
371
+ label: `${valveIdToMetadataPrefix(valveId)}: Nominal current`,
372
+ unit: "mA",
373
+ })),
374
+ ...V.dynamicPropertyAndKeyWithName("nominalCurrentHighThreshold", (valveId) => valveId, "nominalCurrentHighThreshold", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
375
+ && propertyKey === "nominalCurrentHighThreshold", (valveId) => ({
376
+ ...ValueMetadata.Number,
377
+ label: `${valveIdToMetadataPrefix(valveId)}: Nominal current - high threshold`,
378
+ min: 0,
379
+ max: 2550,
380
+ unit: "mA",
381
+ })),
382
+ ...V.dynamicPropertyAndKeyWithName("nominalCurrentLowThreshold", (valveId) => valveId, "nominalCurrentLowThreshold", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
383
+ && propertyKey === "nominalCurrentLowThreshold", (valveId) => ({
384
+ ...ValueMetadata.Number,
385
+ label: `${valveIdToMetadataPrefix(valveId)}: Nominal current - low threshold`,
386
+ min: 0,
387
+ max: 2550,
388
+ unit: "mA",
389
+ })),
390
+ ...V.dynamicPropertyAndKeyWithName("errorShortCircuit", (valveId) => valveId, "errorShortCircuit", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
391
+ && propertyKey === "errorShortCircuit", (valveId) => ({
392
+ ...ValueMetadata.ReadOnlyBoolean,
393
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Short circuit detected`,
394
+ })),
395
+ ...V.dynamicPropertyAndKeyWithName("errorHighCurrent", (valveId) => valveId, "errorHighCurrent", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
396
+ && propertyKey === "errorHighCurrent", (valveId) => ({
397
+ ...ValueMetadata.ReadOnlyBoolean,
398
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Current above high threshold`,
399
+ })),
400
+ ...V.dynamicPropertyAndKeyWithName("errorLowCurrent", (valveId) => valveId, "errorLowCurrent", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
401
+ && propertyKey === "errorLowCurrent", (valveId) => ({
402
+ ...ValueMetadata.ReadOnlyBoolean,
403
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Current below low threshold`,
404
+ })),
405
+ ...V.dynamicPropertyAndKeyWithName("maximumFlow", (valveId) => valveId, "maximumFlow", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
406
+ && propertyKey === "maximumFlow", (valveId) => ({
407
+ ...ValueMetadata.Number,
408
+ label: `${valveIdToMetadataPrefix(valveId)}: Maximum flow`,
409
+ min: 0,
410
+ unit: "l/h",
411
+ })),
412
+ ...V.dynamicPropertyAndKeyWithName("errorMaximumFlow", (valveId) => valveId, "errorMaximumFlow", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
413
+ && propertyKey === "errorMaximumFlow", (valveId) => ({
414
+ ...ValueMetadata.ReadOnlyBoolean,
415
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Maximum flow detected`,
416
+ })),
417
+ ...V.dynamicPropertyAndKeyWithName("highFlowThreshold", (valveId) => valveId, "highFlowThreshold", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
418
+ && propertyKey === "highFlowThreshold", (valveId) => ({
419
+ ...ValueMetadata.Number,
420
+ label: `${valveIdToMetadataPrefix(valveId)}: High flow threshold`,
421
+ min: 0,
422
+ unit: "l/h",
423
+ })),
424
+ ...V.dynamicPropertyAndKeyWithName("errorHighFlow", (valveId) => valveId, "errorHighFlow", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
425
+ && propertyKey === "errorHighFlow", (valveId) => ({
426
+ ...ValueMetadata.ReadOnlyBoolean,
427
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Flow above high threshold`,
428
+ })),
429
+ ...V.dynamicPropertyAndKeyWithName("lowFlowThreshold", (valveId) => valveId, "lowFlowThreshold", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
430
+ && propertyKey === "lowFlowThreshold", (valveId) => ({
431
+ ...ValueMetadata.Number,
432
+ label: `${valveIdToMetadataPrefix(valveId)}: Low flow threshold`,
433
+ min: 0,
434
+ unit: "l/h",
435
+ })),
436
+ ...V.dynamicPropertyAndKeyWithName("errorLowFlow", (valveId) => valveId, "errorLowFlow", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
437
+ && propertyKey === "errorLowFlow", (valveId) => ({
438
+ ...ValueMetadata.ReadOnlyBoolean,
439
+ label: `${valveIdToMetadataPrefix(valveId)}: Error - Flow below high threshold`,
440
+ })),
441
+ ...V.dynamicPropertyAndKeyWithName("useRainSensor", (valveId) => valveId, "useRainSensor", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
442
+ && propertyKey === "useRainSensor", (valveId) => ({
443
+ ...ValueMetadata.Boolean,
444
+ label: `${valveIdToMetadataPrefix(valveId)}: Use rain sensor`,
445
+ })),
446
+ ...V.dynamicPropertyAndKeyWithName("useMoistureSensor", (valveId) => valveId, "useMoistureSensor", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
447
+ && propertyKey === "useMoistureSensor", (valveId) => ({
448
+ ...ValueMetadata.Boolean,
449
+ label: `${valveIdToMetadataPrefix(valveId)}: Use moisture sensor`,
450
+ })),
451
+ ...V.dynamicPropertyAndKeyWithName("valveRunDuration", (valveId) => valveId, "duration", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
452
+ && propertyKey === "duration", (valveId) => ({
453
+ ...ValueMetadata.UInt16,
454
+ label: `${valveIdToMetadataPrefix(valveId)}: Run duration`,
455
+ min: 1,
456
+ unit: "s",
457
+ })),
458
+ ...V.dynamicPropertyAndKeyWithName("valveRunStartStop", (valveId) => valveId, "startStop", ({ property, propertyKey }) => (typeof property === "number" || property === "master")
459
+ && propertyKey === "startStop", (valveId) => ({
460
+ ...ValueMetadata.Boolean,
461
+ label: `${valveIdToMetadataPrefix(valveId)}: Start/Stop`,
462
+ states: {
463
+ true: "Start",
464
+ false: "Stop",
465
+ },
466
+ })),
467
+ }),
468
+ });
469
+ function valveIdToMetadataPrefix(valveId) {
470
+ if (valveId === "master")
471
+ return "Master valve";
472
+ return `Valve ${padStart(valveId.toString(), 3, "0")}`;
473
+ }
474
+ const systemConfigProperties = [
475
+ "masterValveDelay",
476
+ "highPressureThreshold",
477
+ "lowPressureThreshold",
478
+ "rainSensorPolarity",
479
+ "moistureSensorPolarity",
480
+ ];
481
+ const valveConfigPropertyKeys = [
482
+ "nominalCurrentHighThreshold",
483
+ "nominalCurrentLowThreshold",
484
+ "maximumFlow",
485
+ "highFlowThreshold",
486
+ "lowFlowThreshold",
487
+ "useRainSensor",
488
+ "useMoistureSensor",
489
+ ];
490
+ let IrrigationCCAPI = (() => {
491
+ let _classDecorators = [API(CommandClasses.Irrigation)];
492
+ let _classDescriptor;
493
+ let _classExtraInitializers = [];
494
+ let _classThis;
495
+ let _classSuper = CCAPI;
496
+ var IrrigationCCAPI = class extends _classSuper {
497
+ static { _classThis = this; }
498
+ static {
499
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
500
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
501
+ IrrigationCCAPI = _classThis = _classDescriptor.value;
502
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
503
+ __runInitializers(_classThis, _classExtraInitializers);
504
+ }
505
+ supportsCommand(cmd) {
506
+ switch (cmd) {
507
+ case IrrigationCommand.SystemInfoGet:
508
+ case IrrigationCommand.SystemStatusGet:
509
+ case IrrigationCommand.SystemConfigSet:
510
+ case IrrigationCommand.SystemConfigGet:
511
+ case IrrigationCommand.ValveInfoGet:
512
+ case IrrigationCommand.ValveConfigSet:
513
+ case IrrigationCommand.ValveConfigGet:
514
+ case IrrigationCommand.ValveRun:
515
+ case IrrigationCommand.ValveTableSet:
516
+ case IrrigationCommand.ValveTableGet:
517
+ case IrrigationCommand.ValveTableRun:
518
+ case IrrigationCommand.SystemShutoff:
519
+ // These are all mandatory in V1
520
+ return true;
521
+ }
522
+ return super.supportsCommand(cmd);
523
+ }
524
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
525
+ async getSystemInfo() {
526
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.SystemInfoGet);
527
+ const cc = new IrrigationCCSystemInfoGet({
528
+ nodeId: this.endpoint.nodeId,
529
+ endpointIndex: this.endpoint.index,
530
+ });
531
+ const response = await this.host.sendCommand(cc, this.commandOptions);
532
+ if (response) {
533
+ return pick(response, [
534
+ "numValves",
535
+ "numValveTables",
536
+ "supportsMasterValve",
537
+ "maxValveTableSize",
538
+ ]);
539
+ }
540
+ }
541
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
542
+ async getSystemStatus() {
543
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.SystemStatusGet);
544
+ const cc = new IrrigationCCSystemStatusGet({
545
+ nodeId: this.endpoint.nodeId,
546
+ endpointIndex: this.endpoint.index,
547
+ });
548
+ const response = await this.host.sendCommand(cc, this.commandOptions);
549
+ if (response) {
550
+ return pick(response, [
551
+ "systemVoltage",
552
+ "flowSensorActive",
553
+ "pressureSensorActive",
554
+ "rainSensorActive",
555
+ "moistureSensorActive",
556
+ "flow",
557
+ "pressure",
558
+ "shutoffDuration",
559
+ "errorNotProgrammed",
560
+ "errorEmergencyShutdown",
561
+ "errorHighPressure",
562
+ "errorLowPressure",
563
+ "errorValve",
564
+ "masterValveOpen",
565
+ "firstOpenZoneId",
566
+ ]);
567
+ }
568
+ }
569
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
570
+ async getSystemConfig() {
571
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.SystemConfigGet);
572
+ const cc = new IrrigationCCSystemConfigGet({
573
+ nodeId: this.endpoint.nodeId,
574
+ endpointIndex: this.endpoint.index,
575
+ });
576
+ const response = await this.host.sendCommand(cc, this.commandOptions);
577
+ if (response) {
578
+ return pick(response, [
579
+ "masterValveDelay",
580
+ "highPressureThreshold",
581
+ "lowPressureThreshold",
582
+ "rainSensorPolarity",
583
+ "moistureSensorPolarity",
584
+ ]);
585
+ }
586
+ }
587
+ async setSystemConfig(config) {
588
+ __assertType("config", "IrrigationCCSystemConfigSetOptions", __assertType__IrrigationCCSystemConfigSetOptions.bind(void 0, config));
589
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.SystemConfigSet);
590
+ const cc = new IrrigationCCSystemConfigSet({
591
+ nodeId: this.endpoint.nodeId,
592
+ endpointIndex: this.endpoint.index,
593
+ ...config,
594
+ });
595
+ return this.host.sendCommand(cc, this.commandOptions);
596
+ }
597
+ async getValveInfo(valveId) {
598
+ __assertType("valveId", "ValveId", __assertType__ValveId.bind(void 0, valveId));
599
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveInfoGet);
600
+ const cc = new IrrigationCCValveInfoGet({
601
+ nodeId: this.endpoint.nodeId,
602
+ endpointIndex: this.endpoint.index,
603
+ valveId,
604
+ });
605
+ const response = await this.host.sendCommand(cc, this.commandOptions);
606
+ if (response) {
607
+ return pick(response, [
608
+ "connected",
609
+ "nominalCurrent",
610
+ "errorShortCircuit",
611
+ "errorHighCurrent",
612
+ "errorLowCurrent",
613
+ "errorMaximumFlow",
614
+ "errorHighFlow",
615
+ "errorLowFlow",
616
+ ]);
617
+ }
618
+ }
619
+ async setValveConfig(options) {
620
+ __assertType("options", "IrrigationCCValveConfigSetOptions", __assertType__IrrigationCCValveConfigSetOptions.bind(void 0, options));
621
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveConfigSet);
622
+ const cc = new IrrigationCCValveConfigSet({
623
+ nodeId: this.endpoint.nodeId,
624
+ endpointIndex: this.endpoint.index,
625
+ ...options,
626
+ });
627
+ return this.host.sendCommand(cc, this.commandOptions);
628
+ }
629
+ async getValveConfig(valveId) {
630
+ __assertType("valveId", "ValveId", __assertType__ValveId.bind(void 0, valveId));
631
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveConfigGet);
632
+ const cc = new IrrigationCCValveConfigGet({
633
+ nodeId: this.endpoint.nodeId,
634
+ endpointIndex: this.endpoint.index,
635
+ valveId,
636
+ });
637
+ const response = await this.host.sendCommand(cc, this.commandOptions);
638
+ if (response) {
639
+ return pick(response, [
640
+ "nominalCurrentHighThreshold",
641
+ "nominalCurrentLowThreshold",
642
+ "maximumFlow",
643
+ "highFlowThreshold",
644
+ "lowFlowThreshold",
645
+ "useRainSensor",
646
+ "useMoistureSensor",
647
+ ]);
648
+ }
649
+ }
650
+ async runValve(valveId, duration) {
651
+ __assertType("valveId", "ValveId", __assertType__ValveId.bind(void 0, valveId));
652
+ __assertType("duration", "number", __assertType__number.bind(void 0, duration));
653
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveRun);
654
+ const cc = new IrrigationCCValveRun({
655
+ nodeId: this.endpoint.nodeId,
656
+ endpointIndex: this.endpoint.index,
657
+ valveId,
658
+ duration,
659
+ });
660
+ return this.host.sendCommand(cc, this.commandOptions);
661
+ }
662
+ shutoffValve(valveId) {
663
+ __assertType("valveId", "ValveId", __assertType__ValveId.bind(void 0, valveId));
664
+ return this.runValve(valveId, 0);
665
+ }
666
+ async setValveTable(tableId, entries) {
667
+ __assertType("tableId", "number", __assertType__number.bind(void 0, tableId));
668
+ __assertType("entries", undefined, __assertType__sa__2_ea_2.bind(void 0, entries));
669
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveTableSet);
670
+ if (!this.endpoint.virtual) {
671
+ const maxValveTableSize = IrrigationCC.getMaxValveTableSizeCached(this.host, this.endpoint);
672
+ if (maxValveTableSize != undefined
673
+ && entries.length > maxValveTableSize) {
674
+ throw new ZWaveError(`The number of valve table entries must not exceed ${maxValveTableSize}.`, ZWaveErrorCodes.Argument_Invalid);
675
+ }
676
+ }
677
+ const cc = new IrrigationCCValveTableSet({
678
+ nodeId: this.endpoint.nodeId,
679
+ endpointIndex: this.endpoint.index,
680
+ tableId,
681
+ entries,
682
+ });
683
+ return this.host.sendCommand(cc, this.commandOptions);
684
+ }
685
+ async getValveTable(tableId) {
686
+ __assertType("tableId", "number", __assertType__number.bind(void 0, tableId));
687
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveTableGet);
688
+ const cc = new IrrigationCCValveTableGet({
689
+ nodeId: this.endpoint.nodeId,
690
+ endpointIndex: this.endpoint.index,
691
+ tableId,
692
+ });
693
+ const response = await this.host.sendCommand(cc, this.commandOptions);
694
+ if (response) {
695
+ return response?.entries;
696
+ }
697
+ }
698
+ async runTables(tableIDs) {
699
+ __assertType("tableIDs", undefined, __assertType__sa__number_ea_2.bind(void 0, tableIDs));
700
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.ValveTableRun);
701
+ const cc = new IrrigationCCValveTableRun({
702
+ nodeId: this.endpoint.nodeId,
703
+ endpointIndex: this.endpoint.index,
704
+ tableIDs,
705
+ });
706
+ return this.host.sendCommand(cc, this.commandOptions);
707
+ }
708
+ /**
709
+ * Shuts off the entire system for the given duration.
710
+ * @param duration Shutoff duration in hours. A value of 255 will shut off the entire system permanently and prevents schedules from running.
711
+ */
712
+ async shutoffSystem(duration) {
713
+ __assertType("duration", "number", __assertType__number.bind(void 0, duration));
714
+ this.assertSupportsCommand(IrrigationCommand, IrrigationCommand.SystemShutoff);
715
+ const cc = new IrrigationCCSystemShutoff({
716
+ nodeId: this.endpoint.nodeId,
717
+ endpointIndex: this.endpoint.index,
718
+ duration,
719
+ });
720
+ return this.host.sendCommand(cc, this.commandOptions);
721
+ }
722
+ /** Shuts off the entire system permanently and prevents schedules from running */
723
+ shutoffSystemPermanently() {
724
+ return this.shutoffSystem(255);
725
+ }
726
+ get [SET_VALUE]() {
727
+ return async function ({ property, propertyKey }, value) {
728
+ const valueDB = this.getValueDB();
729
+ if (systemConfigProperties.includes(property)) {
730
+ const options = {};
731
+ for (const prop of systemConfigProperties) {
732
+ if (prop === property)
733
+ continue;
734
+ const valueId = {
735
+ commandClass: this.ccId,
736
+ endpoint: this.endpoint.index,
737
+ property: prop,
738
+ };
739
+ const cachedVal = valueDB.getValue(valueId);
740
+ if (cachedVal == undefined) {
741
+ throw new ZWaveError(`The "${property}" property cannot be changed before ${prop} is known!`, ZWaveErrorCodes.Argument_Invalid);
742
+ }
743
+ options[prop] = cachedVal;
744
+ }
745
+ options[property] =
746
+ value;
747
+ return this.setSystemConfig(options);
748
+ }
749
+ else if (property === "shutoff") {
750
+ return this.shutoffSystem(0);
751
+ }
752
+ else if (property === "master"
753
+ || (typeof property === "number" && property >= 1)) {
754
+ // This is a value of a valve
755
+ if (propertyKey == undefined) {
756
+ throwMissingPropertyKey(this.ccId, property);
757
+ }
758
+ if (valveConfigPropertyKeys.includes(propertyKey)) {
759
+ const options = {
760
+ valveId: property,
761
+ };
762
+ for (const prop of valveConfigPropertyKeys) {
763
+ if (prop === propertyKey)
764
+ continue;
765
+ const valueId = {
766
+ commandClass: this.ccId,
767
+ endpoint: this.endpoint.index,
768
+ property,
769
+ propertyKey: prop,
770
+ };
771
+ const cachedVal = valueDB.getValue(valueId);
772
+ if (cachedVal == undefined) {
773
+ throw new ZWaveError(`The "${property}_${propertyKey}" property cannot be changed before ${property}_${prop} is known!`, ZWaveErrorCodes.Argument_Invalid);
774
+ }
775
+ options[prop] = cachedVal;
776
+ }
777
+ options[propertyKey] = value;
778
+ return this.setValveConfig(options);
779
+ }
780
+ else if (propertyKey === "duration") {
781
+ // The run duration needs to be set separately from triggering the run
782
+ // So this is okay
783
+ return;
784
+ }
785
+ else if (propertyKey === "startStop") {
786
+ // Trigger or stop a valve run, depending on the value
787
+ if (typeof value !== "boolean") {
788
+ throwWrongValueType(this.ccId, property, "boolean", typeof value);
789
+ }
790
+ if (value) {
791
+ // Start a valve run
792
+ const duration = valueDB.getValue(IrrigationCCValues.valveRunDuration(property).endpoint(this.endpoint.index));
793
+ if (duration == undefined) {
794
+ throw new ZWaveError(`Cannot start a valve run without specifying a duration first!`, ZWaveErrorCodes.Argument_Invalid);
795
+ }
796
+ return this.runValve(property, duration);
797
+ }
798
+ else {
799
+ // Stop a valve run
800
+ return this.shutoffValve(property);
801
+ }
802
+ }
803
+ else {
804
+ throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
805
+ }
806
+ }
807
+ };
808
+ }
809
+ get [POLL_VALUE]() {
810
+ return async function ({ property, propertyKey }) {
811
+ switch (property) {
812
+ case "systemVoltage":
813
+ case "flowSensorActive":
814
+ case "pressureSensorActive":
815
+ case "rainSensorActive":
816
+ case "moistureSensorActive":
817
+ case "flow":
818
+ case "pressure":
819
+ case "shutoffDuration":
820
+ case "errorNotProgrammed":
821
+ case "errorEmergencyShutdown":
822
+ case "errorHighPressure":
823
+ case "errorLowPressure":
824
+ case "errorValve":
825
+ case "masterValveOpen":
826
+ case "firstOpenZoneId":
827
+ return (await this.getSystemStatus())?.[property];
828
+ case "masterValveDelay":
829
+ case "highPressureThreshold":
830
+ case "lowPressureThreshold":
831
+ case "rainSensorPolarity":
832
+ case "moistureSensorPolarity":
833
+ return (await this.getSystemConfig())?.[property];
834
+ }
835
+ if (property === "master"
836
+ || (typeof property === "number" && property >= 1)) {
837
+ // This is a value of a valve
838
+ switch (propertyKey) {
839
+ case "connected":
840
+ case "nominalCurrent":
841
+ case "errorShortCircuit":
842
+ case "errorHighCurrent":
843
+ case "errorLowCurrent":
844
+ case "errorMaximumFlow":
845
+ case "errorHighFlow":
846
+ case "errorLowFlow":
847
+ return (await this.getValveInfo(property))?.[propertyKey];
848
+ case "nominalCurrentHighThreshold":
849
+ case "nominalCurrentLowThreshold":
850
+ case "maximumFlow":
851
+ case "highFlowThreshold":
852
+ case "lowFlowThreshold":
853
+ case "useRainSensor":
854
+ case "useMoistureSensor":
855
+ return (await this.getValveConfig(property))?.[propertyKey];
856
+ case undefined:
857
+ throwMissingPropertyKey(this.ccId, property);
858
+ default:
859
+ throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
860
+ }
861
+ }
862
+ throwUnsupportedProperty(this.ccId, property);
863
+ };
864
+ }
865
+ };
866
+ return IrrigationCCAPI = _classThis;
867
+ })();
868
+ export { IrrigationCCAPI };
869
+ let IrrigationCC = (() => {
870
+ let _classDecorators = [commandClass(CommandClasses.Irrigation), implementedVersion(1), ccValues(IrrigationCCValues)];
871
+ let _classDescriptor;
872
+ let _classExtraInitializers = [];
873
+ let _classThis;
874
+ let _classSuper = CommandClass;
875
+ var IrrigationCC = class extends _classSuper {
876
+ static { _classThis = this; }
877
+ static {
878
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
879
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
880
+ IrrigationCC = _classThis = _classDescriptor.value;
881
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
882
+ __runInitializers(_classThis, _classExtraInitializers);
883
+ }
884
+ /**
885
+ * Returns the maximum number of valve table entries reported by the node.
886
+ * This only works AFTER the node has been interviewed.
887
+ */
888
+ static getMaxValveTableSizeCached(ctx, endpoint) {
889
+ return ctx
890
+ .getValueDB(endpoint.nodeId)
891
+ .getValue(IrrigationCCValues.maxValveTableSize.endpoint(endpoint.index));
892
+ }
893
+ /**
894
+ * Returns the number of zone valves reported by the node.
895
+ * This only works AFTER the node has been interviewed.
896
+ */
897
+ static getNumValvesCached(ctx, endpoint) {
898
+ return ctx
899
+ .getValueDB(endpoint.nodeId)
900
+ .getValue(IrrigationCCValues.numValves.endpoint(endpoint.index));
901
+ }
902
+ /**
903
+ * Returns whether the node supports a master valve
904
+ * This only works AFTER the node has been interviewed.
905
+ */
906
+ static supportsMasterValveCached(ctx, endpoint) {
907
+ return !!ctx
908
+ .getValueDB(endpoint.nodeId)
909
+ .getValue(IrrigationCCValues.supportsMasterValve.endpoint(endpoint.index));
910
+ }
911
+ async interview(ctx) {
912
+ const node = this.getNode(ctx);
913
+ const endpoint = this.getEndpoint(ctx);
914
+ const api = CCAPI.create(CommandClasses.Irrigation, ctx, endpoint).withOptions({
915
+ priority: MessagePriority.NodeQuery,
916
+ });
917
+ ctx.logNode(node.id, {
918
+ endpoint: this.endpointIndex,
919
+ message: `Interviewing ${this.ccName}...`,
920
+ direction: "none",
921
+ });
922
+ ctx.logNode(node.id, {
923
+ endpoint: this.endpointIndex,
924
+ message: "Querying irrigation system info...",
925
+ direction: "outbound",
926
+ });
927
+ const systemInfo = await api.getSystemInfo();
928
+ if (!systemInfo) {
929
+ ctx.logNode(node.id, {
930
+ endpoint: this.endpointIndex,
931
+ message: "Time out while querying irrigation system info, skipping interview...",
932
+ level: "warn",
933
+ });
934
+ return;
935
+ }
936
+ const logMessage = `received irrigation system info:
937
+ supports master valve: ${systemInfo.supportsMasterValve}
938
+ no. of valves: ${systemInfo.numValves}
939
+ no. of valve tables: ${systemInfo.numValveTables}
940
+ max. valve table size: ${systemInfo.maxValveTableSize}`;
941
+ ctx.logNode(node.id, {
942
+ endpoint: this.endpointIndex,
943
+ message: logMessage,
944
+ direction: "inbound",
945
+ });
946
+ // For each valve, create the values to start/stop a run
947
+ for (let i = 1; i <= systemInfo.numValves; i++) {
948
+ this.ensureMetadata(ctx, IrrigationCCValues.valveRunDuration(i));
949
+ this.ensureMetadata(ctx, IrrigationCCValues.valveRunStartStop(i));
950
+ }
951
+ // And create a shutoff value
952
+ this.ensureMetadata(ctx, IrrigationCCValues.shutoffSystem);
953
+ // Query current values
954
+ await this.refreshValues(ctx);
955
+ // Remember that the interview is complete
956
+ this.setInterviewComplete(ctx, true);
957
+ }
958
+ async refreshValues(ctx) {
959
+ const node = this.getNode(ctx);
960
+ const endpoint = this.getEndpoint(ctx);
961
+ const api = CCAPI.create(CommandClasses.Irrigation, ctx, endpoint).withOptions({
962
+ priority: MessagePriority.NodeQuery,
963
+ });
964
+ // Query the current system config
965
+ ctx.logNode(node.id, {
966
+ endpoint: this.endpointIndex,
967
+ message: "Querying irrigation system configuration...",
968
+ direction: "outbound",
969
+ });
970
+ const systemConfig = await api.getSystemConfig();
971
+ if (systemConfig) {
972
+ let logMessage = `received irrigation system configuration:
973
+ master valve delay: ${systemConfig.masterValveDelay} seconds
974
+ high pressure threshold: ${systemConfig.highPressureThreshold} kPa
975
+ low pressure threshold: ${systemConfig.lowPressureThreshold} kPa`;
976
+ if (systemConfig.rainSensorPolarity != undefined) {
977
+ logMessage += `
978
+ rain sensor polarity: ${getEnumMemberName(IrrigationSensorPolarity, systemConfig.rainSensorPolarity)}`;
979
+ }
980
+ if (systemConfig.moistureSensorPolarity != undefined) {
981
+ logMessage += `
982
+ moisture sensor polarity: ${getEnumMemberName(IrrigationSensorPolarity, systemConfig.moistureSensorPolarity)}`;
983
+ }
984
+ ctx.logNode(node.id, {
985
+ endpoint: this.endpointIndex,
986
+ message: logMessage,
987
+ direction: "inbound",
988
+ });
989
+ }
990
+ // and status
991
+ // Query the current system config
992
+ ctx.logNode(node.id, {
993
+ endpoint: this.endpointIndex,
994
+ message: "Querying irrigation system status...",
995
+ direction: "outbound",
996
+ });
997
+ await api.getSystemStatus();
998
+ // for each valve, query the current status and configuration
999
+ if (IrrigationCC.supportsMasterValveCached(ctx, endpoint)) {
1000
+ ctx.logNode(node.id, {
1001
+ endpoint: this.endpointIndex,
1002
+ message: "Querying master valve configuration...",
1003
+ direction: "outbound",
1004
+ });
1005
+ await api.getValveConfig("master");
1006
+ ctx.logNode(node.id, {
1007
+ endpoint: this.endpointIndex,
1008
+ message: "Querying master valve status...",
1009
+ direction: "outbound",
1010
+ });
1011
+ await api.getValveInfo("master");
1012
+ }
1013
+ for (let i = 1; i <= (IrrigationCC.getNumValvesCached(ctx, endpoint) ?? 0); i++) {
1014
+ ctx.logNode(node.id, {
1015
+ endpoint: this.endpointIndex,
1016
+ message: `Querying configuration for valve ${padStart(i.toString(), 3, "0")}...`,
1017
+ direction: "outbound",
1018
+ });
1019
+ await api.getValveConfig(i);
1020
+ ctx.logNode(node.id, {
1021
+ endpoint: this.endpointIndex,
1022
+ message: `Querying status for valve ${padStart(i.toString(), 3, "0")}...`,
1023
+ direction: "outbound",
1024
+ });
1025
+ await api.getValveInfo(i);
1026
+ }
1027
+ }
1028
+ translateProperty(ctx, property, propertyKey) {
1029
+ if (property === "master") {
1030
+ return "Master valve";
1031
+ }
1032
+ else if (typeof property === "number") {
1033
+ return `Valve ${padStart(property.toString(), 3, "0")}`;
1034
+ }
1035
+ return super.translateProperty(ctx, property, propertyKey);
1036
+ }
1037
+ };
1038
+ return IrrigationCC = _classThis;
1039
+ })();
1040
+ export { IrrigationCC };
1041
+ let IrrigationCCSystemInfoReport = (() => {
1042
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemInfoReport), ccValueProperty("numValves", IrrigationCCValues.numValves), ccValueProperty("numValveTables", IrrigationCCValues.numValveTables), ccValueProperty("supportsMasterValve", IrrigationCCValues.supportsMasterValve), ccValueProperty("maxValveTableSize", IrrigationCCValues.maxValveTableSize)];
1043
+ let _classDescriptor;
1044
+ let _classExtraInitializers = [];
1045
+ let _classThis;
1046
+ let _classSuper = IrrigationCC;
1047
+ var IrrigationCCSystemInfoReport = class extends _classSuper {
1048
+ static { _classThis = this; }
1049
+ static {
1050
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1051
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1052
+ IrrigationCCSystemInfoReport = _classThis = _classDescriptor.value;
1053
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1054
+ __runInitializers(_classThis, _classExtraInitializers);
1055
+ }
1056
+ constructor(options) {
1057
+ super(options);
1058
+ // TODO: Check implementation:
1059
+ this.supportsMasterValve = options.supportsMasterValve;
1060
+ this.numValves = options.numValves;
1061
+ this.numValveTables = options.numValveTables;
1062
+ this.maxValveTableSize = options.maxValveTableSize;
1063
+ }
1064
+ static from(raw, ctx) {
1065
+ validatePayload(raw.payload.length >= 4);
1066
+ const supportsMasterValve = !!(raw.payload[0] & 0x01);
1067
+ const numValves = raw.payload[1];
1068
+ const numValveTables = raw.payload[2];
1069
+ const maxValveTableSize = raw.payload[3] & 0b1111;
1070
+ return new this({
1071
+ nodeId: ctx.sourceNodeId,
1072
+ supportsMasterValve,
1073
+ numValves,
1074
+ numValveTables,
1075
+ maxValveTableSize,
1076
+ });
1077
+ }
1078
+ numValves;
1079
+ numValveTables;
1080
+ supportsMasterValve;
1081
+ maxValveTableSize;
1082
+ toLogEntry(ctx) {
1083
+ return {
1084
+ ...super.toLogEntry(ctx),
1085
+ message: {
1086
+ "supports master valve": this.supportsMasterValve,
1087
+ "no. of valves": this.numValves,
1088
+ "no. of valve tables": this.numValveTables,
1089
+ "max. valve table size": this.maxValveTableSize,
1090
+ },
1091
+ };
1092
+ }
1093
+ };
1094
+ return IrrigationCCSystemInfoReport = _classThis;
1095
+ })();
1096
+ export { IrrigationCCSystemInfoReport };
1097
+ let IrrigationCCSystemInfoGet = (() => {
1098
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemInfoGet), expectedCCResponse(IrrigationCCSystemInfoReport)];
1099
+ let _classDescriptor;
1100
+ let _classExtraInitializers = [];
1101
+ let _classThis;
1102
+ let _classSuper = IrrigationCC;
1103
+ var IrrigationCCSystemInfoGet = class extends _classSuper {
1104
+ static { _classThis = this; }
1105
+ static {
1106
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1107
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1108
+ IrrigationCCSystemInfoGet = _classThis = _classDescriptor.value;
1109
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1110
+ __runInitializers(_classThis, _classExtraInitializers);
1111
+ }
1112
+ };
1113
+ return IrrigationCCSystemInfoGet = _classThis;
1114
+ })();
1115
+ export { IrrigationCCSystemInfoGet };
1116
+ let IrrigationCCSystemStatusReport = (() => {
1117
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemStatusReport), ccValueProperty("systemVoltage", IrrigationCCValues.systemVoltage), ccValueProperty("flowSensorActive", IrrigationCCValues.flowSensorActive), ccValueProperty("pressureSensorActive", IrrigationCCValues.pressureSensorActive), ccValueProperty("rainSensorActive", IrrigationCCValues.rainSensorActive), ccValueProperty("moistureSensorActive", IrrigationCCValues.moistureSensorActive), ccValueProperty("flow", IrrigationCCValues.flow), ccValueProperty("pressure", IrrigationCCValues.pressure), ccValueProperty("shutoffDuration", IrrigationCCValues.shutoffDuration), ccValueProperty("errorNotProgrammed", IrrigationCCValues.errorNotProgrammed), ccValueProperty("errorEmergencyShutdown", IrrigationCCValues.errorEmergencyShutdown), ccValueProperty("errorHighPressure", IrrigationCCValues.errorHighPressure), ccValueProperty("errorLowPressure", IrrigationCCValues.errorLowPressure), ccValueProperty("errorValve", IrrigationCCValues.errorValve), ccValueProperty("masterValveOpen", IrrigationCCValues.masterValveOpen), ccValueProperty("firstOpenZoneId", IrrigationCCValues.firstOpenZoneId)];
1118
+ let _classDescriptor;
1119
+ let _classExtraInitializers = [];
1120
+ let _classThis;
1121
+ let _classSuper = IrrigationCC;
1122
+ var IrrigationCCSystemStatusReport = class extends _classSuper {
1123
+ static { _classThis = this; }
1124
+ static {
1125
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1126
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1127
+ IrrigationCCSystemStatusReport = _classThis = _classDescriptor.value;
1128
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1129
+ __runInitializers(_classThis, _classExtraInitializers);
1130
+ }
1131
+ constructor(options) {
1132
+ super(options);
1133
+ // TODO: Check implementation:
1134
+ this.systemVoltage = options.systemVoltage;
1135
+ this.flowSensorActive = options.flowSensorActive;
1136
+ this.pressureSensorActive = options.pressureSensorActive;
1137
+ this.rainSensorActive = options.rainSensorActive;
1138
+ this.moistureSensorActive = options.moistureSensorActive;
1139
+ this.flow = options.flow;
1140
+ this.pressure = options.pressure;
1141
+ this.shutoffDuration = options.shutoffDuration;
1142
+ this.errorNotProgrammed = options.errorNotProgrammed;
1143
+ this.errorEmergencyShutdown = options.errorEmergencyShutdown;
1144
+ this.errorHighPressure = options.errorHighPressure;
1145
+ this.errorLowPressure = options.errorLowPressure;
1146
+ this.errorValve = options.errorValve;
1147
+ this.masterValveOpen = options.masterValveOpen;
1148
+ this.firstOpenZoneId = options.firstOpenZoneId;
1149
+ }
1150
+ static from(raw, ctx) {
1151
+ validatePayload(raw.payload.length >= 2);
1152
+ const systemVoltage = raw.payload[0];
1153
+ const flowSensorActive = !!(raw.payload[1] & 0x01);
1154
+ const pressureSensorActive = !!(raw.payload[1] & 0x02);
1155
+ const rainSensorActive = !!(raw.payload[1] & 0x04);
1156
+ const moistureSensorActive = !!(raw.payload[1] & 0x08);
1157
+ let offset = 2;
1158
+ let flow;
1159
+ {
1160
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1161
+ validatePayload(scale === 0);
1162
+ if (flowSensorActive)
1163
+ flow = value;
1164
+ offset += bytesRead;
1165
+ }
1166
+ let pressure;
1167
+ {
1168
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1169
+ validatePayload(scale === 0);
1170
+ if (pressureSensorActive)
1171
+ pressure = value;
1172
+ offset += bytesRead;
1173
+ }
1174
+ validatePayload(raw.payload.length >= offset + 4);
1175
+ const shutoffDuration = raw.payload[offset];
1176
+ const errorNotProgrammed = !!(raw.payload[offset + 1] & 0x01);
1177
+ const errorEmergencyShutdown = !!(raw.payload[offset + 1] & 0x02);
1178
+ const errorHighPressure = !!(raw.payload[offset + 1] & 0x04);
1179
+ const errorLowPressure = !!(raw.payload[offset + 1] & 0x08);
1180
+ const errorValve = !!(raw.payload[offset + 1] & 0x10);
1181
+ const masterValveOpen = !!(raw.payload[offset + 2] & 0x01);
1182
+ let firstOpenZoneId;
1183
+ if (raw.payload[offset + 3]) {
1184
+ firstOpenZoneId = raw.payload[offset + 3];
1185
+ }
1186
+ return new this({
1187
+ nodeId: ctx.sourceNodeId,
1188
+ systemVoltage,
1189
+ flowSensorActive,
1190
+ pressureSensorActive,
1191
+ rainSensorActive,
1192
+ moistureSensorActive,
1193
+ flow,
1194
+ pressure,
1195
+ shutoffDuration,
1196
+ errorNotProgrammed,
1197
+ errorEmergencyShutdown,
1198
+ errorHighPressure,
1199
+ errorLowPressure,
1200
+ errorValve,
1201
+ masterValveOpen,
1202
+ firstOpenZoneId,
1203
+ });
1204
+ }
1205
+ systemVoltage;
1206
+ flowSensorActive;
1207
+ pressureSensorActive;
1208
+ rainSensorActive;
1209
+ moistureSensorActive;
1210
+ flow;
1211
+ pressure;
1212
+ shutoffDuration;
1213
+ errorNotProgrammed;
1214
+ errorEmergencyShutdown;
1215
+ errorHighPressure;
1216
+ errorLowPressure;
1217
+ errorValve;
1218
+ masterValveOpen;
1219
+ firstOpenZoneId;
1220
+ toLogEntry(ctx) {
1221
+ const message = {
1222
+ "system voltage": `${this.systemVoltage} V`,
1223
+ "active sensors": [
1224
+ this.flowSensorActive ? "flow" : undefined,
1225
+ this.pressureSensorActive ? "pressure" : undefined,
1226
+ this.rainSensorActive ? "rain" : undefined,
1227
+ this.moistureSensorActive ? "moisture" : undefined,
1228
+ ]
1229
+ .filter(Boolean)
1230
+ .join(", "),
1231
+ };
1232
+ if (this.flow != undefined) {
1233
+ message.flow = `${this.flow} l/h`;
1234
+ }
1235
+ if (this.pressure != undefined) {
1236
+ message.pressure = `${this.pressure} kPa`;
1237
+ }
1238
+ message["remaining shutoff duration"] = `${this.shutoffDuration} hours`;
1239
+ message["master valve status"] = this.masterValveOpen
1240
+ ? "open"
1241
+ : "closed";
1242
+ message["first open zone valve"] = this.firstOpenZoneId || "none";
1243
+ const errors = [
1244
+ this.errorNotProgrammed ? "device not programmed" : undefined,
1245
+ this.errorEmergencyShutdown ? "emergency shutdown" : undefined,
1246
+ this.errorHighPressure
1247
+ ? "high pressure threshold triggered"
1248
+ : undefined,
1249
+ this.errorLowPressure
1250
+ ? "low pressure threshold triggered"
1251
+ : undefined,
1252
+ this.errorValve
1253
+ ? "a valve or the master valve has an error"
1254
+ : undefined,
1255
+ ].filter(Boolean);
1256
+ if (errors.length > 0) {
1257
+ message.errors = errors.map((e) => `\n· ${e}`).join("");
1258
+ }
1259
+ return {
1260
+ ...super.toLogEntry(ctx),
1261
+ message,
1262
+ };
1263
+ }
1264
+ };
1265
+ return IrrigationCCSystemStatusReport = _classThis;
1266
+ })();
1267
+ export { IrrigationCCSystemStatusReport };
1268
+ let IrrigationCCSystemStatusGet = (() => {
1269
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemStatusGet), expectedCCResponse(IrrigationCCSystemStatusReport)];
1270
+ let _classDescriptor;
1271
+ let _classExtraInitializers = [];
1272
+ let _classThis;
1273
+ let _classSuper = IrrigationCC;
1274
+ var IrrigationCCSystemStatusGet = class extends _classSuper {
1275
+ static { _classThis = this; }
1276
+ static {
1277
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1278
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1279
+ IrrigationCCSystemStatusGet = _classThis = _classDescriptor.value;
1280
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1281
+ __runInitializers(_classThis, _classExtraInitializers);
1282
+ }
1283
+ };
1284
+ return IrrigationCCSystemStatusGet = _classThis;
1285
+ })();
1286
+ export { IrrigationCCSystemStatusGet };
1287
+ let IrrigationCCSystemConfigSet = (() => {
1288
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemConfigSet), useSupervision()];
1289
+ let _classDescriptor;
1290
+ let _classExtraInitializers = [];
1291
+ let _classThis;
1292
+ let _classSuper = IrrigationCC;
1293
+ var IrrigationCCSystemConfigSet = class extends _classSuper {
1294
+ static { _classThis = this; }
1295
+ static {
1296
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1297
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1298
+ IrrigationCCSystemConfigSet = _classThis = _classDescriptor.value;
1299
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1300
+ __runInitializers(_classThis, _classExtraInitializers);
1301
+ }
1302
+ constructor(options) {
1303
+ super(options);
1304
+ this.masterValveDelay = options.masterValveDelay;
1305
+ this.highPressureThreshold = options.highPressureThreshold;
1306
+ this.lowPressureThreshold = options.lowPressureThreshold;
1307
+ this.rainSensorPolarity = options.rainSensorPolarity;
1308
+ this.moistureSensorPolarity = options.moistureSensorPolarity;
1309
+ }
1310
+ static from(_raw, _ctx) {
1311
+ // TODO: Deserialize payload
1312
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1313
+ // return new IrrigationCCSystemConfigSet({
1314
+ // nodeId: ctx.sourceNodeId,
1315
+ // });
1316
+ }
1317
+ masterValveDelay;
1318
+ highPressureThreshold;
1319
+ lowPressureThreshold;
1320
+ rainSensorPolarity;
1321
+ moistureSensorPolarity;
1322
+ serialize(ctx) {
1323
+ let polarity = 0;
1324
+ if (this.rainSensorPolarity != undefined)
1325
+ polarity |= 0b1;
1326
+ if (this.moistureSensorPolarity != undefined)
1327
+ polarity |= 0b10;
1328
+ if (this.rainSensorPolarity == undefined
1329
+ && this.moistureSensorPolarity == undefined) {
1330
+ // Valid bit
1331
+ polarity |= 0b1000_0000;
1332
+ }
1333
+ this.payload = Bytes.concat([
1334
+ Bytes.from([this.masterValveDelay]),
1335
+ encodeFloatWithScale(this.highPressureThreshold, 0 /* kPa */),
1336
+ encodeFloatWithScale(this.lowPressureThreshold, 0 /* kPa */),
1337
+ Bytes.from([polarity]),
1338
+ ]);
1339
+ return super.serialize(ctx);
1340
+ }
1341
+ toLogEntry(ctx) {
1342
+ const message = {
1343
+ "master valve delay": `${this.masterValveDelay} s`,
1344
+ "high pressure threshold": `${this.highPressureThreshold} kPa`,
1345
+ "low pressure threshold": `${this.lowPressureThreshold} kPa`,
1346
+ };
1347
+ if (this.rainSensorPolarity != undefined) {
1348
+ message["rain sensor polarity"] = getEnumMemberName(IrrigationSensorPolarity, this.rainSensorPolarity);
1349
+ }
1350
+ if (this.moistureSensorPolarity != undefined) {
1351
+ message["moisture sensor polarity"] = getEnumMemberName(IrrigationSensorPolarity, this.moistureSensorPolarity);
1352
+ }
1353
+ return {
1354
+ ...super.toLogEntry(ctx),
1355
+ message,
1356
+ };
1357
+ }
1358
+ };
1359
+ return IrrigationCCSystemConfigSet = _classThis;
1360
+ })();
1361
+ export { IrrigationCCSystemConfigSet };
1362
+ let IrrigationCCSystemConfigReport = (() => {
1363
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemConfigReport), ccValueProperty("masterValveDelay", IrrigationCCValues.masterValveDelay), ccValueProperty("highPressureThreshold", IrrigationCCValues.highPressureThreshold), ccValueProperty("lowPressureThreshold", IrrigationCCValues.lowPressureThreshold), ccValueProperty("rainSensorPolarity", IrrigationCCValues.rainSensorPolarity), ccValueProperty("moistureSensorPolarity", IrrigationCCValues.moistureSensorPolarity)];
1364
+ let _classDescriptor;
1365
+ let _classExtraInitializers = [];
1366
+ let _classThis;
1367
+ let _classSuper = IrrigationCC;
1368
+ var IrrigationCCSystemConfigReport = class extends _classSuper {
1369
+ static { _classThis = this; }
1370
+ static {
1371
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1372
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1373
+ IrrigationCCSystemConfigReport = _classThis = _classDescriptor.value;
1374
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1375
+ __runInitializers(_classThis, _classExtraInitializers);
1376
+ }
1377
+ constructor(options) {
1378
+ super(options);
1379
+ // TODO: Check implementation:
1380
+ this.masterValveDelay = options.masterValveDelay;
1381
+ this.highPressureThreshold = options.highPressureThreshold;
1382
+ this.lowPressureThreshold = options.lowPressureThreshold;
1383
+ this.rainSensorPolarity = options.rainSensorPolarity;
1384
+ this.moistureSensorPolarity = options.moistureSensorPolarity;
1385
+ }
1386
+ static from(raw, ctx) {
1387
+ validatePayload(raw.payload.length >= 2);
1388
+ const masterValveDelay = raw.payload[0];
1389
+ let offset = 1;
1390
+ let highPressureThreshold;
1391
+ {
1392
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1393
+ validatePayload(scale === 0 /* kPa */);
1394
+ highPressureThreshold = value;
1395
+ offset += bytesRead;
1396
+ }
1397
+ let lowPressureThreshold;
1398
+ {
1399
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1400
+ validatePayload(scale === 0 /* kPa */);
1401
+ lowPressureThreshold = value;
1402
+ offset += bytesRead;
1403
+ }
1404
+ validatePayload(raw.payload.length >= offset + 1);
1405
+ const polarity = raw.payload[offset];
1406
+ let rainSensorPolarity;
1407
+ let moistureSensorPolarity;
1408
+ if (!!(polarity & 0b1000_0000)) {
1409
+ // The valid bit is set
1410
+ rainSensorPolarity = polarity & 0b1;
1411
+ moistureSensorPolarity = (polarity & 0b10) >>> 1;
1412
+ }
1413
+ return new this({
1414
+ nodeId: ctx.sourceNodeId,
1415
+ masterValveDelay,
1416
+ highPressureThreshold,
1417
+ lowPressureThreshold,
1418
+ rainSensorPolarity,
1419
+ moistureSensorPolarity,
1420
+ });
1421
+ }
1422
+ masterValveDelay;
1423
+ highPressureThreshold;
1424
+ lowPressureThreshold;
1425
+ rainSensorPolarity;
1426
+ moistureSensorPolarity;
1427
+ toLogEntry(ctx) {
1428
+ const message = {
1429
+ "master valve delay": `${this.masterValveDelay} s`,
1430
+ "high pressure threshold": `${this.highPressureThreshold} kPa`,
1431
+ "low pressure threshold": `${this.lowPressureThreshold} kPa`,
1432
+ };
1433
+ if (this.rainSensorPolarity != undefined) {
1434
+ message["rain sensor polarity"] = getEnumMemberName(IrrigationSensorPolarity, this.rainSensorPolarity);
1435
+ }
1436
+ if (this.moistureSensorPolarity != undefined) {
1437
+ message["moisture sensor polarity"] = getEnumMemberName(IrrigationSensorPolarity, this.moistureSensorPolarity);
1438
+ }
1439
+ return {
1440
+ ...super.toLogEntry(ctx),
1441
+ message,
1442
+ };
1443
+ }
1444
+ };
1445
+ return IrrigationCCSystemConfigReport = _classThis;
1446
+ })();
1447
+ export { IrrigationCCSystemConfigReport };
1448
+ let IrrigationCCSystemConfigGet = (() => {
1449
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemConfigGet), expectedCCResponse(IrrigationCCSystemConfigReport)];
1450
+ let _classDescriptor;
1451
+ let _classExtraInitializers = [];
1452
+ let _classThis;
1453
+ let _classSuper = IrrigationCC;
1454
+ var IrrigationCCSystemConfigGet = class extends _classSuper {
1455
+ static { _classThis = this; }
1456
+ static {
1457
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1458
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1459
+ IrrigationCCSystemConfigGet = _classThis = _classDescriptor.value;
1460
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1461
+ __runInitializers(_classThis, _classExtraInitializers);
1462
+ }
1463
+ };
1464
+ return IrrigationCCSystemConfigGet = _classThis;
1465
+ })();
1466
+ export { IrrigationCCSystemConfigGet };
1467
+ let IrrigationCCValveInfoReport = (() => {
1468
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveInfoReport)];
1469
+ let _classDescriptor;
1470
+ let _classExtraInitializers = [];
1471
+ let _classThis;
1472
+ let _classSuper = IrrigationCC;
1473
+ var IrrigationCCValveInfoReport = class extends _classSuper {
1474
+ static { _classThis = this; }
1475
+ static {
1476
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1477
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1478
+ IrrigationCCValveInfoReport = _classThis = _classDescriptor.value;
1479
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1480
+ __runInitializers(_classThis, _classExtraInitializers);
1481
+ }
1482
+ constructor(options) {
1483
+ super(options);
1484
+ // TODO: Check implementation:
1485
+ this.valveId = options.valveId;
1486
+ this.connected = options.connected;
1487
+ this.nominalCurrent = options.nominalCurrent;
1488
+ this.errorShortCircuit = options.errorShortCircuit;
1489
+ this.errorHighCurrent = options.errorHighCurrent;
1490
+ this.errorLowCurrent = options.errorLowCurrent;
1491
+ this.errorMaximumFlow = options.errorMaximumFlow;
1492
+ this.errorHighFlow = options.errorHighFlow;
1493
+ this.errorLowFlow = options.errorLowFlow;
1494
+ }
1495
+ static from(raw, ctx) {
1496
+ validatePayload(raw.payload.length >= 4);
1497
+ let valveId;
1498
+ if ((raw.payload[0] & 0b1) === ValveType.MasterValve) {
1499
+ valveId = "master";
1500
+ }
1501
+ else {
1502
+ valveId = raw.payload[1];
1503
+ }
1504
+ const connected = !!(raw.payload[0] & 0b10);
1505
+ const nominalCurrent = 10 * raw.payload[2];
1506
+ const errorShortCircuit = !!(raw.payload[3] & 0b1);
1507
+ const errorHighCurrent = !!(raw.payload[3] & 0b10);
1508
+ const errorLowCurrent = !!(raw.payload[3] & 0b100);
1509
+ let errorMaximumFlow;
1510
+ let errorHighFlow;
1511
+ let errorLowFlow;
1512
+ if (valveId === "master") {
1513
+ errorMaximumFlow = !!(raw.payload[3] & 0b1000);
1514
+ errorHighFlow = !!(raw.payload[3] & 0b1_0000);
1515
+ errorLowFlow = !!(raw.payload[3] & 0b10_0000);
1516
+ }
1517
+ return new this({
1518
+ nodeId: ctx.sourceNodeId,
1519
+ valveId,
1520
+ connected,
1521
+ nominalCurrent,
1522
+ errorShortCircuit,
1523
+ errorHighCurrent,
1524
+ errorLowCurrent,
1525
+ errorMaximumFlow,
1526
+ errorHighFlow,
1527
+ errorLowFlow,
1528
+ });
1529
+ }
1530
+ valveId;
1531
+ connected;
1532
+ nominalCurrent;
1533
+ errorShortCircuit;
1534
+ errorHighCurrent;
1535
+ errorLowCurrent;
1536
+ errorMaximumFlow;
1537
+ errorHighFlow;
1538
+ errorLowFlow;
1539
+ persistValues(ctx) {
1540
+ if (!super.persistValues(ctx))
1541
+ return false;
1542
+ // connected
1543
+ const valveConnectedValue = IrrigationCCValues.valveConnected(this.valveId);
1544
+ this.ensureMetadata(ctx, valveConnectedValue);
1545
+ this.setValue(ctx, valveConnectedValue, this.connected);
1546
+ // nominalCurrent
1547
+ const nominalCurrentValue = IrrigationCCValues.nominalCurrent(this.valveId);
1548
+ this.ensureMetadata(ctx, nominalCurrentValue);
1549
+ this.setValue(ctx, nominalCurrentValue, this.nominalCurrent);
1550
+ // errorShortCircuit
1551
+ const errorShortCircuitValue = IrrigationCCValues.errorShortCircuit(this.valveId);
1552
+ this.ensureMetadata(ctx, errorShortCircuitValue);
1553
+ this.setValue(ctx, errorShortCircuitValue, this.errorShortCircuit);
1554
+ // errorHighCurrent
1555
+ const errorHighCurrentValue = IrrigationCCValues.errorHighCurrent(this.valveId);
1556
+ this.ensureMetadata(ctx, errorHighCurrentValue);
1557
+ this.setValue(ctx, errorHighCurrentValue, this.errorHighCurrent);
1558
+ // errorLowCurrent
1559
+ const errorLowCurrentValue = IrrigationCCValues.errorLowCurrent(this.valveId);
1560
+ this.ensureMetadata(ctx, errorLowCurrentValue);
1561
+ this.setValue(ctx, errorLowCurrentValue, this.errorLowCurrent);
1562
+ if (this.errorMaximumFlow != undefined) {
1563
+ const errorMaximumFlowValue = IrrigationCCValues.errorMaximumFlow(this.valveId);
1564
+ this.ensureMetadata(ctx, errorMaximumFlowValue);
1565
+ this.setValue(ctx, errorMaximumFlowValue, this.errorMaximumFlow);
1566
+ }
1567
+ if (this.errorHighFlow != undefined) {
1568
+ const errorHighFlowValue = IrrigationCCValues.errorHighFlow(this.valveId);
1569
+ this.ensureMetadata(ctx, errorHighFlowValue);
1570
+ this.setValue(ctx, errorHighFlowValue, this.errorHighFlow);
1571
+ }
1572
+ if (this.errorLowFlow != undefined) {
1573
+ const errorLowFlowValue = IrrigationCCValues.errorLowFlow(this.valveId);
1574
+ this.ensureMetadata(ctx, errorLowFlowValue);
1575
+ this.setValue(ctx, errorLowFlowValue, this.errorLowFlow);
1576
+ }
1577
+ return true;
1578
+ }
1579
+ toLogEntry(ctx) {
1580
+ const message = {
1581
+ "valve ID": this.valveId,
1582
+ connected: this.connected,
1583
+ "nominal current": `${this.nominalCurrent} mA`,
1584
+ };
1585
+ const errors = [
1586
+ this.errorShortCircuit ? "short circuit" : undefined,
1587
+ this.errorHighCurrent ? "current above high threshold" : undefined,
1588
+ this.errorLowCurrent ? "current below low threshold" : undefined,
1589
+ this.errorMaximumFlow ? "maximum flow" : undefined,
1590
+ this.errorHighFlow ? "flow above high threshold" : undefined,
1591
+ this.errorLowFlow ? "flow below low threshold" : undefined,
1592
+ ].filter(Boolean);
1593
+ if (errors.length > 0) {
1594
+ message.errors = errors.map((e) => `\n· ${e}`).join("");
1595
+ }
1596
+ return {
1597
+ ...super.toLogEntry(ctx),
1598
+ message,
1599
+ };
1600
+ }
1601
+ };
1602
+ return IrrigationCCValveInfoReport = _classThis;
1603
+ })();
1604
+ export { IrrigationCCValveInfoReport };
1605
+ function testResponseForIrrigationCommandWithValveId(sent, received) {
1606
+ return received.valveId === sent.valveId;
1607
+ }
1608
+ let IrrigationCCValveInfoGet = (() => {
1609
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveInfoGet), expectedCCResponse(IrrigationCCValveInfoReport, testResponseForIrrigationCommandWithValveId)];
1610
+ let _classDescriptor;
1611
+ let _classExtraInitializers = [];
1612
+ let _classThis;
1613
+ let _classSuper = IrrigationCC;
1614
+ var IrrigationCCValveInfoGet = class extends _classSuper {
1615
+ static { _classThis = this; }
1616
+ static {
1617
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1618
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1619
+ IrrigationCCValveInfoGet = _classThis = _classDescriptor.value;
1620
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1621
+ __runInitializers(_classThis, _classExtraInitializers);
1622
+ }
1623
+ constructor(options) {
1624
+ super(options);
1625
+ this.valveId = options.valveId;
1626
+ }
1627
+ static from(_raw, _ctx) {
1628
+ // TODO: Deserialize payload
1629
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1630
+ // return new IrrigationCCValveInfoGet({
1631
+ // nodeId: ctx.sourceNodeId,
1632
+ // });
1633
+ }
1634
+ valveId;
1635
+ serialize(ctx) {
1636
+ this.payload = Bytes.from([
1637
+ this.valveId === "master" ? 1 : 0,
1638
+ this.valveId === "master" ? 1 : this.valveId || 1,
1639
+ ]);
1640
+ return super.serialize(ctx);
1641
+ }
1642
+ toLogEntry(ctx) {
1643
+ return {
1644
+ ...super.toLogEntry(ctx),
1645
+ message: {
1646
+ "valve ID": this.valveId,
1647
+ },
1648
+ };
1649
+ }
1650
+ };
1651
+ return IrrigationCCValveInfoGet = _classThis;
1652
+ })();
1653
+ export { IrrigationCCValveInfoGet };
1654
+ let IrrigationCCValveConfigSet = (() => {
1655
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveConfigSet), useSupervision()];
1656
+ let _classDescriptor;
1657
+ let _classExtraInitializers = [];
1658
+ let _classThis;
1659
+ let _classSuper = IrrigationCC;
1660
+ var IrrigationCCValveConfigSet = class extends _classSuper {
1661
+ static { _classThis = this; }
1662
+ static {
1663
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1664
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1665
+ IrrigationCCValveConfigSet = _classThis = _classDescriptor.value;
1666
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1667
+ __runInitializers(_classThis, _classExtraInitializers);
1668
+ }
1669
+ constructor(options) {
1670
+ super(options);
1671
+ this.valveId = options.valveId;
1672
+ this.nominalCurrentHighThreshold = options.nominalCurrentHighThreshold;
1673
+ this.nominalCurrentLowThreshold = options.nominalCurrentLowThreshold;
1674
+ this.maximumFlow = options.maximumFlow;
1675
+ this.highFlowThreshold = options.highFlowThreshold;
1676
+ this.lowFlowThreshold = options.lowFlowThreshold;
1677
+ this.useRainSensor = options.useRainSensor;
1678
+ this.useMoistureSensor = options.useMoistureSensor;
1679
+ }
1680
+ static from(_raw, _ctx) {
1681
+ // TODO: Deserialize payload
1682
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1683
+ // return new IrrigationCCValveConfigSet({
1684
+ // nodeId: ctx.sourceNodeId,
1685
+ // });
1686
+ }
1687
+ valveId;
1688
+ nominalCurrentHighThreshold;
1689
+ nominalCurrentLowThreshold;
1690
+ maximumFlow;
1691
+ highFlowThreshold;
1692
+ lowFlowThreshold;
1693
+ useRainSensor;
1694
+ useMoistureSensor;
1695
+ serialize(ctx) {
1696
+ this.payload = Bytes.concat([
1697
+ Bytes.from([
1698
+ this.valveId === "master" ? 1 : 0,
1699
+ this.valveId === "master" ? 1 : this.valveId || 1,
1700
+ Math.floor(this.nominalCurrentHighThreshold / 10),
1701
+ Math.floor(this.nominalCurrentLowThreshold / 10),
1702
+ ]),
1703
+ encodeFloatWithScale(this.maximumFlow, 0 /* l/h */),
1704
+ encodeFloatWithScale(this.highFlowThreshold, 0 /* l/h */),
1705
+ encodeFloatWithScale(this.lowFlowThreshold, 0 /* l/h */),
1706
+ Bytes.from([
1707
+ (this.useRainSensor ? 0b1 : 0)
1708
+ | (this.useMoistureSensor ? 0b10 : 0),
1709
+ ]),
1710
+ ]);
1711
+ return super.serialize(ctx);
1712
+ }
1713
+ toLogEntry(ctx) {
1714
+ return {
1715
+ ...super.toLogEntry(ctx),
1716
+ message: {
1717
+ "valve ID": this.valveId,
1718
+ "nominal current high threshold": `${this.nominalCurrentHighThreshold} mA`,
1719
+ "nominal current low threshold": `${this.nominalCurrentLowThreshold} mA`,
1720
+ "maximum flow": `${this.maximumFlow} l/h`,
1721
+ "high flow threshold": `${this.highFlowThreshold} l/h`,
1722
+ "low flow threshold": `${this.lowFlowThreshold} l/h`,
1723
+ "use rain sensor": this.useRainSensor,
1724
+ "use moisture sensor": this.useMoistureSensor,
1725
+ },
1726
+ };
1727
+ }
1728
+ };
1729
+ return IrrigationCCValveConfigSet = _classThis;
1730
+ })();
1731
+ export { IrrigationCCValveConfigSet };
1732
+ let IrrigationCCValveConfigReport = (() => {
1733
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveConfigReport)];
1734
+ let _classDescriptor;
1735
+ let _classExtraInitializers = [];
1736
+ let _classThis;
1737
+ let _classSuper = IrrigationCC;
1738
+ var IrrigationCCValveConfigReport = class extends _classSuper {
1739
+ static { _classThis = this; }
1740
+ static {
1741
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1742
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1743
+ IrrigationCCValveConfigReport = _classThis = _classDescriptor.value;
1744
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1745
+ __runInitializers(_classThis, _classExtraInitializers);
1746
+ }
1747
+ constructor(options) {
1748
+ super(options);
1749
+ // TODO: Check implementation:
1750
+ this.valveId = options.valveId;
1751
+ this.nominalCurrentHighThreshold = options.nominalCurrentHighThreshold;
1752
+ this.nominalCurrentLowThreshold = options.nominalCurrentLowThreshold;
1753
+ this.maximumFlow = options.maximumFlow;
1754
+ this.highFlowThreshold = options.highFlowThreshold;
1755
+ this.lowFlowThreshold = options.lowFlowThreshold;
1756
+ this.useRainSensor = options.useRainSensor;
1757
+ this.useMoistureSensor = options.useMoistureSensor;
1758
+ }
1759
+ static from(raw, ctx) {
1760
+ validatePayload(raw.payload.length >= 4);
1761
+ let valveId;
1762
+ if ((raw.payload[0] & 0b1) === ValveType.MasterValve) {
1763
+ valveId = "master";
1764
+ }
1765
+ else {
1766
+ valveId = raw.payload[1];
1767
+ }
1768
+ const nominalCurrentHighThreshold = 10 * raw.payload[2];
1769
+ const nominalCurrentLowThreshold = 10 * raw.payload[3];
1770
+ let offset = 4;
1771
+ let maximumFlow;
1772
+ {
1773
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1774
+ validatePayload(scale === 0 /* l/h */);
1775
+ maximumFlow = value;
1776
+ offset += bytesRead;
1777
+ }
1778
+ let highFlowThreshold;
1779
+ {
1780
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1781
+ validatePayload(scale === 0 /* l/h */);
1782
+ highFlowThreshold = value;
1783
+ offset += bytesRead;
1784
+ }
1785
+ let lowFlowThreshold;
1786
+ {
1787
+ const { value, scale, bytesRead } = parseFloatWithScale(raw.payload.subarray(offset));
1788
+ validatePayload(scale === 0 /* l/h */);
1789
+ lowFlowThreshold = value;
1790
+ offset += bytesRead;
1791
+ }
1792
+ validatePayload(raw.payload.length >= offset + 1);
1793
+ const useRainSensor = !!(raw.payload[offset] & 0b1);
1794
+ const useMoistureSensor = !!(raw.payload[offset] & 0b10);
1795
+ return new this({
1796
+ nodeId: ctx.sourceNodeId,
1797
+ valveId,
1798
+ nominalCurrentHighThreshold,
1799
+ nominalCurrentLowThreshold,
1800
+ maximumFlow,
1801
+ highFlowThreshold,
1802
+ lowFlowThreshold,
1803
+ useRainSensor,
1804
+ useMoistureSensor,
1805
+ });
1806
+ }
1807
+ persistValues(ctx) {
1808
+ if (!super.persistValues(ctx))
1809
+ return false;
1810
+ // nominalCurrentHighThreshold
1811
+ const nominalCurrentHighThresholdValue = IrrigationCCValues
1812
+ .nominalCurrentHighThreshold(this.valveId);
1813
+ this.ensureMetadata(ctx, nominalCurrentHighThresholdValue);
1814
+ this.setValue(ctx, nominalCurrentHighThresholdValue, this.nominalCurrentHighThreshold);
1815
+ // nominalCurrentLowThreshold
1816
+ const nominalCurrentLowThresholdValue = IrrigationCCValues
1817
+ .nominalCurrentLowThreshold(this.valveId);
1818
+ this.ensureMetadata(ctx, nominalCurrentLowThresholdValue);
1819
+ this.setValue(ctx, nominalCurrentLowThresholdValue, this.nominalCurrentLowThreshold);
1820
+ // maximumFlow
1821
+ const maximumFlowValue = IrrigationCCValues.maximumFlow(this.valveId);
1822
+ this.ensureMetadata(ctx, maximumFlowValue);
1823
+ this.setValue(ctx, maximumFlowValue, this.maximumFlow);
1824
+ // highFlowThreshold
1825
+ const highFlowThresholdValue = IrrigationCCValues.highFlowThreshold(this.valveId);
1826
+ this.ensureMetadata(ctx, highFlowThresholdValue);
1827
+ this.setValue(ctx, highFlowThresholdValue, this.highFlowThreshold);
1828
+ // lowFlowThreshold
1829
+ const lowFlowThresholdValue = IrrigationCCValues.lowFlowThreshold(this.valveId);
1830
+ this.ensureMetadata(ctx, lowFlowThresholdValue);
1831
+ this.setValue(ctx, lowFlowThresholdValue, this.lowFlowThreshold);
1832
+ // useRainSensor
1833
+ const useRainSensorValue = IrrigationCCValues.useRainSensor(this.valveId);
1834
+ this.ensureMetadata(ctx, useRainSensorValue);
1835
+ this.setValue(ctx, useRainSensorValue, this.useRainSensor);
1836
+ // useMoistureSensor
1837
+ const useMoistureSensorValue = IrrigationCCValues.useMoistureSensor(this.valveId);
1838
+ this.ensureMetadata(ctx, useMoistureSensorValue);
1839
+ this.setValue(ctx, useMoistureSensorValue, this.useMoistureSensor);
1840
+ return true;
1841
+ }
1842
+ valveId;
1843
+ nominalCurrentHighThreshold;
1844
+ nominalCurrentLowThreshold;
1845
+ maximumFlow;
1846
+ highFlowThreshold;
1847
+ lowFlowThreshold;
1848
+ useRainSensor;
1849
+ useMoistureSensor;
1850
+ toLogEntry(ctx) {
1851
+ return {
1852
+ ...super.toLogEntry(ctx),
1853
+ message: {
1854
+ "valve ID": this.valveId,
1855
+ "nominal current high threshold": `${this.nominalCurrentHighThreshold} mA`,
1856
+ "nominal current low threshold": `${this.nominalCurrentLowThreshold} mA`,
1857
+ "maximum flow": `${this.maximumFlow} l/h`,
1858
+ "high flow threshold": `${this.highFlowThreshold} l/h`,
1859
+ "low flow threshold": `${this.lowFlowThreshold} l/h`,
1860
+ "use rain sensor": this.useRainSensor,
1861
+ "use moisture sensor": this.useMoistureSensor,
1862
+ },
1863
+ };
1864
+ }
1865
+ };
1866
+ return IrrigationCCValveConfigReport = _classThis;
1867
+ })();
1868
+ export { IrrigationCCValveConfigReport };
1869
+ let IrrigationCCValveConfigGet = (() => {
1870
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveConfigGet), expectedCCResponse(IrrigationCCValveConfigReport, testResponseForIrrigationCommandWithValveId)];
1871
+ let _classDescriptor;
1872
+ let _classExtraInitializers = [];
1873
+ let _classThis;
1874
+ let _classSuper = IrrigationCC;
1875
+ var IrrigationCCValveConfigGet = class extends _classSuper {
1876
+ static { _classThis = this; }
1877
+ static {
1878
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1879
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1880
+ IrrigationCCValveConfigGet = _classThis = _classDescriptor.value;
1881
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1882
+ __runInitializers(_classThis, _classExtraInitializers);
1883
+ }
1884
+ constructor(options) {
1885
+ super(options);
1886
+ this.valveId = options.valveId;
1887
+ }
1888
+ static from(_raw, _ctx) {
1889
+ // TODO: Deserialize payload
1890
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1891
+ // return new IrrigationCCValveConfigGet({
1892
+ // nodeId: ctx.sourceNodeId,
1893
+ // });
1894
+ }
1895
+ valveId;
1896
+ serialize(ctx) {
1897
+ this.payload = Bytes.from([
1898
+ this.valveId === "master" ? 1 : 0,
1899
+ this.valveId === "master" ? 1 : this.valveId || 1,
1900
+ ]);
1901
+ return super.serialize(ctx);
1902
+ }
1903
+ toLogEntry(ctx) {
1904
+ return {
1905
+ ...super.toLogEntry(ctx),
1906
+ message: {
1907
+ "valve ID": this.valveId,
1908
+ },
1909
+ };
1910
+ }
1911
+ };
1912
+ return IrrigationCCValveConfigGet = _classThis;
1913
+ })();
1914
+ export { IrrigationCCValveConfigGet };
1915
+ let IrrigationCCValveRun = (() => {
1916
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveRun), useSupervision()];
1917
+ let _classDescriptor;
1918
+ let _classExtraInitializers = [];
1919
+ let _classThis;
1920
+ let _classSuper = IrrigationCC;
1921
+ var IrrigationCCValveRun = class extends _classSuper {
1922
+ static { _classThis = this; }
1923
+ static {
1924
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1925
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1926
+ IrrigationCCValveRun = _classThis = _classDescriptor.value;
1927
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1928
+ __runInitializers(_classThis, _classExtraInitializers);
1929
+ }
1930
+ constructor(options) {
1931
+ super(options);
1932
+ this.valveId = options.valveId;
1933
+ this.duration = options.duration;
1934
+ }
1935
+ static from(_raw, _ctx) {
1936
+ // TODO: Deserialize payload
1937
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1938
+ // return new IrrigationCCValveRun({
1939
+ // nodeId: ctx.sourceNodeId,
1940
+ // });
1941
+ }
1942
+ valveId;
1943
+ duration;
1944
+ serialize(ctx) {
1945
+ this.payload = Bytes.from([
1946
+ this.valveId === "master" ? 1 : 0,
1947
+ this.valveId === "master" ? 1 : this.valveId || 1,
1948
+ 0,
1949
+ 0,
1950
+ ]);
1951
+ this.payload.writeUInt16BE(this.duration, 2);
1952
+ return super.serialize(ctx);
1953
+ }
1954
+ toLogEntry(ctx) {
1955
+ const message = {
1956
+ "valve ID": this.valveId,
1957
+ };
1958
+ if (this.duration) {
1959
+ message.duration = `${this.duration} s`;
1960
+ }
1961
+ else {
1962
+ message.action = "turn off";
1963
+ }
1964
+ return {
1965
+ ...super.toLogEntry(ctx),
1966
+ message,
1967
+ };
1968
+ }
1969
+ };
1970
+ return IrrigationCCValveRun = _classThis;
1971
+ })();
1972
+ export { IrrigationCCValveRun };
1973
+ let IrrigationCCValveTableSet = (() => {
1974
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveTableSet), useSupervision()];
1975
+ let _classDescriptor;
1976
+ let _classExtraInitializers = [];
1977
+ let _classThis;
1978
+ let _classSuper = IrrigationCC;
1979
+ var IrrigationCCValveTableSet = class extends _classSuper {
1980
+ static { _classThis = this; }
1981
+ static {
1982
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1983
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1984
+ IrrigationCCValveTableSet = _classThis = _classDescriptor.value;
1985
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1986
+ __runInitializers(_classThis, _classExtraInitializers);
1987
+ }
1988
+ constructor(options) {
1989
+ super(options);
1990
+ this.tableId = options.tableId;
1991
+ this.entries = options.entries;
1992
+ }
1993
+ static from(_raw, _ctx) {
1994
+ // TODO: Deserialize payload
1995
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
1996
+ // return new IrrigationCCValveTableSet({
1997
+ // nodeId: ctx.sourceNodeId,
1998
+ // });
1999
+ }
2000
+ tableId;
2001
+ entries;
2002
+ serialize(ctx) {
2003
+ this.payload = new Bytes(1 + this.entries.length * 3);
2004
+ this.payload[0] = this.tableId;
2005
+ for (let i = 0; i < this.entries.length; i++) {
2006
+ const entry = this.entries[i];
2007
+ const offset = 1 + i * 3;
2008
+ this.payload[offset] = entry.valveId;
2009
+ this.payload.writeUInt16BE(entry.duration, offset + 1);
2010
+ }
2011
+ return super.serialize(ctx);
2012
+ }
2013
+ toLogEntry(ctx) {
2014
+ const message = {
2015
+ "table ID": this.tableId,
2016
+ };
2017
+ for (let i = 0; i < this.entries.length; i++) {
2018
+ const entry = this.entries[i];
2019
+ const valveLabel = padStart(entry.valveId.toString(), 3, "0");
2020
+ if (entry.duration) {
2021
+ message[`valve ${valveLabel} duration`] = `${entry.duration} s`;
2022
+ }
2023
+ else {
2024
+ message[`valve ${valveLabel} action`] = `turn off`;
2025
+ }
2026
+ }
2027
+ return {
2028
+ ...super.toLogEntry(ctx),
2029
+ message,
2030
+ };
2031
+ }
2032
+ };
2033
+ return IrrigationCCValveTableSet = _classThis;
2034
+ })();
2035
+ export { IrrigationCCValveTableSet };
2036
+ let IrrigationCCValveTableReport = (() => {
2037
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveTableReport)];
2038
+ let _classDescriptor;
2039
+ let _classExtraInitializers = [];
2040
+ let _classThis;
2041
+ let _classSuper = IrrigationCC;
2042
+ var IrrigationCCValveTableReport = class extends _classSuper {
2043
+ static { _classThis = this; }
2044
+ static {
2045
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2046
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2047
+ IrrigationCCValveTableReport = _classThis = _classDescriptor.value;
2048
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2049
+ __runInitializers(_classThis, _classExtraInitializers);
2050
+ }
2051
+ constructor(options) {
2052
+ super(options);
2053
+ // TODO: Check implementation:
2054
+ this.tableId = options.tableId;
2055
+ this.entries = options.entries;
2056
+ }
2057
+ static from(raw, ctx) {
2058
+ validatePayload((raw.payload.length - 1) % 3 === 0);
2059
+ const tableId = raw.payload[0];
2060
+ const entries = [];
2061
+ for (let offset = 1; offset < raw.payload.length; offset += 3) {
2062
+ entries.push({
2063
+ valveId: raw.payload[offset],
2064
+ duration: raw.payload.readUInt16BE(offset + 1),
2065
+ });
2066
+ }
2067
+ return new this({
2068
+ nodeId: ctx.sourceNodeId,
2069
+ tableId,
2070
+ entries,
2071
+ });
2072
+ }
2073
+ tableId;
2074
+ entries;
2075
+ toLogEntry(ctx) {
2076
+ const message = {
2077
+ "table ID": this.tableId,
2078
+ };
2079
+ for (let i = 0; i < this.entries.length; i++) {
2080
+ const entry = this.entries[i];
2081
+ const valveLabel = padStart(entry.valveId.toString(), 3, "0");
2082
+ if (entry.duration) {
2083
+ message[`valve ${valveLabel} duration`] = `${entry.duration} s`;
2084
+ }
2085
+ else {
2086
+ message[`valve ${valveLabel} action`] = `turn off`;
2087
+ }
2088
+ }
2089
+ return {
2090
+ ...super.toLogEntry(ctx),
2091
+ message,
2092
+ };
2093
+ }
2094
+ };
2095
+ return IrrigationCCValveTableReport = _classThis;
2096
+ })();
2097
+ export { IrrigationCCValveTableReport };
2098
+ function testResponseForIrrigationValveTableGet(sent, received) {
2099
+ return received.tableId === sent.tableId;
2100
+ }
2101
+ let IrrigationCCValveTableGet = (() => {
2102
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveTableGet), expectedCCResponse(IrrigationCCValveTableReport, testResponseForIrrigationValveTableGet)];
2103
+ let _classDescriptor;
2104
+ let _classExtraInitializers = [];
2105
+ let _classThis;
2106
+ let _classSuper = IrrigationCC;
2107
+ var IrrigationCCValveTableGet = class extends _classSuper {
2108
+ static { _classThis = this; }
2109
+ static {
2110
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2111
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2112
+ IrrigationCCValveTableGet = _classThis = _classDescriptor.value;
2113
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2114
+ __runInitializers(_classThis, _classExtraInitializers);
2115
+ }
2116
+ constructor(options) {
2117
+ super(options);
2118
+ this.tableId = options.tableId;
2119
+ }
2120
+ static from(_raw, _ctx) {
2121
+ // TODO: Deserialize payload
2122
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
2123
+ // return new IrrigationCCValveTableGet({
2124
+ // nodeId: ctx.sourceNodeId,
2125
+ // });
2126
+ }
2127
+ tableId;
2128
+ serialize(ctx) {
2129
+ this.payload = Bytes.from([this.tableId]);
2130
+ return super.serialize(ctx);
2131
+ }
2132
+ toLogEntry(ctx) {
2133
+ return {
2134
+ ...super.toLogEntry(ctx),
2135
+ message: {
2136
+ "table ID": this.tableId,
2137
+ },
2138
+ };
2139
+ }
2140
+ };
2141
+ return IrrigationCCValveTableGet = _classThis;
2142
+ })();
2143
+ export { IrrigationCCValveTableGet };
2144
+ let IrrigationCCValveTableRun = (() => {
2145
+ let _classDecorators = [CCCommand(IrrigationCommand.ValveTableRun), useSupervision()];
2146
+ let _classDescriptor;
2147
+ let _classExtraInitializers = [];
2148
+ let _classThis;
2149
+ let _classSuper = IrrigationCC;
2150
+ var IrrigationCCValveTableRun = class extends _classSuper {
2151
+ static { _classThis = this; }
2152
+ static {
2153
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2154
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2155
+ IrrigationCCValveTableRun = _classThis = _classDescriptor.value;
2156
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2157
+ __runInitializers(_classThis, _classExtraInitializers);
2158
+ }
2159
+ constructor(options) {
2160
+ super(options);
2161
+ this.tableIDs = options.tableIDs;
2162
+ if (this.tableIDs.length < 1) {
2163
+ throw new ZWaveError(`${this.constructor.name}: At least one table ID must be specified.`, ZWaveErrorCodes.Argument_Invalid);
2164
+ }
2165
+ }
2166
+ static from(_raw, _ctx) {
2167
+ // TODO: Deserialize payload
2168
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
2169
+ // return new IrrigationCCValveTableRun({
2170
+ // nodeId: ctx.sourceNodeId,
2171
+ // });
2172
+ }
2173
+ tableIDs;
2174
+ serialize(ctx) {
2175
+ this.payload = Bytes.from(this.tableIDs);
2176
+ return super.serialize(ctx);
2177
+ }
2178
+ toLogEntry(ctx) {
2179
+ return {
2180
+ ...super.toLogEntry(ctx),
2181
+ message: {
2182
+ "table IDs": this.tableIDs
2183
+ .map((id) => padStart(id.toString(), 3, "0"))
2184
+ .join(", "),
2185
+ },
2186
+ };
2187
+ }
2188
+ };
2189
+ return IrrigationCCValveTableRun = _classThis;
2190
+ })();
2191
+ export { IrrigationCCValveTableRun };
2192
+ let IrrigationCCSystemShutoff = (() => {
2193
+ let _classDecorators = [CCCommand(IrrigationCommand.SystemShutoff), useSupervision()];
2194
+ let _classDescriptor;
2195
+ let _classExtraInitializers = [];
2196
+ let _classThis;
2197
+ let _classSuper = IrrigationCC;
2198
+ var IrrigationCCSystemShutoff = class extends _classSuper {
2199
+ static { _classThis = this; }
2200
+ static {
2201
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2202
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2203
+ IrrigationCCSystemShutoff = _classThis = _classDescriptor.value;
2204
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2205
+ __runInitializers(_classThis, _classExtraInitializers);
2206
+ }
2207
+ constructor(options) {
2208
+ super(options);
2209
+ this.duration = options.duration;
2210
+ }
2211
+ static from(_raw, _ctx) {
2212
+ // TODO: Deserialize payload
2213
+ throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
2214
+ // return new IrrigationCCSystemShutoff({
2215
+ // nodeId: ctx.sourceNodeId,
2216
+ // });
2217
+ }
2218
+ duration;
2219
+ serialize(ctx) {
2220
+ this.payload = Bytes.from([this.duration ?? 255]);
2221
+ return super.serialize(ctx);
2222
+ }
2223
+ toLogEntry(ctx) {
2224
+ return {
2225
+ ...super.toLogEntry(ctx),
2226
+ message: {
2227
+ duration: this.duration === 0
2228
+ ? "temporarily"
2229
+ : this.duration === 255 || this.duration === undefined
2230
+ ? "permanently"
2231
+ : `${this.duration} hours`,
2232
+ },
2233
+ };
2234
+ }
2235
+ };
2236
+ return IrrigationCCSystemShutoff = _classThis;
2237
+ })();
2238
+ export { IrrigationCCSystemShutoff };
2239
+ //# sourceMappingURL=IrrigationCC.js.map