Automated Watering V2

Automated Watering V2

So you might remember, a little while back, I had set up an automatic watering system to take care of watering duties on my new front garden. See here for the post. Well, 8 months have passed, the Hinterland Gold Syzygiums are still alive.

In the time I have been running the system, I have made an incredible amount of change, more to expand the setup I already have to add additional zones.

So when it was just the front garden, there wasn't much to it. Just set up the hose and water on automation. However, I have added additional pot plants under the patio, a greenhouse with two garden beds and a little Seedhouse.

Each one of these zones basically has its own solenoid. Running the smarts is also slightly different, although I am still using the same power supply that I initially used as they are easy to source.

The Logic:

To help explain how each zone needs to interact, I setup automation to enable the following types of conditions:

  • There are 4 watering zones now, with an additional "master" zone.
  • The master solenoid is the shutoff to the hole system.
  • Each zone is linked to the master, so if I turn on Zone 1, the master turns on.
  • If there is less than 1 zone turned on, the master will turn off.
  • If there is more than 1 zone turned on master remains on.
Master Solenoid

Parts:

The board the greenhouse solenoids go back to
Part Qty
https://www.bunnings.com.au/deta-grid-connect-smart-rewireable-plug_p0098810 4
https://www.bunnings.com.au/deta-10a-miniature-plug-base_p4430736 4
https://www.bunnings.com.au/deta-four-outlet-power-point_p4430420 2
https://www.bunnings.com.au/pope-20mm-mini-thread-solenoid-valve_p3130658 5
https://www.jaycar.com.au/24vac-1a-unregulated-power-supply-bareends/p/MP3032 5

Not much has changed here regarding the parts, although the device's platform has changed slightly. I have still not been able to locate a smaller power supply that provides the 24vAC.

The Automation Stuff

So the outcomes are still the same however, there also needs to be some additional logic added also. This is where Home Assistant (HA) comes to shine. So to outline what each automation needs to do.

Zone Control Logic

As mentioned above, I will need to create an automation that allows me to turn on any zone and have the master zone turn next—this then feeds the system water. If I turn off the last zone and no other zones are running, I want the master zone to turn off.

Automation

alias: GREENHOUSE - Watering Zone Control Logic
description: Control the watering zones based on logic.
trigger:
  - platform: state
    entity_id: group.greenhouse_solenoids
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: group.greenhouse_solenoids
            state: 'on'
        sequence:
          - service: switch.turn_on
            target:
              entity_id: switch.button_toggle
    default:
      - service: switch.turn_off
        target:
          entity_id: switch.button_toggle
mode: single

Seedhouse Logic Example

Seedhouse

There are three main automation processes to make this work. With the automation below, each zone setup will be exactly the same apart from different entity names. This is provided as a bit of a template.

In this example, I am using the Seedhouse to demonstrate the ability to turn on/ off and apply conditions based on weather data.

Note this also required "Input_Booleans" to be set up in HA. You can either set up an individual one for each zone or have a master to cover them all up to you and your scenario.

configuration.yaml

  watering_seedhouse_scheduled:
    name: "Seehouse scheduled to run"
    icon: mdi:weather-sunny

The purpose of this schedule check automation is to determine if there has been any rainfall in the "today" or "future day". This is checked at 7am daily and will turn the input_boolean on or off based on its check.

Because I run my own weather station, I can determine this weather information locally, which is great!

Automation

alias: GREENHOUSE - Seedhouse Weather Schedule Check
description: Check weather forcast to determine rainfall/ schedule watering if no rain.
trigger:
  - platform: time
    at: '07:00:00'
condition:
  - condition: numeric_state
    entity_id: sensor.wupws_preciptotal
    above: '0.5'
  - condition: numeric_state
    entity_id: sensor.wupws_precip_1d
    above: '0.5'
action:
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.watering_seedhouse_scheduled
mode: single

Next, the below automation will trigger the watering cycle. Turn on Zone 3 etc.

Automation

alias: 'GREENHOUSE - ON - Seedhouse Automatic Watering '
description: Water the Seehouse at 8am if the schedule is true.
trigger:
  - platform: time
    at: '08:00:00'
condition:
  - condition: state
    entity_id: input_boolean.watering_seedhouse_scheduled
    state: 'on'
action:
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.watering_seedhouse_scheduled
  - service: switch.turn_on
    target:
      entity_id: switch.52087318e09806cb1cfb
mode: single

After two minutes of running, the following automation will turn the zone off.

Automation

alias: GREENHOUSE - OFF - Seedhouse Automatic Watering
description: Water the Seehouse at 8am if the schedule is true.
trigger:
  - platform: time
    at: '08:02:00'
condition: []
action:
  - service: switch.turn_off
    target:
      entity_id: switch.52087318e09806cb1cfb
mode: single

**I don't run it yet, but it is worth mentioning what happens if the turn off zone 3 doesn't run. In this current setup, that is not taken into account, but it should be. You don't want to be running water for hours and hours without knowing it at the end of the day.

As a little bonus, I started to see some of the seeds sprout while taking photos around the place. I would say 60% of the plants growing here have been the Woolworths seed pot promotion. So hopefully, all goes well with them.

The Solenoids

Definitely don't need to set up the solenoids like I did, but I mainly did this to keep everything together. You will see that the wiring all goes back to the identical location.

I have also added additional water flow control on the incoming side to help better regulate the volume of water coming through based on the sprinkler setup. I have 3 types of sprinklers being used in the space. They all have different configurations of flow.

Home Assistant Card Setup

To keep the setup pretty simple in the card, I removed the old card and started a new one. Mainly because of having multiple zones, I needed a straightforward way of seeing zones turned on and scheduled to be watered in that day.

This was the card I ended up creating; however, I will probably be adjusting it to be a bit more visually pleasing and adding different things to it as well, possibly.