===== Soil-Moisture-Driven Irrigation with VegeHub & B-Hyve ===== This page documents the irrigation upgrade for the vegetable garden beds using **real soil moisture data** to trigger watering through the existing **B-Hyve** irrigation controller. The goal: **water only when the soil actually needs it**, not on a timer. ---- ==== 🥕 Project Overview ==== The system uses: * **VegeHub WiFi Control Hub (Vegetronix)** * Handles wired soil moisture sensors (1–4 per hub) * Sends readings to Home Assistant (local API) * Has an onboard relay (optional to use) * **VH400 Soil Moisture Sensors (Vegetronix)** * Extremely accurate, long-term stable, outdoor-rated * Low power consumption * Ideal for vegetable beds * **B-Hyve Irrigation System** * Already installed and working * Exposed to Home Assistant as zone switches * Automations will trigger B-Hyve based on moisture thresholds Your initial project plan: * **Phase 1:** 1 VegeHub + 4 sensors → one sensor per bed * **Phase 2:** Add second VegeHub + 4 sensors (8 total) * **Goal:** Each irrigation zone waters *only* when its beds are dry ---- ==== 🌱 System Diagram (Text Version) ==== [ VH400 Sensor A ] \ [ VH400 Sensor B ] > → VegeHub → Home Assistant → B-Hyve Zone 1 [ VH400 Sensor C ] / [ VH400 Sensor D ] Home Assistant logic: - Compute per-bed moisture (avg or median) - Compute zone moisture = min(bed A, bed B) - Trigger watering only when moisture < threshold ---- ==== 🔧 Parts List ==== === **Required (Phase 1 – 4 beds)** === ^ Qty ^ Item ^ Description ^ Link ^ | 1 | **VegeHub WiFi Control Hub** | Outdoor WiFi hub for soil sensors | https://www.vegetronix.com/Products/VG-HUB/ | | 4 | **VH400 Soil Moisture Sensor** | Capacitive, highly accurate, waterproof | https://www.vegetronix.com/Products/VH400/ | | 4 | 2-conductor outdoor burial wire (18–22 AWG) | Cable from beds to hub | Home Depot / Lowes | | 1 | Weatherproof mounting hardware | Mount the VegeHub on post/wall | Hardware store | === **Optional / Helpful** === ^ Qty ^ Item ^ Description ^ Link ^ | 1 | 5–12V DC Power Supply | If not using battery mode | Amazon | | 1 | Drip irrigation tuning kit | Adjust flow per bed | Amazon | | 1 | Additional VegeHub (Phase 2)** | For 8 sensors total | https://www.vegetronix.com/Products/VG-HUB/ | ---- ==== 🌿 Recommended Sensor Layout ==== **4 sensors → 4 beds** Place each probe: * At **root depth** (3–6 inches) * About **halfway between drip emitters** * **Not directly under** a drip outlet * Slightly angled downward for better soil contact For **8 sensors (Phase 2):** * 1 probe per bed (best) * OR 2 probes for uneven beds (sun/shade differences) ---- ==== 🔌 Home Assistant Integration ==== === VegeHub → Home Assistant === The official VegeHub integration exposes: * `sensor.bed1_moisture` * `sensor.bed2_moisture` * `sensor.bed3_moisture` * `sensor.bed4_moisture` * `switch.vegehub_relay` (optional) === B-Hyve → Home Assistant === Your existing irrigation switches: * `switch.veg_bed_1_2_zone` * `switch.veg_bed_3_4_zone` * `switch.veg_bed_5_6_zone` * `switch.veg_bed_7_8_zone` Home Assistant will use the VegeHub readings to automate watering. ---- ==== 💧 Watering Logic ==== === Rules === * Water when **moisture < dry threshold** * Only run during **allowed time windows** (best: early morning) * Continue watering until: * Soil **> wet threshold**, OR * **Maximum runtime** is reached (safety) === Example Thresholds === * **Dry threshold:** 20–25% VWC * **Wet threshold:** 28–32% VWC (These values can be tuned based on your soil and crop needs.) ---- ==== 🧠 Example Automation (YAML) ==== alias: "Veg Zone 1 • Moisture Based Watering" trigger: - platform: numeric_state entity_id: sensor.bed1_moisture below: 22 condition: - condition: time after: "05:00:00" before: "09:00:00" action: - service: switch.turn_on target: entity_id: switch.veg_bed_1_2_zone - wait_for_trigger: - platform: numeric_state entity_id: sensor.bed1_moisture above: 28 timeout: "00:20:00" - service: switch.turn_off target: entity_id: switch.veg_bed_1_2_zone Replicate the automation for Zones 2–4 using their matching sensor entities. ---- ==== ✔️ Why VegeHub Fits This Setup ==== * Highly reliable agricultural-grade hardware * VH400 sensors offer best-in-class accuracy and stability * WiFi connection avoids outdoor Zigbee issues * Seamless Home Assistant integration * Lets B-Hyve continue controlling the valves * Simple roadmap to expand from 4 → 8 sensors ---- ==== 📦 Where to Buy ==== * **VegeHub WiFi Control Hub** https://www.vegetronix.com/Products/VG-HUB/ * **VH400 Soil Moisture Sensor** https://www.vegetronix.com/Products/VH400/ ----