Irrigation System Manual

Version 2.3.1 — Last updated March 2026

Table of Contents

1. System Overview 2. Hardware Setup 3. How It All Works 4. Crop Steering Phases (P0–P3) 5. Commissioning Guide 6. Day-to-Day Operation 7. Dashboard Guide 8. Tuning Your Parameters 9. AppDaemon Setup (Advanced) 10. Safety Systems 11. Troubleshooting 12. Entity Reference

1. System Overview

The irrigation system automates irrigation for 6 grow tables using sensor-driven decisions. It has three layers:

Layer 1 — Irrigation Package (runs now)

Time-based irrigation scheduling, environment control (AC, humidity, CO2), and safety watchdogs. This is the production workhorse. It runs entirely inside Home Assistant — no extra software needed.

Layer 2 — Crop Steering Integration (runs now)

Adds 90+ entities for sensor-driven irrigation decisions. Calculates shot sizes, tracks EC ratios, and provides per-zone controls. Installed as a custom component.

Layer 3 — AppDaemon (optional, not yet deployed)

Autonomous phase transitions, advanced dryback detection, and ML-based irrigation prediction. Needs separate setup (see Section 9).

The Data Flow

Physical probes (ESPHome)
    ↓
Raw sensor entities (e.g. sensor.substrate_1_substrate_1_vwc_coco_coir)
    ↓  [10_mapping.yaml averages + rounds values]
GW contract entities (e.g. sensor.irrigation_table_1_vwc)
    ↓  [crop_steering.env tells the integration where to look]
Crop Steering entities (e.g. sensor.zone_1_vwc)

2. Hardware Setup

What's Connected

DeviceWhat It DoesConnection
KC868 E16S relay boardControls all valves (6 tables + mains + mainline + manifold)Ethernet (ESPHome)
6x Substrate probesMeasure VWC, EC, and temperature per tableSDI-12 via Ethernet (ESPHome)
4x Environmental sensorsRoom temperature and humidityEthernet (ESPHome)
3x CO2 sensorsCO2 levels + VPDEthernet (ESPHome)
4x AC unitsTemperature controlIR via ESPHome
CO2 solenoidCO2 injection during lights-onSolid state relay (ESPHome)
HumidifierRaise humiditySolid state relay (ESPHome)
4x Dehumidifier relaysLower humidityRelay board (ESPHome)
Grow lightsLight group for all tablesESPHome

Water Flow Path

Nutrient Tank
    ↓
[switch.mainline opens] → Pressure switch auto-starts pump
    ↓
Mainline pipe
    ↓
[switch.table_N opens] → Water flows to table N's drippers
    ↓
Drippers → Plants → Substrate → Runoff
No pump switch needed. The pump starts automatically when the mainline valve opens (pressure switch). That's why PUMP_SWITCH is blank in the config.

Not Yet Connected

Sensor/DeviceWhat It DoesImpact If Missing
Tank low float switchDetects low water levelTank-low safety abort won't trigger
Leak sensorDetects water leaksLeak safety abort won't trigger
Tank pH probeMonitors nutrient pHpH shows "Unavailable" on dashboard
Tank EC probeMonitors nutrient ECEC shows "Unavailable" on dashboard
Leaf temp sensorAccurate VPD calculationFalls back to room air temp
Safety Warning: Until the tank float switch and leak sensor are installed, the emergency abort automations for tank-low and leak detection are disabled (hardcoded to "safe"). Install these sensors before relying on the system unattended.

3. How It All Works

The Irrigation Cycle

Every cycle follows this sequence:

The scheduler checks: Is the system enabled? Is it within the irrigation window? Has enough time passed since the last run?
If yes, it opens the mainline valve (which auto-starts the pump via the pressure switch) and waits 2 seconds.
For each enabled table (1 through 6, one at a time): opens the table valve, runs water for the configured duration, closes the valve, waits 3 seconds.
After all tables are done, closes the mainline valve (pump stops).
Mains water and manifold are for tank filling and mixing only — they are NOT part of the irrigation cycle. Only the mainline valve opens during feeding.

What Controls the Cycle

SettingWhere to Change ItDefault
Irrigation window startSchedule tab → Window StartSet in HA
Irrigation window endSchedule tab → Window EndSet in HA
Time between cyclesSchedule tab → Interval60 minutes
Duration per tableSchedule tab → Duration60 seconds
Which tables are activeZone Control tab → Enabled toggle per tableAll off
Master on/offCommand Center → GW SystemOff

