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

3 irrigation accessories with two zones #2

Closed miquellaboria closed 3 years ago

miquellaboria commented 3 years ago

Hi! First of all good job! I have a question, I have defined two zones, but on homekit I see three irrigation accessories:

IMG_0443 IMG_0444

What is the first accessory? It have to be ON or OFF? My zones are "Llimoner" and "Jess".

I have configured the plugin and today I get a message "No Irrigation Scheduled", is for the forecast conditions?

Thanks!!

MTry commented 3 years ago

Hi - the first one you see as “Irrigation” is the master service - you cannot turn it on or off and it’s state is based on whether the associated zones are running or idle. When there is a schedule set you will see “Schedule” in the mode instead of MANUAL.

So what you are seeing is correct and you need to setup your automations based on "Llimoner" and “Jess” which are the actual sprinkler accessories under the Irrigation service.

Could you recheck your configuration again to make sure all conditions for scheduling are being met:

If all else fails, do share the plugin’s config block after deleting the sensitive info like userIDs/passwords/APIkey

Let me know if this helps.

On 14-Apr-2021, at 2:57 PM, Miquel Labòria @.***> wrote:

Hi! First of all good job! I have a question, I have defined two zones, but on homekit I see three irrigation accessories:

https://user-images.githubusercontent.com/1266767/114687445-114b8200-9d14-11eb-96df-294c85580ef6.PNG https://user-images.githubusercontent.com/1266767/114687449-13154580-9d14-11eb-85d1-9ea102543ef7.PNG What is the first accessory? It have to be ON or OFF? My zones are "Llimoner" and "Jess".

I have configured the plugin and today I get a message "No Irrigation Scheduled", is for the forecast conditions?

Thanks!!

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

miquellaboria commented 3 years ago

Hi!

Thanks for your response!

I attach my config, in case you see something that is wrong:

{ "accessory": "SmartSprinklers", "name": "Irrigation", "verbosed": true, "masterDisable": false, "exposeControls": true, "recheckTime": 0, "latitude": xxx, "longitude": xxx, "altitude": 299, "keyAPI": "xxx", "cycles": 2, "sunriseOffset": 0, "lowThreshold": 10, "highThreshold": 20, "emailEnable": false, "senderName": "💦 Irrigation Control", "smtpPort": 587, "portSecure": false, "pushEnable": true, "userPO": "xxx", "tokenPO": "xxx", "priorityPO": 0, "soundPO": "pushover", "JanRad": 2.2, "FebRad": 3.3, "MarRad": 4.6, "AprRad": 5.8, "MayRad": 6.6, "JunRad": 7.4, "JulRad": 7.3, "AugRad": 6.4, "SepRad": 4.9, "OctRad": 3.5, "NovRad": 2.4, "DecRad": 2, "zones": [ { "zoneName": "Llimoner", "enabled": true, "adaptive": true, "rainFactoring": true, "defDuration": 20, "maxDuration": 30, "rainThreshold": 1.5, "tweakFactor": 100, "dripLPH": 2, "dripNos": 1, "dripArea": 0.2, "efficiency": 90, "cropCoef": 0.9, "plantDensity": 0.5, "expFactor": 1, "wateringMonths": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], "wateringWeekdays": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, { "zoneName": "Jess", "enabled": true, "adaptive": true, "rainFactoring": true, "defDuration": 20, "maxDuration": 30, "rainThreshold": 3, "tweakFactor": 100, "dripLPH": 2, "dripNos": 1, "dripArea": 0.2, "efficiency": 90, "cropCoef": 0.5, "plantDensity": 0.5, "expFactor": 1, "wateringMonths": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], "wateringWeekdays": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] } ] }

MTry commented 3 years ago

Nothing seems to be out of place here.. could you also post the logs here?

Just checking.. hope there’s no rain above 3mm predicted in your area!?🙂

On 14-Apr-2021, at 17:21, Miquel Labòria @.***> wrote:

 Hi!

Thanks for your response!

I attach my config, in case you see something that is wrong:

