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 3 forks source link

Help or Questions #32

Closed jchristianj closed 2 years ago

jchristianj commented 2 years ago

Hi! First of all, great plugin and thanks for your effort in making and maintaining it. One question: As far as I understand, if not all days are checked for watering or a temperature limit criteria is not met on a watering day, then the watering deficit is summed up and will be compensated on the next possible watering day.

Day 1 --> calculated ET0 3mm, watering 3mm, deficit 0mm Day 2 --> calculated ET0 4mm, no watering possible or not checked, deficit 4mm Day 3 --> caclulated ET0 5mm, no watering possible or not checked, deficit 4+5=9mm Day 4 --> caclulated ET0 6mm, watering 4+9+6=19mm, deficit 0mm Day 5 --> ....

Is my understanding correct? What happens when home bridge is re-booted or crashes and needs reboot on day 3? Will the deficit value be stored somewhere or is it reset to 0?

Thanks a lot. Cheers Christian

MTry commented 2 years ago

Hi Christian - the way to look at it is that at any given point of time the intent is to calculate “for how many days further” must you water today if today is the day that watering is permitted as per your schedule. So recovering from a crash is irrelevant because historic watering is not a factor!

Looking at it another way, lets say today(my Sunday) I reboot the system with a zone set for watering on Mondays and Thursdays. The plugin calculates the watering requirements between Monday and Thursdays and waters on Monday. At ALL points of time between Monday and Thursday’s scheduled watering time, the plugin will calculate the watering requirement for future "Thu/Fri/Sat/Sun" and irrigate on Thursday.

So watering is predictive and not deficit-based which eliminates the relevance or reboot - hope I was able to explain this?

On 17-Apr-2022, at 11:39, jchristianj @.***> wrote:

Hi! First of all, great plugin and thanks for your effort in making and maintaining it. One question: As far as I understand, if not all days are checked for watering or a temperature limit criteria is not met on a watering day, then the watering deficit is summed up and will be compensated on the next possible watering day.

Day 1 --> calculated ET0 3mm, watering 3mm, deficit 0mm Day 2 --> calculated ET0 4mm, no watering possible or not checked, deficit 4mm Day 3 --> caclulated ET0 5mm, no watering possible or not checked, deficit 4+5=9mm Day 4 --> caclulated ET0 6mm, watering 4+9+6=19mm, deficit 0mm Day 5 --> ....

Is my understanding correct? What happens when home bridge is re-booted or crashes and needs reboot on day 3? Will the deficit value be stored somewhere or is it reset to 0?

Thanks a lot. Cheers Christian

— Reply to this email directly, view it on GitHub https://github.com/MTry/homebridge-smart-irrigation/issues/32, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP4KMAGAAH2EEFVXNOSGBTVFOTKTANCNFSM5TTNB2RQ. You are receiving this because you were assigned.

jchristianj commented 2 years ago

Very well, thank you. Understood this and played around with the settings just to get a feeling of that logic. Another point I may ask you about: I have two watering zones which are irrigated in 2 cycles. If I skip one zone (e.g. it is not the zone's watering day), then both cycles of the watered zone are directly executed one after the other. This leads to a malfunction in homekit I assume: After first watering cycle the valve is switched off, and in the same second it is switched on again. As I am using an Eve Water valve which reacts a bit slow, so it does somehow not open for the second cycle. Is it possible to add a timer of lets say 30 seconds between the cycles? A workaround could be to add a third zone (dummy zone) which is included in watering every day for a fixed value of 1 minute, but this is not very elegant. Any ideas from your side?

MTry commented 2 years ago

Your workaround is brilliant!! 🙂

Your suggestion is well noted though as it is a very likely scenario - will work on adding this feature of a "gap" between cycles for sure.. and even a 5 second gap between cycles, even for multi-zone setups isn't going to hurt anyone.

Thanks for your suggestion!