Irrigation Unlimited Integration

Sure, let’s have a crack at it. Pull the files from the repository and add a toggle: true to the check_back: object. It will do a back to back on/off or off/on depending on the state. Let me know.

Despite it’s raining like cats and dogs, in French we’ll say Il pleut comme vache qui pisse (I let you find the way to translate it :wink: ), it made the test and it is perfect. So now I may generalize the solution.

Side question: do you consider water consumption code stabilized or do you need so more tests?

Best to update over on the issue.

Apologies, I’ve been otherwise tied up. I did reset the timings on the controller side, and I seem to be getting the correct sprinkler on times now. I’ll have a closer look when I get some time and check exactly what it’s doing for the benefit of others that ay be having similar issues.

Hey All,

I’ve had this issue in the past where the dropdowns are not populated correctly. I know I was fine yesterday however when I checked this afternoon post updating HA and any other components it was as per the image below. Nothing really untoward showing in the logs.

image

OK, so the update is that the dropdown contents disappear if I reload HA configuration. I also need to run the Load UI Controls automation to repopulate them.

Does anyone know of a way to detect when config has been loaded and run the automation.

Cheers,
Paul

The only notification I can see is a service_call.

event_type: call_service
data:
  domain: input_select
  service: reload
  service_data: {}
origin: LOCAL
time_fired: "2023-12-07T04:28:05.123082+00:00"
context:
  id: 01HH18GT426QYQJYP1H9N6XD4W
  parent_id: null
  user_id: f68a0af8d31242f397e348e33894393e

I’m a little late to the party here. I feel like “unlimited” might be an understatement. Thank you Robert (and other contributors) for your work!

I’m trying to make it easy for others to run in the HA UI and to prevent running multiple zones at once.

First, a basic question: If I do not have any pump valves, is there a use case for configuring more than one controller? I guess I can use separate controllers for segmenting zones, but I’m kind of doing that already with multiple sequences.

Due to limited water pressure I’m using sequences to make sure only one zone (valve) runs at a time. I have to be careful to not let sequences overlap time-wise as it seems like it’s possible to schedule overlaps and run multiple zones.

Also, In the card below I’m able to do a manual run on the controller itself, which seems to turn on all vales at once. I’d like to prevent that so I’d like the user to be able to only run sequences.

Has anyone done a card modification where the card only shows the sequences? That is, where there’s no UI for the controller itself?

I’d also like to hide sequences that don’t have a schedule up soon (like “Summer” in the image). Any pointers to do that?

Finally, doe the HA cards have a hover/more info ability? The friendly names are brief and would love to be able to have a more detailed description for the various objects. It that something that could be accomplished now with User Objects?

Here’s my simple config I’m using:

refresh_interval: 5
controllers:
  - name: First controller
    zones:
      - name: "Zone 1"
        entity_id: switch.esphome_web_e1f178_esp_station_1
      - name: "Zone 2"
        entity_id: switch.esphome_web_e1f178_esp_station_2
      - name: "Zone 24"
        entity_id: switch.esphome_web_e1f178_esp_station_24
      - name: "Zone 3"
        entity_id: switch.esphome_web_e1f178_esp_station_3
    sequences:
        - name: "Spring and Autum"
          schedules:
            - time: "20:12"
          zones:
              - zone_id: [1,2]
                duration: 10
              - zone_id: 3
                duration: 15
        - name: "Summer"
          duration: 60
          schedules:
            - name: "The 8 O'Clock oen"
              time: "15:12"
              month: [jun, jul, aug]
              # weekday: [mon,wed,fri]
          zones:
              - zone_id: 1
                duration: 10
              - zone_id: 2
                duration: 5
              - zone_id: 3
                duration: 15

Welcome, you’re never too late.

I have seen one scenario where they wanted to split control of a system to various users and multiple controllers was the way to go. You can show/hide selected controllers in the card.

Sequences can overlap so you will need to be careful with the scheduling.

There is a HA plugin card-mod which allows you to play with cards. Add this to the bottom of the card configuration:

card_mod:
  style: |
    div.iu-controller-row .iu-td7 {
      display: none;
    }
    div.iu-control-panel {
      display: none;
    }

It will hide the controller menu and the panel to just leave the sequences (turn the selections on/off before you hide it).

Currently there is no hover but something to think about.

Enjoy.

1 Like

A further update that will also hide sequences that are not due to run in the immediate future. Here is the full card configuration. Note: You must install card-mod first.

type: custom:irrigation-unlimited-card
always_show_sequences: true
always_show_zones: false
card_mod:
  style: |
    div.iu-controller-row .iu-td7 {
      display: none;
    }
    div.iu-control-panel {
      display: none;
    }
    div.iu-sequence-row.iu-enabled:not(.iu-suspended,.iu-running) {
      display: none;
    }
1 Like

Perfect!

Or I can make it show somewhat disabled. I’m sure there’s more creative css to try.

    div.iu-sequence-row.iu-enabled:not(.iu-suspended,.iu-running) {
      color: red;
      pointer-events: none;
      text-decoration: line-through;
    }

Thank you.

One followup question.

