Smart Irrigation - save water by precisely watering your lawn/garden

I have noticed something strange today. I have an automation configured for the proper runtime as per the calculation, it ran today morning, but interestingly the timestamps do not seem to match.

  1. Today morning the bucket for the given zone showed 1111 seconds, which translates to 18 minutes 31 seconds

  2. Trace info from the automation - notice that here the total runtime is 1114 seconds, which is 18 minutes 34 seconds. This is OK in itself, I presume testing all the conditions, executing the services etc. add some time to the total runtime.

  3. However, when I check the switch history, it shows a runtime of 16:10 only

My automation:

Smart Irrigation: Lawn
alias: "Smart Irrigation: Lawn"
description: ""
  - at: "06:30:00"
    platform: time
  - condition: and
      - above: 900
        condition: numeric_state
        entity_id: sensor.smart_irrigation_lawn
      - condition: numeric_state
        entity_id: sensor.idokep_daily_data
        attribute: day1_prec_mm
        below: 3
      - condition: numeric_state
        entity_id: sensor.rain_intensity
        below: 0.1
      - condition: numeric_state
        entity_id: sensor.rainfall_today
        below: 3
  - data: {}
    service: switch.turn_on
      entity_id: switch.front_yard_manual_watering
  - delay:
      seconds: "{{states(\"sensor.smart_irrigation_lawn\")}}"
  - data: {}
    service: switch.turn_off
      entity_id: switch.front_yard_manual_watering
  - data: {}
    service: smart_irrigation.reset_bucket
      entity_id: sensor.smart_irrigation_lawn
mode: single

Very nice display.
Could you share your yaml code please?

Sure here is the showed card code. Please keep in mind that several entities are not coming from the integration. Bucket and Time in minutes are generated via a template, then I use a variable for the counter value and the Sum delivered is coming from the valve. As well, I use a helper for the different operation modes (on/off, auto, schedule).

type: vertical-stack
  - type: horizontal-stack
      - type: gauge
        entity: sensor.irrigation_terrasse_running_time
        needle: true
          green: 9000
          yellow: 9000
          red: 90000
        max: 600
        min: 0
        name: Run Time
      - type: gauge
        entity: sensor.smart_irrigation_terrasse_time_min
        needle: true
          green: 90000
          yellow: 50
          red: 9000
        max: 60
        min: 0
  - type: horizontal-stack
      - type: tile
        entity: input_select.irrigation_terrasse_mode
        name: Mode
      - type: tile
        entity: sensor.smart_irrigation_terrasse_bucket
        icon: mdi:format-color-fill
        name: Bucket
      - type: tile
        entity: sensor.smart_irrigation_terrasse
  - type: horizontal-stack
      - type: tile
        entity: sensor.giex_water_valve_terrasse_summation_delivered
        name: Sum delivered
      - type: tile
        entity: switch.giex_water_valve_terrasse_switch_2
        name: GiEX Valve
        show_entity_picture: false
          action: more-info
        icon: mdi:sprinkler
  - type: history-graph
      - entity: switch.giex_water_valve_terrasse_switch_2
      - entity: input_boolean.irrigation_terrasse_schedule
      - entity: sensor.smart_irrigation_terrasse_time_min
    min_y_axis: 0
    hours_to_show: 96
    fit_y_data: true
    max_y_axis: 20
  - type: history-graph
      - entity: sensor.smart_irrigation_terrasse_bucket
    min_y_axis: -10
    max_y_axis: 20
    hours_to_show: 96
  - type: custom:scheduler-card
      - input_boolean.irrigation_terrasse_schedule
title: Irrigation Terrasse

The control logic in node-red looks as follows:

1 Like

I stumbled upon another strange thing today - I was fixing my rain gauge sensor and as a result, I ended up with a ridiculous rainfall data for today. I was checking the Smart Irrigation integration under the assumption that the watering times would be completely skewed - I did a manual calculation for all the zones - when I saw that the watering time was only decreased marginally.

In light of the sensor input, I find this very strange - I would have expected the bucket to get zero’ d out at a bare minimum or go even into the positive. Can anyone explain this behaviour?

Smart irrigation sensor configuration


Recent history of the rainfall sensor

One of the zone details

Great work!
I was using Rachio for similar scheduling which was fine till the wife wanted 3 specific days a week of no watering so she could work in the yard on those days.

The other HUGE plus is instead of a 2 cycle and soak that Rachio did I was able to setup 3 cycles in NodeRed easily.

Other than the forecast I’m pulling all the data locally off of my weather station. No need to rely on Ambient Weather’s site talking to Rachio’s now.

Don’t change a thing.
In my opinion you nailed it.

Hello, a quick question about the manual zone calculation within the tab “Zones”… i set it up everything (with my ecowitt wetter station) yesterday, and looking and testing a bit today, so it is the first day.
Although it rained today a lot (daily rain 8.8 mm until now, and cloudy), the bucket still shows -0,1 (mm).
Why is it so?
Also when i click update data, and calculate again every hour, it did change just slightly… calculated duration was at the beginning 29s, after a few hours was 27s, and now 26s. But it rained constantly for 3-4 hours.

