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