F2 Irrigation System Manual

Version 2.5.0 — Last updated June 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. f2-control Add-on Setup 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 — f2-control Add-on (deployed — the autonomous coordinator)

The f2-control Home Assistant add-on is the deployed autonomous control layer. It is a single synchronous Python process that polls HA over REST every 60 seconds, runs the 4-phase P0–P3 crop-steering engine per zone, fires irrigation shots with hardware readback, republishes the sensor.crop_steering_* surface, and sends 30-minute vitals to the operator's phone. It is gated by a hard kill switch — input_boolean.f2_control_enabled — so you can disable autonomous actuation without removing the add-on. See Section 9 for setup.

Kill switch: input_boolean.f2_control_enabled — when OFF, the add-on continues to read sensors and compute decisions but never actuates any valve or pump. Flip it OFF to pause autonomous watering at any time without restarting the add-on.

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]
Irrigation 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)
    ↓  [f2-control add-on reads these every 60 s]
Autonomous P0–P3 decisions → valve actuation

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 f2-control Engine

The deployed workhorse is the f2-control add-on. Every 60 seconds it polls all zone sensor entities, runs the 4-phase P0–P3 crop-steering logic independently for each zone, and — if the kill switch is ON — actuates valves accordingly. It does not rely on HA automations for phase logic: all steering decisions live inside the add-on's Python engine.

The sequence for each watering shot is:

Add-on wakes on its 60-second poll; checks kill switch (input_boolean.f2_control_enabled must be ON).
Per zone: evaluates current phase (P0–P3) and whether an irrigation shot is due based on live VWC, EC, and the per-zone targets.
If a shot is warranted: opens the mainline valve (pump auto-starts via pressure switch), waits 2 seconds for line pressure.
Opens the zone valve, irrigates for the computed shot duration, closes the zone valve, reads back hardware state to confirm close.
Closes the mainline valve (pump stops). Publishes updated sensor.crop_steering_* state. Sends 30-min vitals to operator phone (if configured).
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.

Time-Based Fallback

When the f2-control kill switch is OFF, the Layer 1 Irrigation Package handles time-based irrigation at the configured interval. This is the safe fallback mode — the crop steering engine is suspended but plants still get watered.

What Controls the Cycle