Environment Control

The system also manages grow room climate:

4. Crop Steering Phases (P0–P3)

Crop steering divides each day into 4 phases based on substrate moisture and light cycle. The goal is to control how plants use water and nutrients.

P0 — Morning Dryback

When: Lights turn on → First irrigation shot

What happens: No watering. The substrate dries down from overnight levels.

Why: A controlled dry-down signals the plant to focus on root growth (vegetative) or fruit production (generative).

Moves to P1 when: VWC drops by the target percentage (vegetative: 50%, generative: 40%), or max wait time (120 min) expires.

P1 — Ramp-Up

When: After dryback target reached → VWC reaches field capacity target

What happens: Progressive irrigation shots. Starts small (2% of substrate volume), increases by 0.5% each shot.

Why: Gradually rehydrates the substrate without causing runoff or flushing nutrients.

Settings: 15 min between shots, max 10 shots, target VWC 65%.

Moves to P2 when: Target VWC reached or max shots hit.

P2 — Maintenance

When: Field capacity reached → Before lights-off

What happens: Fixed-size maintenance shots whenever VWC drops below threshold (60%).

Smart EC adjustment: If EC is too high (ratio > 1.2), the threshold rises — triggering more frequent irrigation to flush salts. If EC is too low (ratio < 0.8), threshold drops — letting the substrate dry more to concentrate nutrients.

Moves to P3 when: Approaching lights-off time.

P3 — Pre-Lights-Off

When: 2–3 hours before lights off → Lights off

What happens: No scheduled irrigation. Emergency-only shots if VWC drops below 40%.

Why: Allows a controlled overnight dryback for the next day's P0.

Moves to P0 when: Lights turn on next day.

Vegetative vs Generative steering: Vegetative mode uses longer drybacks and lower EC targets — encouraging root and leaf growth. Generative mode uses shorter drybacks and higher EC — pushing the plant toward flowering and fruit production.

5. Commissioning Guide

Follow these steps to get the system running from scratch.

Step 1: Verify Hardware Connections

Go to Settings → Devices & Services → ESPHome. Confirm all 6 substrate sensors, KC868 relay board, environmental sensors, and CO2 sensors show as "Online".
Go to Developer Tools → States. Search for sensor.irrigation_table_1_vwc. You should see a number (e.g. 47.4). Check all 6 tables.
Search for sensor.irrigation_room_1_temp. Should show room temperature. Also check sensor.irrigation_room_1_rh and sensor.irrigation_room_1_co2.
Test each valve manually: Go to Developer Tools → Services, select switch.turn_on, target switch.irrigation_table_1_valve. You should hear the valve click. Turn it off immediately after confirming. Repeat for all 6 tables.
Test infrastructure: Briefly toggle switch.irrigation_mainline on — you should hear the pump start. Turn off immediately.
Before testing valves: Make sure your nutrient tank has water and the system is plumbed correctly. Have someone at the tables to confirm water is reaching the right place.

Step 2: Configure the Irrigation Window

Go to the Irrigation → Schedule tab.
Set Window Start to when you want irrigation to be allowed (e.g. 08:30 — 30 min after lights on).
Set Window End to when irrigation should stop (e.g. 18:00 — 2 hours before lights off).
Set Interval to how often cycles run (start with 60 minutes).
Set Duration to how long each table runs per cycle (start with 60 seconds).

Step 3: Enable the System

Go to the Command Center tab.
Turn Maintenance Mode OFF (the toggle should be off/grey).
Turn GW System ON.
Go to Zone Control tab. Enable each table you want to irrigate by toggling Enabled on.
Watch the System Ready indicator on the Command Center. It should show a green check mark.

Step 4: Test an Irrigation Cycle

Go to Developer Tools → Services.
Select service script.irrigation_run_irrigation_cycle.
Click Call Service.
Watch the Zone Control tab — you should see valves open and close one by one.
Check that water reached each enabled table.

Step 5: Set Environment Targets

Go to the Environment tab.
Set Day/Night Temperature targets (e.g. Day: 26°C, Night: 22°C).
Set Day/Night Humidity targets (e.g. Day: 60%, Night: 55%).
Set CO2 target (e.g. 1200 ppm).
Verify the AC units, dehumidifiers, and CO2 solenoid respond correctly.

Step 6: Configure Crop Steering (Optional)