{ "accessory": "SmartSprinklers", "name": "Irrigation", "verbosed": true, "masterDisable": false, "exposeControls": true, "recheckTime": 0, "latitude": xxx, "longitude": xxx, "altitude": 299, "keyAPI": "xxx", "cycles": 2, "sunriseOffset": 0, "lowThreshold": 10, "highThreshold": 20, "emailEnable": false, "senderName": "💦 Irrigation Control", "smtpPort": 587, "portSecure": false, "pushEnable": true, "userPO": "xxx", "tokenPO": "xxx", "priorityPO": 0, "soundPO": "pushover", "JanRad": 2.2, "FebRad": 3.3, "MarRad": 4.6, "AprRad": 5.8, "MayRad": 6.6, "JunRad": 7.4, "JulRad": 7.3, "AugRad": 6.4, "SepRad": 4.9, "OctRad": 3.5, "NovRad": 2.4, "DecRad": 2, "zones": [ { "zoneName": "Llimoner", "enabled": true, "adaptive": true, "rainFactoring": true, "defDuration": 20, "maxDuration": 30, "rainThreshold": 1.5, "tweakFactor": 100, "dripLPH": 2, "dripNos": 1, "dripArea": 0.2, "efficiency": 90, "cropCoef": 0.9, "plantDensity": 0.5, "expFactor": 1, "wateringMonths": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], "wateringWeekdays": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, { "zoneName": "Jess", "enabled": true, "adaptive": true, "rainFactoring": true, "defDuration": 20, "maxDuration": 30, "rainThreshold": 3, "tweakFactor": 100, "dripLPH": 2, "dripNos": 1, "dripArea": 0.2, "efficiency": 90, "cropCoef": 0.5, "plantDensity": 0.5, "expFactor": 1, "wateringMonths": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], "wateringWeekdays": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] } ] }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

MTry commented 3 years ago

Please also check these against your weather conditions...

lowThreshold": 10, "highThreshold": 20,

If your min temperature falls below lowThreshold OR your max temperature is below highThreshold it won't schedule!

miquellaboria commented 3 years ago

@MTry is the temperature!

There are a lot of parameters and these had been overlooked.

Thanks again for your support!

I attach my push info:

No schedule set. Recalculation set for: 
Thursday, 15/4/2021, 7:11:49

TODAY: 
broken clouds today with 52% clouds
 Sunrise: 14/4/2021, 7:13:23 | RH: 50% 
[Min | Max] Temp: 9.29°C | 16.08°C 
Pressure: 1020 hPa | Wind: 4.66 m/s
 Precipitation: 0 mm | ETo: 4.01 mm

miquellaboria commented 3 years ago

After changing "lowThreshold" to 5 and "highThreshold" to 25, log shows:

[14/4/2021, 18:56:47] [Irrigation] Enabling irrigation. Will also recalculate now... [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] broken clouds on Wednesday 14/4/2021 with 70% clouds & 52% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.80mm|Rain:0mm|Min:9.29°C|Max:14.69°C|Wind:4.66m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Thursday 15/4/2021 with 97% clouds & 45% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.12mm|Rain:0mm|Min:10.24°C|Max:13.99°C|Wind:4.79m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] light rain on Friday 16/4/2021 with 100% clouds & 53% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.09mm|Rain:5.49mm|Min:7.1°C|Max:10.94°C|Wind:3.05m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Saturday 17/4/2021 with 85% clouds & 25% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.10mm|Rain:0mm|Min:5.56°C|Max:15.77°C|Wind:3m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] clear sky on Sunday 18/4/2021 with 0% clouds & 26% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.93mm|Rain:0mm|Min:6.34°C|Max:16.33°C|Wind:4.92m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] clear sky on Monday 19/4/2021 with 9% clouds & 32% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.78mm|Rain:0mm|Min:7.72°C|Max:18.66°C|Wind:4.12m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] light rain on Tuesday 20/4/2021 with 100% clouds & 63% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.22mm|Rain:0.5mm|Min:10.32°C|Max:13.61°C|Wind:3.23m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Wednesday 21/4/2021 with 95% clouds & 40% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.64mm|Rain:0mm|Min:9.37°C|Max:16.72°C|Wind:5.03m/s [14/4/2021, 18:56:47] [Irrigation] ------------------------------------------------ [14/4/2021, 18:56:47] [Irrigation] No schedule set, recalculation: 15/4/2021, 7:11:49 [14/4/2021, 18:56:47] [Irrigation] ------------------------------------------------

MTry commented 3 years ago

After changing "lowThreshold" to 5 and "highThreshold" to 25, log shows:

[14/4/2021, 18:56:47] [Irrigation] Enabling irrigation. Will also recalculate now... [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] broken clouds on Wednesday 14/4/2021 with 70% clouds & 52% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.80mm|Rain:0mm|Min:9.29°C|Max:14.69°C|Wind:4.66m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Thursday 15/4/2021 with 97% clouds & 45% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.12mm|Rain:0mm|Min:10.24°C|Max:13.99°C|Wind:4.79m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] light rain on Friday 16/4/2021 with 100% clouds & 53% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.09mm|Rain:5.49mm|Min:7.1°C|Max:10.94°C|Wind:3.05m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Saturday 17/4/2021 with 85% clouds & 25% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.10mm|Rain:0mm|Min:5.56°C|Max:15.77°C|Wind:3m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] clear sky on Sunday 18/4/2021 with 0% clouds & 26% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.93mm|Rain:0mm|Min:6.34°C|Max:16.33°C|Wind:4.92m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] clear sky on Monday 19/4/2021 with 9% clouds & 32% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.78mm|Rain:0mm|Min:7.72°C|Max:18.66°C|Wind:4.12m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] light rain on Tuesday 20/4/2021 with 100% clouds & 63% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.22mm|Rain:0.5mm|Min:10.32°C|Max:13.61°C|Wind:3.23m/s [14/4/2021, 18:56:47] [Irrigation] ----------------------------------------------------- [14/4/2021, 18:56:47] [Irrigation] overcast clouds on Wednesday 21/4/2021 with 95% clouds & 40% RH [14/4/2021, 18:56:47] [Irrigation] ETo:4.64mm|Rain:0mm|Min:9.37°C|Max:16.72°C|Wind:5.03m/s [14/4/2021, 18:56:47] [Irrigation] ------------------------------------------------ [14/4/2021, 18:56:47] [Irrigation] No schedule set, recalculation: 15/4/2021, 7:11:49 [14/4/2021, 18:56:47] [Irrigation] ------------------------------------------------

So your max temperature is 13.99 °C for Thursday - which is preventing the scheduling - set the highThreshold at a value which is lower than your expected max temp - in this case if you set it to 13°C, from the weather forecast it looks like it will schedule everyday over the next 7 days except on Friday when the max temp falls to 10.94°C! Did I manage to explain this?

I agree there are a lot of parameters.. kind of a tradeoff between keeping this simple and gaining extra control!

MTry commented 3 years ago

[14/4/2021, 18:56:47] [Irrigation] light rain on Friday 16/4/2021 with 100% clouds & 53% RH [14/4/2021, 18:56:47] [Irrigation] ETo:3.09mm|Rain:5.49mm|Min:7.1°C|Max:10.94°C|Wind:3.05m/s [14/4/2021, 18:56:47] [Irrigation] -----------------------------------------------------

Also, looking at above, do note that ETo is 3.09mm whereas the rain is likely to be 5.49mm - so if you have enabled rainFactoring for any zone, which you have, the system will not schedule irrigation on Friday in case you are irrigating daily...however if you were irrigating on Friday and then lets say after 1 day on Sunday, then the total ETo for Friday and Saturday would be 3.09+4.10(sat) = 7.19mm vs a total rainfall of 5.49mm over Fri & Sat causing a deficit and the system would try to irrigate 7.19-5.49=1.7mm - of course if the other conditions such as highThreshold were met!

The basic logic for the system is to try and predict the water deficit until the next irrigation schedule on a per zone basis and fulfil that as long as a user has not enforced overriding settings.

miquellaboria commented 3 years ago

Finally I understand all parameters and all working!!! Thanks again!!

