Irrigation system

Hello,
i’m a beginner with homeassistant, in fact i had the opportunity to try home assistant just as a lab.
Actually, I’m planning a new house and, specifically, I’m installing a traditional irrigation system (4 electrovalves and a standalone controller by Orbit).

In my mind, I would like to integrate the irrigation system with Home Assistant. In this use case, I think to control the irrigation system based on some rules. For example, I can open the water only if is not raining since a couple of days, based even on season, etc etc…

So, maybe i will not need the Orbit anymore. I think I can control directly the electrovalves. Is it right ?

Does anyone have some experiences or suggestions ?

Thanks
Nico

I have replaced my Orbit with HA completely using a Makerfocus D1 Mini and a JBtek 4 Channel DC 5V Relay Module.

My personal weather station provides precipitation data (via WUnderground) which allows me to time the drip system - as you can see there hasn’t been any rain in California for a while so it runs every 3 days, 20 minutes on each circuit:

It’s on my to do list but my plan is a sonoff 4 relay board running tasmota and miflora moisture sensors connected using esphomeyaml loaded ESP2866 modules.

Have a look at this thread. Lots of ideas (including mine :wink: )
[Garden Irrigation]

Almost forgot - I came across this the other day and thought I would probably have used it had it been available when I built mine:

It was $20 on Amazon but has since become unavailable.
Maybe it shows up again for the holidays :man_shrugging:

Very interesting, thanks to all you guys!! :slight_smile:

Hello,

In my side I setup the following architecture:

  • mi flora sensor into the garden
  • ESP32 ble gateway
  • MQtt broker (mosquitto)
  • Controller (OpenHAB) but HA will do the same job
  • Wifi plug from TPLink
  • 220V electrovalve connected to city water
  • drip into the garden

Hi, I’m trying to set up the same system (without the WQtt, for home plants).
Could you please share the config codes? Thank you in advance!

1 Like

Hi, you mean the config codes for which component ?

Yes, for the moment I’m trying to set up automations that run constantly and check the soil moisture, and then enable the smart switch with a pump.
For some reason my automation works only one, and then I need to restart my HA.

Unfortunately as indicated this setup was done in OpenHAB not in my HASS instance. Maybe you can share your current automation so we can try to help you.

Sure, I’ve posted a few requests to share some existing automations, howevery no one responded sso far.
I’m not sure if I’m doing this correctly: I’ve created 2 automations, first checks the Mi Flora moisture status, and in case if its bellow 30 turns on xiaomi plug for 1 minute and then turns off. This automation seems to be working, however the second one - to repeat this every, lets say 30 min /1 hr, is not.
After the autoamtion had run one time its not repeating unless I restart HA.
I know that in 2 automation I need to set correct trigger, however I dont knw how to do that in the code of via the interface.
The next level would be to check the weather forecast and not turn on the automation if the rain forecast is higher than 70%.

Thank you in advance!

- id: '1548529906596'
  alias: Water
  trigger:
  - below: '30'
    entity_id: sensor.flower_1_moisture
    platform: numeric_state
  condition: []
  action:
  - data:
      entity_id: switch.plug_158d00013e5145
    service: switch.turn_on
  - delay: 00:01:15
  - data:
      entity_id: switch.plug_158d00013e5145
    service: switch.turn_off

- id: '1548533116524'
  alias: 'Repeat Water '
  trigger:
  - at: X:00:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: automation.water
    service: automation.turn_on

2 things:

  1. Can you please format your code properly (see the blue box at the top of the page)
  2. You only need one automation with the time as a trigger and the stae of the sensor.flower_1_moisture as the condition.

Hi,

  1. I’ve tried editing my message above as a code, not sure if this is correct.
Hi, I've corrected the automation based on the help files, however it still dosnt work. Could you please let me know where I've gone wrong? 

- id: '1548529906596'
  alias: Water
   trigger:
   - below: '30'
    entity_id: sensor.flower_1_moisture
    platform: numeric_state
    condition: []
    action:
    - data:
     entity_id: switch.plug_158d00013e5145
    service: switch.turn_on
     - delay: 00:01:15
     - data:
     entity_id: switch.plug_158d00013e5145
     service: switch.turn_off
- id: '1548533116524'
alias: 'Repeat Water '
trigger:
platform: time
minutes: '/30'
seconds: 00
condition: []
 action:
   - data:
      entity_id: automation.water
      service: automation.turn_on

Should I just add the time trigger in to original automaiton?

  alias: 'Irrigation Scenario '
  trigger:
  - minutes: /30
    seconds: 0
    platform: time
  - below: '30'
    entity_id: sensor.flower_1_moisture
    platform: numeric_state
  condition: []
  action:
  - data:
      entity_id: switch.plug_158d00013e5145
    service: switch.turn_on
  - delay: 00:01:15
  - data:
      entity_id: switch.plug_158d00013e5145
    service: switch.turn_off

Can you please check if this is OK? For some reason, the automation worked at 03:30, and didn’t start every 30 min as was initially planned.

You need to read the breaking changes for the latest HA release. This:

  trigger:
  - minutes: /30
    seconds: 0
    platform: time

Should be:

  trigger:
  - minutes: /30
    platform: time_pattern

Thanks a lot, that worked!

Hi, this is a bit unrelated, however, I was thinking about light intensity script that would measure the amount of light that was exposed to. E.g. in case it was a rainy day and there was not “a lot” of light coming thru the windows turn on the lamp for X hours.
have someone did something similar?

Exactly the same way you set up the irrigation automation, but using the LUX sensor instead of the moisture sensor, and your lamp switch instead of the valve switch.

EDIT, You might want to also add a condition of the sun being up… Unless you want your grow lights on all night.

Example from docs - https://www.home-assistant.io/docs/scripts/conditions/

    condition: and  # 'when light' condition: before sunset and after sunrise - equivalent to a state condition on `sun.sun` of `above_horizon`
    conditions:
      - condition: sun
        before: sunset
      - condition: sun
        after: sunrise