Go to Command Center → Crop Steering section.
Set Steering Mode: "Vegetative" for veg growth, "Generative" for flower.
Set Crop Type: "Cannabis_Athena" is preconfigured with Athena nutrient targets.
Review shot calculations — P1/P2/P3 durations should show non-zero values. If they show 0.0s, check that substrate volume and dripper flow rate are set (see Tuning).

6. Day-to-Day Operation

Normal Operation Checklist

Changing What Gets Watered

Go to Zone Control and toggle the Enabled switch for each table. Disabled tables are skipped during irrigation cycles.

Emergency Stop

If anything goes wrong:

7. Dashboard Guide

TabWhat It ShowsWhen To Use It
Command CenterSystem status, crop steering settings, safety, infrastructure controls, all-table overviewDaily check-in, system on/off, changing steering mode
Zone ControlPer-table detail: sensors, valves, irrigation stats, crop profilesEnabling/disabling tables, checking individual table health
Trends24-hour graphs: VWC, EC, substrate temp, room environmentSpotting problems, checking irrigation patterns
EnvironmentRoom climate gauges, temperature/humidity/CO2 targets, hardware switchesAdjusting climate targets, checking HVAC status
ScheduleIrrigation timing, valve controls, table enables, scriptsChanging irrigation timing, manual valve control

8. Tuning Your Parameters

Substrate & Hardware

These must match your physical setup. Find them in Settings → Devices → Crop Steering System or edit /config/crop_steering.env.

ParameterWhat It MeansDefaultHow To Measure
Substrate VolumeVolume of growing media per pot (litres)10.0 LCheck your pot size
Dripper Flow RateHow fast each dripper delivers water (L/hr)2.0 L/hrTime how long to fill a measuring cup
Drippers Per PlantNumber of drippers in each pot2Count them
Field CapacityMaximum VWC your substrate can hold70%Saturate substrate, read VWC when dripping stops

EC Targets (Athena Defaults)

PhaseVegetativeGenerative
P0 (Dryback)3.0 mS/cm4.0 mS/cm
P1 (Ramp-Up)3.0 mS/cm5.0 mS/cm
P2 (Maintenance)3.2 mS/cm6.0 mS/cm
P3 (Pre-Off)3.0 mS/cm4.5 mS/cm
Start conservative. Run the time-based scheduler for a week while monitoring VWC trends. Once you're confident in the sensor readings and hardware, switch to crop-steering-driven irrigation.

9. AppDaemon Setup (Advanced)

AppDaemon adds autonomous phase transitions — the system automatically moves through P0→P1→P2→P3 based on live sensor data instead of requiring manual phase selection.

You don't need AppDaemon to use the system. The GW Package handles time-based irrigation and the Crop Steering integration provides all the sensor entities and calculations. AppDaemon just adds autonomous decision-making.

Installation Steps

Install the AppDaemon add-on from Settings → Add-ons → Add-on Store. Search for "AppDaemon".
In the AppDaemon add-on config, add Python packages: scipy, numpy.
Start the AppDaemon add-on.
Copy the app files from the repo to your AppDaemon apps directory:
cp -r /config/repos/HA-Irrigation-Strategy/appdaemon/apps/crop_steering /config/appdaemon/apps/
Copy the AppDaemon configuration:
cp /config/repos/HA-Irrigation-Strategy/appdaemon/apps/crop_steering/apps.yaml /config/appdaemon/apps/crop_steering/
Edit /config/appdaemon/apps/crop_steering/apps.yaml and verify the entity IDs match your setup (they should reference irrigation_* entities).
Restart AppDaemon from the add-on page.
Check the AppDaemon log for errors: Settings → Add-ons → AppDaemon → Log.
Once running, new sensors will appear: sensor.crop_steering_app_status, sensor.crop_steering_app_current_phase, etc.

Verifying AppDaemon is Working

10. Safety Systems

The system has multiple layers of protection. These run independently — if one fails, others still protect your grow.