SettingWhere to Change ItDefault
Kill switch (autonomous mode)input_boolean.f2_control_enabledOFF (safe)
Irrigation window startSchedule tab → Window StartSet in HA
Irrigation window endSchedule tab → Window EndSet in HA
Time between cycles (fallback)Schedule tab → Interval60 minutes
Duration per table (fallback)Schedule tab → Duration60 seconds
Which tables are activeZone Control tab → Enabled toggle per tableAll off
Master on/offCommand Center → Irrigation 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. The f2-control add-on runs this logic autonomously per zone.

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 the per-zone threshold (default 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.

EC targets are per-zone — set via number.crop_steering_zone_X_ec_target_{veg,gen}_pN entities (see Section 8).

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 in fallback mode (start with 60 minutes).
Set Duration to how long each table runs per cycle in fallback mode (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 Irrigation 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

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). As of v2.5.0, shot duration is computed live from the substrate config (substrate_volume, plant_count, drippers_per_plant, dripper_flow_rate) — these values must be accurate or every shot will be mis-sized.
Once confident in sensor readings and hardware, install the f2-control add-on (see Section 9) and flip the kill switch ON to enable autonomous steering.

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

overview.html — Mobile One-Pager (v2.5.0)

www/overview.html is a compact mobile dashboard designed for a quick status check without opening the full operator console. It has three tabs:

TabWhat It Shows
SteerPer-zone vitals (VWC, EC, substrate temp) alongside their targets; current P0–P3 phase per zone
ControlsRoom climate (temp, VPD, CO2, PPFD, DLI); pump, light, and zone control switches
DosingVeg-room peristaltic dosing pump controls — these drive the nutrient dosing pumps that feed the F2 room from the veg room

Open overview.html on a phone browser pointed at your HA URL. It auto-refreshes and requires no separate installation.

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.

Shot sizing is live-computed (v2.5.0). The engine calculates shot duration from substrate_volume × shot_fraction ÷ (plant_count × drippers_per_plant × dripper_flow_rate) on every poll. Stale or default values here directly mis-size every irrigation shot — verify these against your actual hardware before enabling autonomous mode.
ParameterWhat It MeansDefaultHow To Measure
Substrate VolumeVolume of growing media per pot (litres)10.0 LCheck your pot size
Plant CountNumber of plants per zone1Count plants in the zone
Drippers Per PlantNumber of drippers in each pot2Count them
Dripper Flow RateHow fast each dripper delivers water (L/hr)2.0 L/hrTime how long to fill a measuring cup
Field CapacityMaximum VWC your substrate can hold70%Saturate substrate, read VWC when dripping stops

EC Targets — Per-Zone (Athena Defaults)

EC targets are set per zone using the entities number.crop_steering_zone_X_ec_target_{veg,gen}_pN. The table below shows the default Athena values — adjust per zone as needed based on that zone's runoff EC readings.

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 system in fallback (kill switch OFF) for a week while monitoring VWC trends. Once you're confident in sensor readings and hardware, flip input_boolean.f2_control_enabled ON to enable autonomous crop-steering.

9. f2-control Add-on Setup

The f2-control add-on is the deployed autonomous coordinator. It replaces the earlier engine (now retired; the old master_crop_steering_app.py is kept as a manual rollback only). This section covers installing and enabling f2-control from scratch.

What the add-on does: polls HA sensors every 60 s, runs the 4-phase P0–P3 per-zone crop-steering engine, fires irrigation shots with hardware readback, republishes sensor.crop_steering_* entities, and sends 30-minute operator vitals. All actuation is gated by the kill switch.

Installation Steps

Go to Settings → Add-ons → Add-on Store. Switch to the Local tab. The f2-control add-on should appear if the repo is mounted at /addons/f2-control. Click it and choose Install.
Once installed, go to the add-on's Configuration tab. Set the required options:
  • zones — number of active zones (e.g. 6)
  • lights_on_hour / lights_off_hour — your photoperiod start/end hours
  • notify_service — HA service to call for 30-min vitals (e.g. notify.mobile_app_operator)
Click Save, then go to the Info tab and click Start.
Create the kill-switch entity if it doesn't exist. In HA go to Settings → Helpers → Create Helper → Toggle and name it f2_control_enabled (entity ID will be input_boolean.f2_control_enabled). Alternatively add it to a packages/ YAML file.
Check the add-on Log tab — you should see [f2-control] started, kill-switch=OFF. No errors means the add-on is running and reading sensors.
When you are ready to go live, flip input_boolean.f2_control_enabled to ON. The add-on will begin autonomous actuation on the next 60-second poll.
Go live safely: Before flipping the kill switch ON, confirm substrate probe values are live (not "Unavailable"), the mainline valve responds to manual commands, and you have watched at least one manual irrigation cycle complete without issues.

Verifying the Add-on is Working

10. Safety Systems

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

Master safety control — Kill Switch: input_boolean.f2_control_enabled (OFF) suspends all autonomous actuation instantly. This is the first thing to flip in any emergency related to the autonomous engine.
ProtectionWhat It DoesAutomatic?
Kill Switchinput_boolean.f2_control_enabled OFF — add-on reads/computes but never actuates any valve or pumpManual (instant)
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
Lights-On Watering WatchdogFlags any zone that has gone unwatered for more than N hours during lights-on; escalates to operator alertYes
Anti-Lockout High-EC FlushWhen pore EC exceeds the safety ceiling, triggers a dilutive flush shot instead of locking the zone out entirelyYes
Cross-Zone Outlier DetectionFlags a zone whose water uptake deviates significantly from its siblings — indicates probe fault, blocked dripper, or plant stressYes
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.

v2.5.0 Safety Additions

Source-water gate (pH + EC): Before opening any valve the engine checks both the source-water pH and EC against configured limits. Either value out of range blocks the shot. A configurable grace period allows transient probe noise without aborting; if a probe is dead or unavailable the gate is fail-closed — no shot fires. Set the pH and EC limits via the crop_steering_source_water_* entities.
Fail-closed hardware writes: If a pump, mainline, or zone-valve command fails (no-response or read-back mismatch), the shot is aborted immediately and does not count toward the zone's shot tally. The engine does not retry partial sequences — it shuts down cleanly and logs the fault. This prevents under-watering from silently accumulating against the daily cap.
P2 EC-correction min-interval (anti-short-cycle): When EC is high and the engine raises the VWC threshold to trigger more frequent flushes, a minimum interval between consecutive P2 shots is enforced. This prevents the EC-correction logic from short-cycling the pump repeatedly in a short window. Adjust via number.crop_steering_p2_min_interval_minutes.

Optional PID EC Loop

An optional PID-based EC correction loop is available but off by default. When enabled, the engine replaces the simple high/low EC threshold adjustments in P2 with a continuous PID controller that trims the VWC target in real time to converge on the zone's EC target.

11. Troubleshooting

Irrigation won't run

  1. Check Command Center → Irrigation 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.
  6. If using autonomous mode: check input_boolean.f2_control_enabled is ON and the f2-control add-on is running (Settings → Add-ons → f2-control → Log).

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_".

f2-control add-on not actuating

  1. Check add-on log (Settings → Add-ons → f2-control → Log) for errors.
  2. Confirm input_boolean.f2_control_enabled is ON — the add-on silently skips actuation when OFF.
  3. Confirm at least one zone is enabled in Zone Control.
  4. Verify the add-on configuration options (zones, lights hours) are saved correctly.
  5. Restart the add-on from the Info tab if the log shows stale timestamps.

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
sensor.crop_steering_app_statusf2-control add-on runtime status
sensor.crop_steering_app_current_phaseCurrent P0–P3 phase per zone

Key Switches

EntityWhat It Controls
input_boolean.f2_control_enabledKill switch — autonomous actuation on/off
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

F2 Irrigation System Manual v2.5.0 — June 2026