If I define zone_ids for my zones and use those names (instead of the zone number) the UI shows the zone_id instead of the name. Is that expected?

   zones:
      - name: "Drips by hot tub & primary"
        #zone_id: drips_ne_lower
        entity_id: switch.esphome_web_e1f178_esp_station_1

      - name: "Horseshoe Pit (capped)"
        zone_id: pit_lawn_x
        entity_id: switch.esphome_web_e1f178_esp_station_2

      - name: "Horseshoe Pit upper drips"
        zone_id: drips_ne_upper
        entity_id: switch.esphome_web_e1f178_esp_station_3

   sequences:
        - name: "Drips"
          enabled: true
          duration: 20
          schedules:
            - name: "Daily Drips"
              time: "18:50"
          zones:
            - zone_id: 1
            - zone_id: drips_ne_upper
            - zone_id: drips_n
            - zone_id: drips_n_uphill

Thanks.

It’s a bug. Will fix it up.

Thank you!

Do you see any problem with having the pop-ups for the zones in the sequence to be the same as the pop-up menus for the zones? If my UI only shows sequences then would be handy to have the “manual” (and cancel) option for the individual zones that make up the sequence.

Maybe I’m missing something, but how is a running sequence canceled?

Thanks!

The sequence zone can represent one or more physical zones therefore the menu option would apply to all the referenced zones. A manual run like this could be done but there would be no user feedback as it happens outside of the sequence on the zone level. The zone would be operating and the only indication would be the controller lit up.

Sequences got a bit of a work over recently. They operate in the same way but now have HA entities that represent them. A couple of service calls were added in the process; As you noticed there is no way to cancel a sequence - this was added. The other was a skip which will advance the sequence to the next zone. This might serve as the cancel menu item. The new version is due out shortly.

It is also possible to embed the card within another card to augment the functionality for example:

type: entities
header:
  type: picture
  image: >-
    https://www.home-assistant.io/images/dashboards/header-footer/balloons-header.png
entities:
  - type: custom:irrigation-unlimited-card
    name: Irrigation Unlimited


Cheers

Oh, right. I forgot that a sequence zone can represent more than one physical valve.

I, obviously, was looking for a way to run just one value manually when only Sequences are visible. There’s plenty of options from just manually running the switch, to creating another card with just the zones showing. Or maybe even create additional controllers with a subset of zones (‘drips’, ‘lawn’, ‘hillside’).

Thanks for the update on the changes. Cancel and Skip! Fantastic!

Hi,

Looks like the configuration is stored inside irrigation_unlimited.coordinator attributes in a json string. This is generating the warning below. Is that a problem?

Thanks,

2024-01-19 15:10:06.083 WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for irrigation_unlimited.coordinator exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

Yes, it is a problem. It is used to restore various attributes on startup (enabled/suspended/adjustment etc). There are quite a few fields that can be culled. Very handy for development purposes. Will hide non-essential fields but add a extended_config flag in the config to expose if required.

Can you explain what these times represent, how they are created and how to clear them?

I have 4 zones that I want to run as a sequence on odd days. I am adjusting the durration via HAsmartirrigation and feel like I must be doing something wrong. Line 1 should be 26:40 and line 2 should be 52.32. When it runs, it only runs the first number on line one and then pauses. Line 2 never runs. I must be missing something?

Here is my setup…

irrigation_unlimited:
  granularity: 1
  refresh_interval: 1
  controllers:
  - name: 'Flight Field'
    all_zones_config:
      show:
        timeline: true
    zones:
      - name: "Line 1"
        entity_id: "input_boolean.v_line_1"
        show:
          timeline: true
      - name: "Line 2"
        entity_id: "input_boolean.v_line_2"
        show:
          timeline: true
      - name: "Line 3"
        entity_id: "input_boolean.v_line_3"
        show:
          timeline: true
      - name: "Line 4"
        entity_id: "input_boolean.v_line_4"
        show:
          timeline: true
    sequences:
      - name: "Watering on odd days only"
        delay: "00:00:02"
        schedules:
          - time: "16:07"
            # day: 'odd'
        zones:
            - zone_id: 1
              duration: "00:00"
            - zone_id: 2
              duration: "00:00"
            - zone_id: 3
              duration: "00:00"
            - zone_id: 4
              duration: "00:00"

And here is my test automation to set the durations…

alias: Set watering odd days to smart duration with multiplier
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.test_1
condition: []
action:
  - service: irrigation_unlimited.adjust_time
    data:
      entity_id: binary_sensor.irrigation_unlimited_c1_s1
      actual: >-
        {{ timedelta(seconds=states('sensor.line_1_with_multiplier_seconds') |
        int(0)) }}
      zones: 1
  - service: irrigation_unlimited.adjust_time
    data:
      entity_id: binary_sensor.irrigation_unlimited_c1_s1
      actual: >-
        {{ timedelta(seconds=states('sensor.line_2_with_multiplier_seconds') |
        int(0)) }}
      zones: 2
  - service: irrigation_unlimited.adjust_time
    data:
      entity_id: binary_sensor.irrigation_unlimited_c1_s1
      actual: >-
        {{ timedelta(seconds=states('sensor.line_3_with_multiplier_seconds') |
        int(0)) }}
      zones: 3
  - service: irrigation_unlimited.adjust_time
    data:
      entity_id: binary_sensor.irrigation_unlimited_c1_s1
      actual: >-
        {{ timedelta(seconds=states('sensor.line_4_with_multiplier_seconds') |
        int(0)) }}
      zones: 4
mode: single

I think I figured out my own answer. Just needed to reset it an all is well. Now trying to figure out the best way to put it on pause for high wind delay. Basically need a trigger on start then to make it wait till I tell it to start the sequence or if the tests fail… skip the sequence altogether.