My Garden Irrigation

@axgio
Ah! Yes, good catch. Thank you

I’ve updated Github to include this in Pre-Requisites


Scenes are used in this package. If you use default_config: there is no need to add anything as it is included automatically (see - https://www.home-assistant.io/integrations/default_config/) if not then somewhere (usually in your configuration.yaml) you must include the line scene:

Hi @klogg

I 've included

  - sensor.sonoff_ch4pro_relay1
  - sensor.sonoff_ch4pro_relay2
  - sensor.sonoff_ch4pro_relay3
  - sensor.sonoff_ch4pro_relay4
  - sensor.irrigation_sensor_zone1_switch
  - sensor.irrigation_sensor_zone2_switch
  - sensor.irrigation_sensor_zone3_switch
  - sensor.irrigation_sensor_zone4_switch

in the recorder and logger (I have also some exclude: clauses, but mainly for domains and some spcific entities) but no history appears.

I have also some strange behaviour on showing the the min when using slider for each of the zones.
This happened after my last download of the repo, on 1st July

This is an animated gif, i hope it shows correctly.

Thanks

PS: Very nice the new feature to run just a single zone…

In me it looks like this:


Where can the problem be ?

Hi @klogg what is the use of this DISABLE SWITCHES? switches

I was thinking it was the rain sensor to prevent start irrigation ahah :smiley:

I have really struggled to get version 2 running, I have followed all the steps and though myself familiar, but clearly not.

Anyone have a copy of their configuration which they would be willing to share?

I have been trying to get this to work for a few weeks, I believe I have correctly followed all the prerequisites and steps on the forum.

What would really help would be:

  • Example / copy of your entire folder structure, or just the parts which relate to this project.

For example: See my public config

Is this something you would be willing to share (even just privately), as comparing my setup to yours would almost instantly show where I have missed something or made an error?

1 Like

@itajackass

HA!

I put it in purely for testing. It means I (or you) can run the package and everything will be as normal except that the actual switches will not turn on so no actual irrigation takes place.

@Richard.Huish
I had a quick look at your config and it doesn’t look like you are using packages (https://www.home-assistant.io/docs/configuration/packages/).

I’m sorry I can’t be more help right now.

@axgio - Awesome! Solved it perfectly…

@klogg - Once again thank you for this - It works a treat!

1 Like

FEATURE REQUEST:

@klogg - How difficult will it be to add sunrise / sunset with a optional offset as a trigger as when to let the irrigation start running instead of a fixed time?

Finally works for me (lovelace storage mode). The first version was good but the second is excellent. The only thing I miss is the option for a rain sensor and soil moisture.


I have a solar mini weather station with a light sensor and I will connect a rain and soil moisture sensor there.

I’ll think about it but it won’t be quick :wink:

Do you mean a binary rain sensor? i.e. it is either raining now or it isn’t. That has been asked for already and I am thinking about implementing it.

If you mean a quantity of rain that is already implemented.

That’s exactly what I mean, the amount of rain is unnecessary for me.

No rush - Would be very handy if/when implemented! Thank you!

@klogg Then, I found a minor cosmetic bug. The Calculated end time or the manual runtime does it calculation using all the eight zones, not only the enabled zones. So if you have a value from a zone not in use it is added to the total.

image

Hope it makes sense…

@klogg This might not be relevant since i extend a little bit your code, but it could be a quick one for you and i’m strangling to find a solution for the past few days and couldn’t figure it out.
I have extent your code to have 16 zones, since this would suit my needs better. My problem is that when i have more that 9 zones enabled (10…16) then when the last zone finished, it starts all over again from zone1. If i only engage 9 zones (not altering the extended code, but from the UI) everything works as it should. My guest is that there is “somewhere” a “limitation” to 1 digit (since the flow goes smoothly when i only engage 9 zones) but haven’t found anything relevant. My best guess was that this is somewhere at garden_irrigation_start but can’t see it. Can you (by any chance) make an educated guess where is the problem ?
Of course, if you want i can send you the code and use it at your git. It’s your work after all, i just find 16 zones, more useful for my needs and others might wanna use more zones as well.

Ooohhh!
I’ll check that!
(Thank you)

@Athan I will definitely look into this.

I hope to have more time available to me later in the week.

1 Like

@AthanAs you have extended the code I’m guessing you understand at least a little of what is going on so if you want to investigate for yourself before I have time to look then…

  • I think you are right that currently it cannot cope with two digit zone numbers.
  • Look in garden_irrigation_start.yaml at the script irrigation_start_a_zone
  • The script is passed the current zone as zoneX and the very last action looks only at the last character, see the line {% if zone[-1] | int == states('input_number.irrigation_number_of_zones') | int %}

You are going to have to change things so the package expects a two digit zone number i.e. zone01, zone02 ... zone16

I’m not sure what the implications will be elsewhere in the package of this change but at least you have something to help you start looking at things yourself if you choose to do so.

How does the UI look with 16 zones? Does everything display properly?

1 Like

I’m not sure I know what you mean.
I just checked and it seems to calculate the end time based on if a zone is running on that day.

image

image

Or is that not what you meant?

Sort of - Even looking at your example. Lawn 1 is set to only run for 5 minutes, thus if starting at 09:00 it should end at ~09:05, not 09:15.

So to illustrate from my config, I have currently 4 zones configured. (10 + 7 + 7 + 7), and this caluclates correctly.

Lets say I have a 5th zone, which have been configured to run for 9 minutes, it calculates correctly.

But should I change the number of zones back to 4 instead of 5, the determined end time still includes the additional 9 minutes.

Or is my understanding of the number of zones incorrect? My presumption is that only the zones defined as per number of zones will run. Or will the “hidden” zones also run?

Thank you for all your effort!

Ok… a little misunderstanding in both directions!

My example only showed that the end time did in fact change when a zone wasn’t running on a certain day - I only showed the image for zone 1, the other zones also had some time which is why the total showed 15 minutes.

However, I see now that you didn’t mean that :wink:

Yes the number of zones is the number of zones you have and only that number of zones should be irrigated so if you set it to 4 only zones 1 to 4 should get water. I am pretty sure that part works correctly.

It is however quite possible that the calculation for the end time doesn’t look at the number of zones defined because I never considered that this number would ever be anything other than the number actual zones so unused zones would have zero time.

I will look into this and it should be an easy fix.

Out of interest, why do you change the number of zones? It was only ever meant to be an initial setting but maybe it can be used in a different way to?