Irrigation Unlimited Integration

Welcome all,

Irrigation Unlimited is an integration for irrigation or watering systems large and small. It can offer some complex arrangements without large and messy scripts. This integration will complement many other irrigation projects.

Features include:

  1. Unlimited controllers.
  2. Unlimited zones.
  3. Unlimited schedules. Schedule by absolute time or sun events (sunrise/sunset). Select by days of the week (mon/tue/wed…). Select by days in the month (1/2/3…/odd/even). Select by months in the year (jan/feb/mar…). Overlapped schedules.
  4. Unlimited sequences. Operate zones one at a time in a particular order with a delay in between. A ‘playlist’ for your zones.
  5. Hardware independant. Use your own switches/valve controllers.
  6. Software independant. Pure play python.

More information including installation instructions, configuration, documentation and examples can be found here.

Please feel free to showcase your own setups, connections to weather services, moisture sensors, valves or any other device. Suggestions and changes are most welcome.

Please enjoy.

16 Likes

Thats an awesome Integration!! Thank you for sharing this.

Is there a way to integrate a pump switch for the main water input … edit: get it, its the controller🙈

Greetings

Hi everyone,

I just wanted to briefly introduce my configuration.
I’m looking forward to the others.

By the way, very good integration, so far no problems.
Keep it up.

Thank you.



3 Likes

I am humbled that you gave me a small credit; this looks outstanding.
At the moment I am too emotionally invested in my system but I have a feeling I will at least be trying this out.

sorry for bothering you again, but it doesn’t want to start, I always get an error about the creation of the binary switches at the startup. my config:

irrigation_unlimited:
  granularity: 10
  refresh_interval: 20
  controllers:
    name: 'Hauptventil'
    entity_id: 'switch.4ch_eins_1'
    enabled: true
    preamble: '00:02'
    zones:
      - name: 'Zone 1'
        entity_id: 'switch.4ch_zwei_3'
      - name: 'Zone 2'
        entity_id: 'switch.4ch_zwei_4'
      - name: 'Zone 3'
        entity_id: 'switch.4ch_zwei_1'
      - name: 'Zone 4'
        entity_id: 'switch.4ch_zwei_2'

do i have something setup falsely? also if I specify sequences for all zones or schedules for the singular zones, it doesn’t want to startup and no services appear

second trial was:

irrigation_unlimited:
  granularity: 10
  refresh_interval: 20
  controllers:
    - name: 'Hauptventil'
      entity_id: 'switch.4ch_eins_1'
      preamble: '00:01'
      enabled: true
      zones:
        - name: 'Zone 1'
          entity_id: 'switch.4ch_zwei_3'
        - name: 'Zone 2'
          entity_id: 'switch.4ch_zwei_4'
        - name: 'Zone 3'
          entity_id: 'switch.4ch_zwei_1'
        - name: 'Zone 4'
          entity_id: 'switch.4ch_zwei_2'
      sequences:
        - name: "Multi zone"
          duration: "00:02"
          delay: "00:01"
          schedules:
            - time:
                sun: 'sunset'
                before: '00:20'
          zones:
            - zone_id: 1
            - zone_id: 2
            - zone_id: 3
            - zone_id: 4

greetings

Both configs load. I think we need to look further into those error messages regarding the creation of the binary switches. Do you have some more details, perhaps the log files might help.

sorry for the late answer, I get the following log warning in home assistant:

The following integrations and platforms could not be set up:

irrigation_unlimited.binary_sensor
Please check your config and logs.

and the log output relating to this is:

Logger: homeassistant.setup
Source: setup.py:310 
First occurred: 19:12:47 (1 occurrences) 
Last logged: 19:12:47

Unable to prepare setup for platform irrigation_unlimited.binary_sensor: Platform not found (cannot import name 'history' from 'homeassistant.components.recorder' (/usr/src/homeassistant/homeassistant/components/recorder/__init__.py)).

thanks for your help=)

Recorder and history are two dependencies of the integration. Both are part of the default configuration of home assistant. Hmm, do you have a default_config: line in your configuration.yaml file? For more information see here Default Config - Home Assistant

again sorry for my late answer and thanks for your help!
i have history and recorder in my config. Only thing is that the logger and recorder are limited to a certain amout of devices, im running from sd so i wanted to spare some r/w accesses there and kept the purge_days low.

history:
  use_include_order: true
  include:
    entities:
################ Sensoren
      - sensor.disk_free
....
recorder:
  purge_keep_days: 30
  exclude:
    domains:
      - automation
      - updater
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun 
....

Recorder loads the history platform and it seems to be having trouble. The log file should have an entry like:

2021-08-03 12:12:42 INFO (MainThread) [homeassistant.setup] Setting up history
2021-08-03 12:12:42 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds

Perhaps remove the history: section of the config to see if it something there.

today i updated your integration and there it is - everything is working fine now. im really excited to try it and hopefully can replace my NR Automation with it - this really was a mess

hey it finally works flawlessly, but a question emerges after testing your awesome integration, which I again can answer myself:

i want to run my irrigation on certain times specified elsewhere and if I declare an schedule I have to set a time accordingly, but if I doesn’t set a schedule and only start the controller all zones starts simultaneously. so is it possible to manual run a controller with a sequence without having to set a time for the sequence to run?
so more precise I want to run through 4 zones one by one called through a manual run where I set the running time via HAsmartirrigation and have a different automation calling the time depending on various factors so I want to keep this as variable as possible

but overall its awesome, I really had trouble to get my irrigation running smooth and this integration beats everything I tried so far=) thanks for programming!

1 Like

Glad to hear things are up and running.

You can perform a manual_run service call on a sequence. The entity_id must be the controller/master and then specify a sequence_id. This is a number starting at 1 for the first sequence. More information can be found in the readme in the Services section.

A sequence must have a least one schedule. Currently there is no way to enable/disable a schedule although this has come up in the past and may be added in a future release. In the meantime I suggest adding a dummy schedule that will not run for example:

          schedules:
            - name: Never, ever
              time: '06:00'
              day: [30]
              month: [feb]
1 Like

Ah perfect, that is a neat workaround - will use that! Thanks for your answers you really helped me out!!
:hugs:

me again :smiley: but this time i think its more of a festure request: it would be awesome to have the possibility to manually select zones to run a schedule onto without having to set schedules for every combination. i think of it like having input_booleans to select which then get watered. same would be awesome for different durations for the zones. normally inwould do something with templates or something, but havnt seen that this is possible, or is this still integrated and i havnt seen it…

im sorry for all that questions, but i really am burning to switch to your integration because it looks so amazing and would be awesome to get away from NR with this for stability:)

greetings

Not exactly sure on what you want to achieve and if there is a better solution. Perhaps some background on the situation might help.

You could setup a sequence with all the zones specified. Then use the enable/disable service call on the zone entities to select which will run.

I will try that, so i could manually disable zones in a sequence were every zone is specified under zones? The use case would be like in the picture following. I have four buttons which i manually can set to control if everything or just certain amount of areas got watered

Is more of an control area where i can see what my irrigation flow will take on in the evening: a few more details the time is calculated by HAsmartirrigation and the starting time depends on the weather conditions. The last point i could fix with your februar 30 workaround, but it would be awesome to have the possibility to a) select zones which needs more water with the input slider and b) only select the needed areas, so sometimes the lawn needs more water the the bushes.

Im also willing to share my code with you so u can use it as example for lovelace integration or give anything back - im so ashame of me to ask so many questions but im burning to get your integration integrated in my current flow🙈

Thanks for the background information, it helps a lot to understand the situation. I do see where you are coming from. Here is some information on how it this integration works, apologies if I am covering ground you already know but it may also help other readers.

There are two basic ways to drive the zones; the first is where each zone has their own schedule and run independently possibly overlapping with each other. The second is sequences where it runs zones one at a time. Creating a sequence achieves several things; it establishes a collective or group, puts zones into an order and possibly more significantly builds a relationship with its peers. For example a sequence with 3 zones (1, 2 and 3) where the run times are 5 min, 10 min and 15 min respectively (total 30 min) it says zone 2 needs twice the time as zone 1 and zone 3 needs 3 times zone 1. Whichever way you look at it each zone occupies a percentage of the total watering time. When you manually run a sequence you specify the total time. In the above case if you specified 15 minutes for the manual run it would run 2.5 min, 5 min and 7.5 min for the zones. Likewise times above 30 min would simply scale each zone up. Note: Due in the next release is adjustments on sequences which will work in the same way as the manual run.

The start time for sequences is anchored to a time or event and the duration flexible which makes the finish time movable. I am curious why schedules do not work for you. There are a few advantages to using schedules such as knowing what’s up next. Seasonal watering schedules are another reason, every day in summer and once a week in winter.

