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

I have the integration up and running now. Last night the automation ran for the first time. So far so good. I still have some questions:

  • what does the service smart_irrigation_enable_force_mode do? How to use it?

  • how long has the irrigation been running last time? So how much water did my plants get? If I have a look at the settings it seems that it is only 200seconds which seems very short (now being around 30 degrees) :slight_smile: So can I raise the time of the watering? And how/ where?

  • did any one add a Notification in the automation sending a message when the automation has run?

This is my automation for now:

alias: Smart Irrigation
description: >-

  Start Smart Irrigation at 05.00 when the workday sensor is on and run it only
  if the adjusted_run_time is >0 and run it for precisely that many seconds
trigger:
  - at: "05:00"
    platform: time
condition:
  - condition: and
    conditions:
      - above: "0"
        condition: numeric_state
        entity_id: sensor.smart_irrigation_daily_adjusted_run_time
      - above: "0"
        condition: numeric_state
        entity_id: sensor.smart_irrigation_hourly_adjusted_run_time
action:
  - data: {}
    entity_id: switch.sonoff_ch4_pro_sonoff_4ch_relay_1
    service: switch.turn_on
  - delay:
      seconds: "{{states(\"sensor.smart_irrigation_daily_adjusted_run_time\")}}"
  - data: {}
    entity_id: switch.sonoff_ch4_pro_sonoff_4ch_relay_1
    service: switch.turn_off
  - data: {}
    entity_id: switch.sonoff_ch4_pro_sonoff_4ch_relay_3
    service: switch.turn_on
  - delay:
      seconds: "{{states(\"sensor.smart_irrigation_daily_adjusted_run_time\")}}"
  - data: {}
    entity_id: switch.sonoff_ch4_pro_sonoff_4ch_relay_3
    service: switch.turn_off
  - service: smart_irrigation.smart_irrigation_reset_bucket
    data: {}
  - service: notify.mobile_app_iphone_van_johan
    data:
      message: Smart irrigation is uitgevoerd
      title: Smart irrigation is uitgevoerd


Hey Jeroen,
would appreciate your help again. I did post my config further above. What did I do wrong? I water a 6*7m big patch with roughly 30 meters of micro dripping hose. My setup consumes roughly 250 liters per hour.

I see good results watering 60min a day, a bit more on hot and sunny days. Your component seems to work but suggests 300 seconds of watering ā€œdaily adjusted run timeā€. Should that not be closer to 3600s? Am I wrong, is my config wrong? Do I misunderstand the meaning of those 300s?

Additionally: What I generally do not understand is how (or why not) your component accounts for the specific properties of a zone!? Shouldnā€™t there be an input for shading, the level of water consumption of the type of plants, the moisture properties of the soil?

You did a great job documenting your whole project on Github but I still feel as if the actual mechanics of your component and how to use it are not clear to me. Maybe I am a bit stupid here :smiley:

wellā€¦ the answer is: the way irrigation is calculated does not rely on any of that stuff, so those specific properties are not required. Ideally, Iā€™d like to get to a state where we have multiple ā€˜calculation modulesā€™ so you can try which one works best and input the required info.
That, and multi-zone support. (I am working on this in my spare time).

Regarding your comments: 300s is 300 seconds. 250l per hour sounds like a lot to me. Are you sure that is correct? Also, keep in mind that the number you need to enter for throughput is per minute, not per hour.

force mode allows you to override the duration - so you can ā€˜forceā€™ the irrigation to run for a certain duration regardless of what it calculated.
You can run at how the DART developed to see how long the irrigation has run. You can use force mode to override that or fiddle with the config to increase it.

the way irrigation is calculated does not rely on any of that stuff

I know, thatā€™s why I am asking you ā€œWhy?ā€. I came to the conclusion that your calculated result canā€™t be used as a total time but rather as a factor. I ended up using your calculated time x to get to my irrigation time y via a transformation: y = a * x + b

I am not sure how ā€œcalculation modulesā€ would help make this clearer to users.

I am working on this in my spare time

Of course all of these comments are supposed to support you :slight_smile:

300s is 300 seconds. 250l per hour sounds like a lot to me. Are you sure that is correct? Also, keep in mind that the number you need to enter for throughput is per minute, not per hour.

250 Liter on 42 mĀ² is not that much (5.9 mm per mĀ²) - Certainly can be reduced but 300 seconds would mean 0.5mm/mĀ² per day, which certainly is not enough for my specific type of plant on the patch.
Also, I believe my entered number is in minutes?