[14/4/2021, 20:01:18] [Irrigation] light rain on Friday 16/4/2021 with 100% clouds & 53% RH [14/4/2021, 20:01:18] [Irrigation] ETo:3.09mm|Rain:5.49mm|Min:7.1°C|Max:10.94°C|Wind:3.05m/s [14/4/2021, 20:01:18] [Irrigation] ----------------------------------------------------- [14/4/2021, 20:01:18] [Irrigation] overcast clouds on Saturday 17/4/2021 with 85% clouds & 25% RH [14/4/2021, 20:01:18] [Irrigation] ETo:4.10mm|Rain:0mm|Min:5.56°C|Max:15.77°C|Wind:3m/s [14/4/2021, 20:01:18] [Irrigation] ----------------------------------------------------- [14/4/2021, 20:01:18] [Irrigation] clear sky on Sunday 18/4/2021 with 0% clouds & 26% RH [14/4/2021, 20:01:18] [Irrigation] ETo:4.93mm|Rain:0mm|Min:6.34°C|Max:16.33°C|Wind:4.92m/s [14/4/2021, 20:01:18] [Irrigation] ----------------------------------------------------- [14/4/2021, 20:01:18] [Irrigation] clear sky on Monday 19/4/2021 with 9% clouds & 32% RH [14/4/2021, 20:01:18] [Irrigation] ETo:4.78mm|Rain:0mm|Min:7.72°C|Max:18.66°C|Wind:4.12m/s [14/4/2021, 20:01:18] [Irrigation] ----------------------------------------------------- [14/4/2021, 20:01:18] [Irrigation] light rain on Tuesday 20/4/2021 with 100% clouds & 63% RH [14/4/2021, 20:01:18] [Irrigation] ETo:3.22mm|Rain:0.5mm|Min:10.32°C|Max:13.61°C|Wind:3.23m/s [14/4/2021, 20:01:18] [Irrigation] ----------------------------------------------------- [14/4/2021, 20:01:18] [Irrigation] overcast clouds on Wednesday 21/4/2021 with 95% clouds & 40% RH [14/4/2021, 20:01:18] [Irrigation] ETo:4.64mm|Rain:0mm|Min:9.37°C|Max:16.72°C|Wind:5.03m/s [14/4/2021, 20:01:18] [Irrigation] ------------------------------------------------ [14/4/2021, 20:01:18] [Irrigation] Watering starts: Thu 15/4/2021, 6:52:35 [14/4/2021, 20:01:18] [Irrigation] Watering finishes: Thu 15/4/2021, 7:11:48 [14/4/2021, 20:01:18] [Irrigation] Total watering time: 19:13 minutes [14/4/2021, 20:01:18] [Irrigation] ------------------------------------------------ [14/4/2021, 20:01:18] [Irrigation] Llimoner | 12:21 minutes | 2x 06:10 minute cycles [14/4/2021, 20:01:18] [Irrigation] Jess | 06:51 minutes | 2x 03:25 minute cycles [14/4/2021, 20:01:18] [Irrigation] ------------------------------------------------ [14/4/2021, 20:01:18] [Irrigation] No further reassessment before schedule! [14/4/2021, 20:01:18] [Irrigation] ------------------------------------------------

MTry commented 3 years ago

Hi Miquel - just wanted to let you know that I have pushed a release v1.3.4 and incorporated reason information display in logs as well as push/email notifications when a schedule is not set. Should help with situations like the one you faced!

Thanks for your feedback!🙂

miquellaboria commented 3 years ago

I updated and works very well! ;)

[15/4/2021, 10:26:43] [Irrigation] ------------------------------------------------ [15/4/2021, 10:26:43] [Irrigation] No schedule set: [15/4/2021, 10:26:43] [Irrigation] -Forecasted MAX temp is less that high threshold [15/4/2021, 10:26:43] [Irrigation] -No schedule available or no watering needed [15/4/2021, 10:26:43] [Irrigation] Recalculation set for: 16/4/2021, 7:10:15 [15/4/2021, 10:26:43] [Irrigation] ------------------------------------------------

PD: What irrigation system you use?

Thanks!

MTry commented 3 years ago

I updated and works very well! ;)

[15/4/2021, 10:26:43] [Irrigation] ------------------------------------------------ [15/4/2021, 10:26:43] [Irrigation] No schedule set: [15/4/2021, 10:26:43] [Irrigation] -Forecasted MAX temp is less that high threshold

Fixed the "that high threshold" spelling errors in 1.3.5

[15/4/2021, 10:26:43] [Irrigation] -No schedule available or no watering needed [15/4/2021, 10:26:43] [Irrigation] Recalculation set for: 16/4/2021, 7:10:15 [15/4/2021, 10:26:43] [Irrigation] ------------------------------------------------

PD: What irrigation system you use?

A self rigged one.. 2 x Sonoff 4CHPRO + IP65 enclosures + 12VDC DIN rail PSU + 12VDC diaphragm solenoid valves.. attached pic.

IMG_4535 (1)

miquellaboria commented 3 years ago

😱 It is very well assembled!