MTry / homebridge-smart-irrigation

Turn any electrical irrigation valve into a smart-valve.. or run your pumps on a smart schedule based on your climate! This homebridge plugin exposes a multi-zone irrigation sprinkler dummy control system to Apple's HomeKit. Although a dummy, it brings smarts of an evapotranspiration based climate and plant adaptive irrigation controller with the use of OpenWeatherMap API. The plugin can optionally email you, and/or send you push notifications through Pushover or Pushcut, with the watering schedule it has calculated, or when a watering run is completed, along with the next 7-day weather forecast. Added option to expose system controls to Homekit allowing a user to enable/disable irrigation, rechecks, push and email notifications from within the Home App. Associated WaterLevel Characteristic shows the % of watering cycle remaining.
MIT License
78 stars 4 forks source link

When in Manuell Mode, Zones do not switch ooff after set time #4

Closed bubffm closed 3 years ago

bubffm commented 3 years ago

I noticed something else.

I have three zones, for each I set the standard time to 5mins. When I active irrigation in any zone, I noticed that it does not switch off after 5 minutes. I then noticed, this is probably because the "Master" counts down from 300 minutes!

I guess that might be a bug?

IMG_0359

MTry commented 3 years ago

This is the intended operation - the ability to shut off after the duration set from Homekit is inherent in valves, however in this case the plugin does not poll the set value and handle the remaining time in order to shut the valve off - it's logic currently is to leave the "manual" mode completely in user control. Essentially, it handles driving the valves as per the times calculated under the "Scheduled" mode - rather than handling the control when in Manual mode. As a matter of fact this is the reason I suggest that the "real valve" you are using should have a fail-safe "default" time set to a value somewhat higher than the longest duration you expect a single cycle of that zone to last

MTry commented 3 years ago

To add to the above, I would need to further go down the road where in case a user sets the time manually, I must force the system off the "Scheduled" mode into a "Manual" mode if it is not already so - cancel all schedules - and wait for some other input from the user to decide whether to use climate intelligence at all or not.. or wait for a check on next sunrise or another time to re-enable schedules... gets kind of messy down this path!

At this time, if in manual mode the set duration shows as "0" while in Scheduled mode it will show the cycle time for that zone that has been calculated - so its more of a display characteristic to give the user some information.

bubffm commented 3 years ago

ok, thanks, understood!