the why isā€¦because I found a industry standard way for calculating lawn irrigation, without that extra detail so I built it that way. Thatā€™s it. I am not an irrigation expert at all. I think in this case that industry standard for lawns doesnā€™t apply to what you need.

That explains a lot!! If your primary consideration is lawn, all these things, including the lack of mentioned factors above is indeed not as relevant.

Using this component you water your garden, lawn or crops precisely enough to compensate what has evaporated.

This is the only sentence in your README to mention lawn. Maybe the README could be improved.

With that out of the way, would you be interested to accept a PR for an addition of a y=a*x+b configuration for other crops, patches, trees etc?

Cheers!

thanks, I welcome any PR for either the README or any code obviously :slight_smile:

deleteā€¦ wrong threadā€¦

Hey, no idea. This topic is about the Smart Irrigation custom component and it looks like your post is about AC. Did you intend to post your message in a different topic?

wrong thread. sorryā€¦

Iā€™ve been using this for a year and itā€™s been working great. I have been using the Open Weather Map data and I always felt like it was overwatering (especially in my wallet irrigating an acre). In fact, I added some code that allowed me to throttle down the run time in percentages and I was running it at about 50% of what it was calling for.

I recently installed a weatherflow weather station and decided to use those sensors. I re-added the Smart Irrigation using the weatherflow sensors (except the min and max temp still comes from Open Weather Map) but I kept the old Smart Irrigation integration just appending the entities with ā€œ_oldā€ so I could compare. Now with my Weatherflow entities I feel like itā€™s not watering enough even with my adjustment at 100% of what itā€™s calling for. Here is the hourly adjusted rate for each one.

Even the scale is a lot different. On the weatherflow the highest value, excluding spikes, is maybe 175. Whereas the Open Weather Map data the lowest is over 300. I know we have had zero rain for at least 5 days, yet the Open Weather Map shows 0.03" of precip.

My Daily Adjusted Run Time is also way off. The Open Weather Map one shows a bucket of -1.49 whereas the Weatherflow one shows a bucket of -0.09

Has anyone seen anything similar? Iā€™m wondering if Iā€™m using the correct Weatherflow entities, this is what Iā€™m using:

sensor.weatherflow_precipitation_today_rain_checked
sensor.weatherflow_air_temperature
sensor.weatherflow_dewpoint
sensor.weatherflow_barometric_pressure
sensor.weatherflow_relative_humidity
sensor.weatherflow_wind_speed
sensor.weatherflow_solar_radiation

@bphillips921 i am experiencing this too. Iā€™m wondering if Iā€™m using the correct units. Iā€™ve converted my wind speed to be at 2m above the ground. also Iā€™ve converted my solar radiation to sqft instead of W/m2 (weatherflow only provided W/m2). currently monitoring to see if that helped. but would like to know if others have experienced this too.

I added another integration of this. This time I used OpenWeatherMap for the min and max temps and let the integration calculate the solar radiation, I used my Weatherflow for everything else. Now my Hourly Adjusted Run Time entity says ā€œThis entity is no longer being provided by the smart_irrigation integration. If the entity is no longer in use, delete it in settings.ā€

interesting i just tried the same. and mine seem to be working. the evap value is now back up to .18 in like it was with only using OWM. so the difference does appear to be due to the solar radiation value reported in Weatherflow vs the calculated value.

All Weatherflow sensors but calc solar rad:

All WeatherFlow Sensors:

Thatā€™s good to know that we both suspect the weatherflow solar radiation sensor is the culprit. Now I just need to get the integration working with it calculating the solar radiation.

looking through the code some, i found that the integration is excepting W/sqft for the units of solar rad if homeassistant units are set the imperial. so the conversion of the weatherflow sensor is needed in the US.

solar rad units

i also found that it is also expecting units of PSI for pressure if imperial is set as well.

pressure units

@jeroenterheerdt maybe im looking at this wrong, but if we are supplying solar rad in W/sqrFt and your trying to convert it to W/m2. wouldnā€™t we multiplied by the ā€œM2_TO_SQ_FT_FACTORā€?

Ex: 40 W/sqrFt * 10.7639 = 430.556416 W/m2

code question

ehh, ouch, that looks like a bug indeed. Oops.

Also, @bphillips921 and yourself are doing amazing work here. It sounds like there is some confusion about the units to be used - please educate me as to what makes more sense to you so I can adapt the integration.

Iā€™m a bit of a novice with this, but I can provide the units that Weatherflow uses, at least in the US

Humidity - g/m3
Temperature - Farenheit
wind speed - mph
Dewpoint - Farenheit
Solar Radiation - W/m2
Precipitation - inches
Pressure - inHg