Irrigation Unlimited Integration

Thanks for the reply! Once I set it, I am not sure how to change this parameter throughout the services available, or are you suggesting to use the season approach as this option is not available?

You should be able to manipulate this setting with the load_schedule service call. Just be aware that currently changes made this way are not permanent and will revert to the yaml on a HA restart.

1 Like

So I get this:

> Invalid config for [irrigation_unlimited]: [every_n_days] is an invalid option for [irrigation_unlimited]. Check: irrigation_unlimited->irrigation_unlimited->controllers->0->sequences->0->schedules->0->every_n_days. (See /config/configuration.yaml, line 276).

If I try to set

every_n_days: 2

Complete conf:

   - name: "Nord"
     all_zones_config:
      show:
        timeline: true
     zones:
      - name: "Valvola4"
        entity_id: "light.irrigazione_1_4_light_4"
      - name: "Valvola6"
        entity_id: "light.irrigazione_5_8_light_2"
     sequences:
      - schedules:
          - time: "21:00"
            schedule_id: "nord_time"
            every_n_days: 1
        name: "Nord"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:06:30"
          - zone_id: 2
            duration: "00:01"`Preformatted text`

I tried to add also month as it was in your reply.

Try this.

irrigation_unlimited:
  controllers:
    - name: "Nord"
      all_zones_config:
        show:
          timeline: true
      zones:
        - name: "Valvola4"
          entity_id: "light.irrigazione_1_4_light_4"
        - name: "Valvola6"
          entity_id: "light.irrigazione_5_8_light_2"
      sequences:
        - schedules:
          - time: "21:00"
            schedule_id: "nord_time"
            day:
              every_n_days: 1
              start_n_days: 2023-09-20
          name: "Nord"
          delay: "00:00:05"
          zones:
            - zone_id: 1
              duration: "00:06:30"
            - zone_id: 2
              duration: "00:01"
1 Like

Hello,

Is it possible in any way to stablish from/until what day a schedule will run, instead of complete months?

For instance, if I want it to run from april 15th - september 15th.

Thanks!

So itā€™s working as suggest, still I donā€™t see how to change the ā€œn daysā€ throughout the ā€œload scheduleā€ service.

I tested the service without the ā€œdayā€ parameter, as soon as I add it it fails.

This is the controller

   - name: "Nord"
     all_zones_config:
      show:
        timeline: true
     zones:
      - name: "Valvola4"
        entity_id: "light.irrigazione_1_4_light_4"
      - name: "Valvola6"
        entity_id: "light.irrigazione_5_8_light_2"
     sequences:
      - schedules:
          - time: "21:00"
            schedule_id: "nord_time"
            day:
              every_n_days: 1
              start_n_days: 2023-09-18
        name: "Nord"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:06:30"
          - zone_id: 2
            duration: "00:01"

and this is the service call:

service: irrigation_unlimited.load_schedule
data:
  schedule_id: nord_time
  day:
    every_n_days: 2
    start_n_days: 2023-09-18

If I remove the day parameter the call is successful, otherwise it returns:

Failed to call service irrigation_unlimited.load_schedule. Could not parse date for dictionary value @ data['day']['start_n_days']. Got None

I also tried removing ā€œstart_n_daysā€ but no way.

I donā€™t understand where is my mistake.

I donā€™t know why but if you put quotes around the date in the service call it works.

service: irrigation_unlimited.load_schedule
data:
  schedule_id: nord_time
  day:
    every_n_days: 2
    start_n_days: "2023-09-18"
1 Like

Itā€™s a good suggestion. It needs a from: and until: in the schedule.

Yes, that would be a good solution, because usually irrigation is done from one day during spring until one day at the end of summer or beginning of autum.

Thank you!

1 Like

That made the trick! Honestly I didnā€™t try it, thx.

The ā€˜spanā€™ filter enhancement is in the repository. Please manually install and check it out. Two new parameters for the schedule object from: and until:. Both are inclusive which means you canā€™t have one without the other. The format is dd mmm. Will handle a year wrap around as in the second example.

        - schedules:
          - time: "06:05"
            duration: "00:10"
            from: 15 Apr
            until: 15 Sep
          - time: "07:05"
            duration: "00:10"
            from: 15 Nov
            until: 15 Feb

Have fun.

Thanks!

Iā€™ll try tomorrow and back report to you.

Hello,

Iā€™ve updated the next files in custom_components/irrigation_unlimited:

  • const.py
  • irrigation_unlimited.py
  • schema.py
  • services.yaml

The relevant part of my configuration:

      sequences:
        - name: 'Secuencia Pinar'
          duration: '00:11'
          delay: '-00:00:10'
          schedules:
            - name: 'Noche'
              time: '00:00'
              from: 1 May
              until: 15 Sep
            - name: 'MaƱana'
              time: '09:30'
              from: 1 May
              until: 15 Sep
          zones:
            - zone_id: [2,3]
              duration: 00:06
            - zone_id: 1
              duration: 00:05
            - zone_id: 4
              duration: 00:04
            - zone_id: [2,3]
              duration: 00:06
            - zone_id: 1
              duration: 00:05
            - zone_id: 4
              duration: 00:04