HAsmartirrigation doesn’t care when you run the irrigation. It just calculates the run time required and leaves it up to you which could be once a day at sunrise, twice a week at night etc. The only thing you have to do is reset the bucket after watering. There is an example automation in the readme. You can suspend watering by disabling the controller if it is raining for example. There are some examples using a Personal Weather Station (PWS) or an ESPHome soil moisture probe.

The system is designed as set and forget so once established there should be minimal need for any intervention and just let the automations that calculate the run times do their job. This integration lacks some of the detailed control you require such as dynamically specifying the zones and duration. There is a skeleton zone mask in the service calls but it is not fully developed, tested or documented - a random thought at the time. This would probably go a long way for dynamic control of which zones operate.

rgc99 thanks for your elaborated reply, no apologies its really helpful and kind of you that you take the time to answer in that way.

The start time for sequences is anchored to a time or event and the duration flexible which makes the finish time movable. I am curious why schedules do not work for you. There are a few advantages to using schedules such as knowing what’s up next. Seasonal watering schedules are another reason, every day in summer and once a week in winter.

I really like the idea of set and forget, but as this summer here where I live showed its not always necessary to water the area in an absolut repeating manner. last year we had a hot summer where I needed to water every second day and this year there was so much rain I haven’t run the irrigation more that a handful of cycles. so in my use case schedules are awesome if everything is running normally but sometimes its not useful at all - like if it rains for a week there is no need for more water - that’s where HAsmartirrigation comes into play which the calculate the time it should irrigate, if this is under a threshold it will not start the manual run.
Setting a fixed time in a schedule also has some disadvantages in my use case for example if its hot like last year I only want to run the irrigation early in the morning so the plants have time to cool down, but if its like this year I don’t care and like to have it run by the evening - so here I have setup a routine which looks at the temperature of the days and decides if it waters early or late.
my wish to manually adjust the zones picked for watering stems from the idea that it would be awesome to mix everything up - I get the point that for the automatic run there’s nearly no need to leave zones excluded - but I want to use your integration as manual scheduler and automatic scheduler and therefore it would be mandatory to select the specific zones. My point of not watering single zones is the load on the main pump, which I would like not to turn on and off after every zone und setting up different schedules for every combination out of 4 zones would be over the top=)

but im looking forward to the mentioned update, I assume that if I could set the durations in the manual run I could possible set the not needed zones to 0 and then they would be skipped - that would be awesome and be a workaround for my request.

Thanks again for your reply und the time you spent for it!

My vision for this project is a totally hands off solution. The system should be able to handle extreme weather conditions which, unfortunately, is becoming more common. A manual run is only for the very rare situation. Driving the system by manual runs is in my opinion paddling upstream and somewhat counterproductive. So on that note let’s see what can be done to make it smarter. Let’s peel apart the onion and see what problems we have:

Too much rain or too wet. This one we have covered with at least three solutions; HAsmartirrigation, your very own PWS or a soil moisture probe. Each one of these will adjust the run time from zero upwards.

Temperature sensitive schedules. The ability to change the schedule based on weather conditions. Two ideas here; Enable/disable a schedule. This came up earlier this year but for a different reason to do with seasonal watering and was tackled with the month filter. Here an external “temperature” sensor makes a service call to turn on or off schedules. With a set of predefined schedules you could select which schedule(s) to activate based on any criteria imaginable, too wet, dry, cold, hot, cloudy… The second idea is to replace/update the entire schedule. A new service call with exactly the same schema as the schedule object as documented in the readme would allow on the fly changes based on, well anything. This ties up with the ultimate goal of configuration via the UI. Not sure if you or someone else are interested in creating a schedule card for the front-end.

Not watering single zones. The main reason for this is water pressure as it’s not often possible to drive more than one valve at a time. Sequences were created for this reason. The ability to run each zone one at a time in a string based on a common schedule. If you have specified a delay between zones and don’t want the pump turning on and off then look at the preamble/postamble settings on the controller.

Zone selection. Unsure how this plays out yet given the above and the upcoming release but maybe targeting a sequence with a zone list. Let’s see what pans out here.

The next release has a sequence_id added to the adjust_time service call and operates in much the same way as in the manual_run call. It will cause the sequence duration to expand or contract all the way down to zero if required. Perfect for HAsmartirrigation.

Cheers

2 Likes