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

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