ProtectionWhat It DoesAutomatic?
Master GateIrrigation only runs when: system enabled + not in maintenance + no leak + tank OK + within time windowYes
Valve WatchdogIf any table valve stays open longer than 3 minutes, force-closes it and alerts youYes
Mains Water WatchdogKills mains water if open for 24 minutes (8x valve limit)Yes
Leak AbortEmergency stop on leak detection (needs sensor installed)Yes*
Tank Low AbortCloses all valves if tank is low (needs float switch installed)Yes*
Maintenance ModeCloses all valves immediately when toggled onManual
Sensor Offline AlertAlerts if temp/RH/CO2 sensors go offline for 10 min. Also closes CO2 if CO2 sensor lost.Yes
Valve-Without-PermissionIf the master gate goes false while valves are open, closes everythingYes
Daily Audit (3 AM)Force-closes all valves and CO2 solenoid as a safety resetYes
CO2 Lights-OffCO2 solenoid always closes when lights turn offYes

* Requires physical sensor to be installed and mapped.

11. Troubleshooting

Irrigation won't run

  1. Check Command Center → GW System is ON.
  2. Check Maintenance Mode is OFF.
  3. Check the current time is within your irrigation window (Schedule tab).
  4. Check at least one table is enabled (Zone Control tab).
  5. Check Developer Tools → States for binary_sensor.irrigation_irrigation_allowed — should be "on". If "off", check each condition above.

VWC/EC shows "Unavailable"

  1. Go to Settings → Devices → ESPHome. Is the substrate sensor device online?
  2. Check Developer Tools → States for the raw entity (e.g. sensor.substrate_1_substrate_1_vwc_coco_coir). If this shows a value but the irrigation_table_1_vwc doesn't, reload template entities: Developer Tools → YAML → Template Entities → Reload.
  3. If the raw entity is also unavailable, the ESPHome device has lost connection. Check network/power to the probe.

Shot durations show 0.0 seconds

  1. Check number.substrate_volume — should be your pot volume (e.g. 10.0 L).
  2. Check number.dripper_flow_rate — should be your dripper output (e.g. 2.0 L/hr).
  3. If these show values but shots are still 0.0, the integration has a known bug where it looks for entities with a crop_steering_ prefix. This will be fixed in a future update.

Valves won't close / stuck open

  1. Immediate: Toggle Maintenance Mode ON. This force-closes everything.
  2. If that doesn't work: Go to Developer Tools → Services, call switch.turn_off targeting the specific valve entity (e.g. switch.table_1).
  3. If the valve won't respond to software commands, physically disconnect power to the relay board.
  4. The valve watchdog should have caught this — check Settings → Automations for the watchdog automation and verify it's enabled.

Dashboard shows "Entity not found"

  1. Check if the Crop Steering integration is loaded: Settings → Devices & Services, look for "Crop Steering System".
  2. If it's there but entities are missing, try removing and re-adding the integration.
  3. If it's not there, add it: Add Integration → Search "Crop Steering". Choose "Load from .env file".

Environmental controls not working

  1. Check that temperature, humidity, and CO2 targets are set (Environment tab).
  2. Verify the relay/switch entities are online in Developer Tools.
  3. For CO2: Confirm lights are ON — CO2 injection is disabled during lights-off.
  4. Check the automations are enabled: Settings → Automations, search for "irrigation_".

12. Entity Reference

Key Sensors

EntityWhat It Shows
sensor.irrigation_table_N_vwcTable N volumetric water content (%)
sensor.irrigation_table_N_ecTable N pore water EC (mS/cm)
sensor.irrigation_table_N_substrate_tempTable N substrate temperature (°C)
sensor.irrigation_room_1_tempRoom temperature (averaged from 4 sensors)
sensor.irrigation_room_1_rhRoom humidity (averaged)
sensor.irrigation_room_1_co2Room CO2 (averaged from 3 sensors)
sensor.irrigation_room_1_vpdRoom VPD (averaged)
sensor.irrigation_average_vwcAverage VWC across all tables
sensor.irrigation_average_ecAverage EC across all tables

Key Switches

EntityWhat It Controls
input_boolean.irrigation_enableMaster system on/off
input_boolean.irrigation_maintenance_modeMaintenance mode (closes all valves)
input_boolean.irrigation_table_N_enabledEnable/disable table N for irrigation
switch.irrigation_table_N_valveTable N solenoid valve
switch.irrigation_mainlineMainline valve (starts pump)
switch.irrigation_mains_waterMains water solenoid
switch.irrigation_manifoldManifold valve

Key Scripts

ScriptWhat It Does
script.irrigation_run_irrigation_cycleRuns a full irrigation cycle (all enabled tables)
script.irrigation_run_tableRuns a single table for configured duration
script.irrigation_emergency_stopEmergency stop — closes ALL valves, disables system

Irrigation System Manual v2.3.1 — Generated March 2026