When I reload irrigation_unlimited, the next error is given:

ā€œservice irrigation_unlimited/reload could not be called. ā€˜controllersā€™ā€.

Have I missed anything?

The configuration is fine and loads. Did you restart HA after updating the modules?

I didnā€™t restart. I only reloaded YAML configuration of the module in Depeloper tools.

After a restart, it works everything well.

What Iā€™m seeing is that reloading irrigation unlimited YAML configuration in Depeloper tools doesnā€™t work completely well in all the cases.

Try to reproduce this:

0: Initial yaml:

...
              from: 1 May
              until: 15 Sep
...

1: I change Sep to Oct (any date after today).
2: I reload YAML configuration and the sequence is scheduled for tomorrow.
3: I change back Oct to Sep (any date before today).
4: I reload YAML configuration and the sequence is still scheduled for tomorrow.
5: I restart HA and scheduled is deleted for tomorrow, as it should be.

This is a display problem in the card. When there is no forward schedule it is converting a null to a date which ends up at 1 Jan 1970 which happens to be a Thursday. It should actually be blank in this situation.

Iā€™m having trouble to understand how check_back works. Here is my set-up. Each time a switch is actioned it publishes the relevant data to an IP relay box using MQTT. A a matter of fact, sometimes, quite barely I must admit, there is a discrepancy between the logical state of the switch and its physical state, full moon effect :wink: ?
I have currently set-up the relay box to send the relay state to an input_boolean whenever it changes. Iā€™m wondering how check_back objet could be used then. Since there no direct integration between HA and the relay box, Iā€™m afraid check_back is of no use. What is your feeling? If not, may be a future RFI?

Hi, i found it today, but i didnā€™t come very clear.

What kind of hardware does it controls? Only valves? A list of compatible?

Thx in advance!

Hi there,

Iā€™m struggling with the duration being set at 5 minutes for each zone; however, with five zones in the sequence, Iā€™m only getting a duration of 1:07 for each zone. Iā€™ve included just the relevant sequence config to keep the size down.

Regs,
Paul

#irrigation_unlimited:
  granularity: 10
  refresh_interval: 10
  
  controllers:
    - name: Controller 1
      enabled: true

      all_zones_config:
        allow_manual: true
        duration: '00:05'

      zones:
        - zone_id: '1'
          name: 'Front Garden'
          entity_id: 
            - switch.irrigation_master_under_house
            - switch.irrigation_solenoid_1
        
        - zone_id: '2'
          name: 'Front Steps'
          entity_id: 
            - switch.irrigation_master_under_house
            - switch.irrigation_solenoid_2
        
        - zone_id: '3'
          name: 'Driveway Area'
          entity_id:
            - switch.irrigation_master_under_house
            - switch.irrigation_solenoid_3
        
        - zone_id: '4'
          name: 'Back Fence'
          entity_id: 
            - switch.irrigation_master_under_house
            - switch.irrigation_solenoid_4

        - zone_id: '5'
          name: 'Veggie Garden'
          entity_id: 
            - switch.irrigation_master_shed
            - switch.irrigation_solenoid_5

        - zone_id: '6'
          name: 'Grass Area 1'
          entity_id: 
            - switch.irrigation_master_shed
            - switch.irrigation_solenoid_6

        - zone_id: '7'
          name: 'Grass Area 2'
          entity_id: 
            - switch.irrigation_master_shed
            - switch.irrigation_solenoid_7

        - zone_id: '8'
          name: 'Outside Qais'
          entity_id: 
            - switch.irrigation_master_under_house
            - switch.irrigation_solenoid_8

        - zone_id: '9'
          name: 'Rear Retaining'
          entity_id: 
            - switch.irrigation_master_shed
            - switch.irrigation_solenoid_9

        - zone_id: '10'
          name: 'Greenhouse'
          entity_id: 
            - switch.greenhouse_bucket_irrigation

      sequences:
        - name: 'Annual - Group 1'
          schedules:
            - name: 'Summer'
              month: [dec, jan, feb]
              time: '07:00'
            - name: 'Winter'
              month: [jun, jul, aug]
              weekday: [mon, thu, sun]
              time: '07:00'
            - name: 'Spring/autumn'
              month: [mar, apr, may, sep, oct, nov]
              time: '12:25'
          zones:
            - zone_id: 2
              duration: "00:05"
            - zone_id: 4
              duration: "00:05"
            - zone_id: 5
              duration: "00:05"
            - zone_id: 8
              duration: "00:05"
            - zone_id: 9
              duration: "00:05"

Check back assumes the switch entity is read/write. In your case the switch is write only and the state is accessed via another read only entity.
One solution without any code changes might be to make the input_boolean the ā€œswitchā€. Irrigation Unlimited will still happily turn it on and off. When it changes the appropriate MQTT commands are sent but it still responds to the relay state changes. The input_boolean would reflect the physical state of the relay.
Other than that an entity_id: parameter under the check_back object which would be used to read the switch state.