I would expect that, while it is raining constantly, that the bucket also increases… The auto calculation will run on its default (23 Oclock), but i thought here in zones, you can trigger that calculation manually… or is not it like that (and i will see the actual bucket today at 23 Oclock)?

And here are some wetter station values:

Bucket is not directly related to rainfall. Please read the readme and related info on github.

yeah but if it rains a lot on a cloudy day, you would expect 0 irrigation. I already read most of your documentation :frowning:
Still i do not understand, specifically in my current case, why it still shows 23s although it rained a lot. I should not need irrigation very now.

that UI button you’re pressing to calculate is resetting the data / clearing out the data so of course your data is going to be out of whack.

Hey akcapak,

what setting did you choose on the “general” tab for updating the weather data?
I’m updating the weather data and running the calculation of the bucket every 15 minutes with help of an automation, so normally I wouldn’t need to fetch the weather data via the “general” tab of the integration. Therefore I set it to manual or update once per day in the past which led to the same problem you’re describing. By changing it to “every 15 minutes” the calculation started working again.

ok thanks for the info. I use the default setting (auto - update every 1 hour).
But i think as Jeroen wrote, i clicked the “calculate” button too often and i did not know that it resets every time the data. I will let it to calculate once a day, and will observe the behaviour within the following days.

Another quick question… my bucket shows 5.7(mm) and calculated seconds is now 0. I still had to open irrigation today (because of some other tests) for about 10 minutes… How should i update irrigation Integration values manually?
Can/should i set the calculated seconds to -600? OR should i calculate and set my bucket from 5.7 to X?
Thanks a lot in advance!

So i am testing this integration for a week now, i can say that i am a bit disappointed. I have configured everything exactly as on “Senbei Tristan’s Smartes Heim” german video (with my own wetter station data), although we did not get a lot of rain recently, my bucket keeps increasing every day, and i haven’t seen any positive duration value till now, it keeps 0s.
Most concrete example, the bucket was calculated yesterday night as 6.4mm, and today we had a partly sunny day, more or less 20 degree Celcius, with in total 0.1mm rainrate, my bucket has just been calculated again as 7.0mm. How can it be?
It does not make sense at all. The info button of calculation (on zones tab) could have given a little more information of how it calculated that result.
I also have a soil moisture sensor, it is working as expected and the soil humidity has been decreased today by 10% for example. But the calculation result of this integration does not work for me, don’t know why.

  1. Check the diagnostic file. Do the values make sense to you?
  2. If yes to #1, check you have indeed made the right aggregation choices.
  3. If yes to #2 check your module config.
  4. If yes to #3, reduce the time between samples. Keep in mind that there is room for improvement in this integration in the fact that we take samples instead of real-time weather info (leftover from v1 and this is on Todo list to improve). So if you have very rapidly changing patterns you need to reduce sampling time or risk underfitting/overfitting.
  5. Read up on pyeto and do the math yourself to confirm the integration behaves as expected. This should also tell you there are lots of things that go into pyeto, and rainfall is not 1:1 related to bucket changes.
  6. If you are using a solrad sensor, keep in mind there is a bug most likely at the moment. Check github for all the latest issues / things I am working on.
  7. Also, keep in mind that I am trying to write, maintain and improve this rather complex piece of software in my spare time next to a more than fulltime job.

Good luck.

  1. Already checked, it seems normal.
  2. yes, checked at least 10 times.
  3. yes, checked at least 10 times.
  4. “reduce the time between samples”? what do you mean by samples? Do you mean “auto weather data update?” it is now on its default every hour.
  5. rainfall is not 1:1 i know, but it is in most of the cases like in my case, at least 90% of the calculation. If your bucket keeps increasing without any rain, where should that water come from? Of course you should think and observe mainly your rain rate.
  6. Yes i have a solar sensor. (7 in 1 Wetterstation provides all values). Should i set that to “none” and test like it for a few days?
  7. thank you for your effort. There seem to be 20 contributors on github. It is a pity if you have to do all the work alone at the end.

The other contributors are just for language files mostly. Anyway check your module and show me the settings there. Better, open a github issue so we can dive deeper.

1 Like

The integration works for me in 95% of the time. However I noticed the same strange behavior yesterday. The bucket started increasing without any rain (we had 25°C and partly cloudy weather). The integration I’ve set up at my parents house at a different location showed the same problem.
Today the calculation seems to work fine again.

hello, I have a problem, smart irrigation cannot be started after updating the core

Error setting up entry Smart Irrigation for smart_irrigation
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/”, line 584, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/smart_irrigation/”, line 72, in async_setup_entry
store = await async_get_registry(hass)
File “/config/custom_components/smart_irrigation/”, line 645, in async_get_registry
return cast(SmartIrrigationStorage, await task)
voluptuous.error.MultipleInvalid: expected float for dictionary value @ data[‘delta’]