My Garden Irrigation

Ok, a little bit clearer.
You have 6 shellies with tasmota for your valves.
How do you control your pump?
e.g. i have a hager esn224 to activate my pump. basically it’s a relay dpdt with a 24vac coil, when it feels current on the coil, activate the 220vac for the pump.
i have attached a 24vac transformer to one relay, when one valves start, i activate the pump(transformer) relay that activates the pump.

Hello, i have 2 sonoff 4ch pro r3 with tasmota to control the valves, and want to use a shelly 1pm to control the pump, and to now the consumer of the pump.

ok, you have to work a little bit in ha config, you have to group every valve switch with the pump relay.
Have a look at groups or even better template switch

I am about to merge a pull request from @davewatson91 which brings together all the changes made/suggested several months ago by @Athan (and possibly others?) to allow up to 16 zones.

It is literally just to allow additional zones, it doesn’t add or change any logic so it should have no effect on the way the package currently works.

Please report back here or open a GitHub issue if you experience any problems and likewise feel free to confirm you are using it with no issues.

Thanks again to @davewatson91 and @Athan and apologies if I forgot anyone else who had an input.

4 Likes

Great news @klogg and again an excellent work !

1 Like

Hi @klogg is there a way to use Weatherbit.io and this custom-component for weather sensors and forecast?
Unfortunately there I don’t own a Tempest station and the nearest station is 400km away from my house…

Hello. I just found why in my case it was skipping schedules, it was the “Ignore schedules if it is raining” that was on, just turn it to off and the schedules work. I haven’t configure the rain sensor and even with the “Adjust for rainfall” set to off it didn’t start. To prevent this maybe the “Ignore schedules if it is raining” should only work with real value (raining true or false) and if it is not configured the status should be unknown and skip this.
Regards

Can you provide me with the automation part and lovelace config*?

I have moved on from this code to something simpler I wrote myself.

I’ll check it but I don’t think I can help you out unfortunately :frowning:

This look great and is exactly what I want to do. Can you share you Esphome code? I am also look at adding a nextron lcd screen so I can control it at the box.

EDIT: Sorry, this request wasn’t aimed at me but I’ll leave it here in case it is useful!


By all means…

#==================
#=== Substitutions
#==================
substitutions:
  device_name: esphome_irrigation_controller
  friendly_name: ESPHome Irrigation Controller
#==================

# Board
esphome:
  name: ${device_name}
  platform: ESP32
  board: mhetesp32devkit

# WiFi
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: True

  ap:
    ssid: IrrigationHotspot
    password: some.random.password!

# Fallback portal 
captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

# Enable Over-The-Air updates
ota:

# # Enable Web server.
# web_server:
#   port: 80

    
#=== Sensors
sensor:
  #=== Uptime
  - platform: uptime
    name: ${friendly_name} Uptime

  #=== WiFi Signal
  - platform: wifi_signal
    name: ${friendly_name} WiFi Signal
    update_interval: 60s

  #=== Failsafe time
  - platform: homeassistant
    id: failsafe_time
    name: ${friendly_name} Failsafe Time
    entity_id: input_number.irrigation_failsafe_time_in_seconds


#=== Switches
switch:
  #=== Zone Relay 1
  - platform: gpio
    pin: 
      number: 21
      inverted: True
    name: Garden Irrigation Relay Zone1
    id: relay1
    restore_mode : ALWAYS_OFF
    interlock: &interlock_group [relay1, relay2, relay3, relay4, relay5, relay6, relay7, relay8]
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 2
  - platform: gpio
    name: Garden Irrigation Relay Zone2
    id: relay2
    pin: 
      number: 22
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe
      
  #=== Zone Relay 3
  - platform: gpio
    name: Garden Irrigation Relay Zone3
    id: relay3
    pin: 
      number: 23
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe
      
  #=== Zone Relay 4
  - platform: gpio
    name: Garden Irrigation Relay Zone4
    id: relay4
    pin: 
      number: 14
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 5
  - platform: gpio
    name: Garden Irrigation Relay Zone5
    id: relay5
    pin: 
      number: 25
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 6
  - platform: gpio
    name: Garden Irrigation Relay Zone6
    id: relay6
    pin: 
      number: 26
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 7
  - platform: gpio
    name: Garden Irrigation Relay Zone7
    id: relay7
    pin: 
      number: 27
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 8
  - platform: gpio
    name: Garden Irrigation Relay Zone8
    id: relay8
    pin: 
      number: 18
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Reboot
  - platform: restart
    name: ${friendly_name} Reboot
    id: reboot


#=== Scripts
script:

  #=== Set failsafe time converted to milliseconds
  - id: failsafe
    then:
      - delay: !lambda |-
          return id(failsafe_time).state * 1000;
      - switch.turn_off: relay1
      - switch.turn_off: relay2
      - switch.turn_off: relay3
      - switch.turn_off: relay4
      - switch.turn_off: relay5
      - switch.turn_off: relay6
      - switch.turn_off: relay7
      - switch.turn_off: relay8

Thanks! I am planning on using your github irrigation project once I get the hardware working.
This will save me a lot of time. What IO expander are you using? I have the 8574 io expander but it is not being detected. I have tried addresses 0x21 and 0x20 with no luck.

Hi there…

i have 8 Zones and 1 Main Relay. How can i add this Main relay to open before zone 1 starts and close after the last zone?

Thanks in advance

Edit: Solved:
garden_irrigation_triggered_cycle_start.yaml:
#=== Run all the zones in turn
- service: switch.turn_on
target:
entity_id: switch.yourswitch


#=== CYCLE END PROCESSING
- service: switch.turn_off
target:
entity_id: switch.yourswitch

1 Like

Also:
Is it possible to add a language page where all the Labels can be defined? To change them to german :wink:

1 Like

Why is here always 0 Minutes?

I did start on this a while ago but the method I used failed due to a bug feature in HA.
( Reload of input_text should also reset to initial - Feature Requests - Home Assistant Community (home-assistant.io))

I couldn’t think of an alternative and simple way to implement this natively in HA.
But if anyone has any ideas…

A guy here in german Forum has it working… Funny…

Also a Problem: I can’t see the Value on the slider… Is there a way to correct this?

1 Like

Next issue?

Only the first cycle is added to End Time…?