A running, lived-in Home Assistant build for cannabis grow rooms. VPD-aware climate control, four-phase crop steering, automated batch-tank dosing, PWM-dimmable LEDs, ESPHome sensors everywhere, and consolidated alerting. It's also the front door to a wider set of related repos — controllers, calculators, sensor firmware, training material, infrastructure bits.
- Repository index
- Related repositories
- What it does
- The HA stack
- External resources
- Screenshots
- A note on secrets
Path: automations/
Working Home Assistant automations you can copy in, swap entity IDs, and run. Drop them into a packages/ directory or paste them into the UI editor.
Safety and alerting
| File | What it does |
|---|---|
light_leak_detection.yaml |
The single most important automation in a flowering room. Any ambient-light sensor above 1 lux during the dark period kills the grow lights and fires a critical notification. Also packaged as a blueprint. |
co2_multi_sensor_shutoff.yaml |
Closes the CO₂ solenoid if any of N room sensors reads above 1800 ppm. Catches stratified pockets that single-sensor shutoff misses. |
sensor_unavailability_watchdog.yaml |
Tells you when a temp, RH, or CO₂ sensor has been offline for ten minutes. Fail-safe closes the CO₂ solenoid if the CO₂ sensor itself dies. |
daily_safe_state_audit.yaml |
At 03:00 every night, force-closes every valve, the CO₂ solenoid, and the humidifier. Belt-and-braces sweep for stuck valves and forgotten overrides. |
CO2_low_Alert.yaml |
Actionable Android alert when CO₂ drops 300 ppm below target for five minutes, or when the CO₂ valve has been open longer than five minutes (probable empty tank). Bypasses do-not-disturb. |
Lighting and environment
| File | What it does |
|---|---|
light_acclimation.yaml |
Ramps brightness from 50% to 90% over 21 days then turns itself off. Triggered at lights-on. |
humidifier_off_at_lights_off.yaml |
Hard-pins the humidifier off when lights go off. Lets the dehumidifiers run the dark period uncontested. |
Adjust ACI Fan Speed External Sensor.md |
AC Infinity fan speed (0-10) from an external temp sensor with separate day and night targets. |
Leaf_VPD.md |
Leaf-VPD vs air-VPD, and the full control system that uses an IR leaf-temp sensor to drive a humidifier or dehumidifier. |
Irrigation and dosing
| File | What it does |
|---|---|
refill_tank_triggered_by_low_level.yaml |
Full batch-tank refill plus Athena Pro Line dose sequence. Fires on low water level, manual button, or tank-empty signal. Pre-fill, refill to volume, dose A/B/C/Bloom/Core in sequence, mix delay, pH/EC verification, completion alert. |
Automatic_batch_tank_filling_full_explainer.md |
Long-form walk-through of the refill and multi-part Athena dosing logic. |
auto dosing athena.md |
Helper definitions (EC target, solution volume) and dosing-node sequence for an Athena auto-dose workflow. |
crop steering node red flow |
Older Node-RED export of a crop-steering implementation. Most people should use Packages/CropSteering/ instead. |
Access control
| File | What it does |
|---|---|
door_open_siren.yaml |
Sounds a siren and notifies operators if a critical door stays open longer than 20 seconds. Cancels when the door closes. |
auto_door_lock.yaml |
Locks a door 20 seconds after it closes. Kills the "I forgot to lock it" failure mode. |
CO₂ blueprint imports
| File | What it does |
|---|---|
co2_automation.MD |
Import link and notes for the CO₂ control blueprint. See also blueprints/co2_control_and_alerts.yaml. |
Path: blueprints/
The same patterns as above, wrapped as Home Assistant blueprints. Import once, then point them at your entities from the UI.
| Blueprint | What it does |
|---|---|
co2_control_and_alerts.yaml |
Day/night CO₂ setpoints with hysteresis switching, relay-stuck safety auto-off, low and high alerts with cooldowns, optional light auto-dim on sustained low CO₂. |
grow_room_env_threshold_alerts.yaml |
One blueprint, all your environmental alerts. Separate day/night thresholds, pause switch, persistence delay, cooldown between notifications, multi-device notify targets. |
auto_temp_triggered_light_dimming.yaml |
When the room overheats, dim the lights and keep dimming until temp comes back. Plant-safe heat protection. |
light_leak_detection.yaml |
Critical light-leak alarm. Any illuminance sensor above the threshold while your lights-on binary sensor is off forces the grow lights off and runs your notify action. |
Path: Packages/
Larger feature sets bundled as Home Assistant packages. To use them, add this to your configuration.yaml:
homeassistant:
packages: !include_dir_named packages| Folder | What's inside |
|---|---|
Packages/CropSteering/ |
A four-phase (P0/P1/P2/P3) crop-steering package — input helpers, template sensors, automations, and a long user guide. Start with Packages/ReadMe.MD and crop_steering_installation_guide_improved.md. |
Two standalone YAMLs sit at the repo root and can be !included into your own setup:
crop_steering_package.yaml— an earlier single-file snapshot of the same crop-steering logic, kept for reference.vpd_configuration.yaml— leaf-VPD and air-VPD template sensors.
Path: esphome/
Device YAMLs for the sensor and actuator nodes used in the build. Each file's header explains wiring and any quirks.
| Config | Device | What it does |
|---|---|---|
CO2_Sensor_espatoms3.yaml |
M5Stack Atom S3 Lite + SCD41 (Grove) | Roaming CO₂, temp, RH, VPD. |
SCD4x_m5stack_ESPOE.yaml |
M5Stack ESPPoE + SCD41 | PoE-powered CO₂ sensor with VPD, daily min/max, and CO₂ alerts as template sensors. |
esphome_m5stack_scd41.yaml |
M5Stack Atom Lite + SCD41 | Compact CO₂ + environment monitor. |
m5Stack_AirQ.yaml |
M5Stack AirQ | Dual CO₂ sensors with auto-calibration, PM, RH, temperature. |
m5stack-dial-tank-monitor.yaml (README) |
M5Stack Dial + ultrasonic | Tank water level — distance and percentage, displayed on the dial mounted outside the tank. |
m5stack-dial-scales-co2-tank.yaml |
M5Stack Dial + load cell | CO₂ cylinder weight — track consumption and know when to refill. |
m5stack_dial_ec_tdr_sdi12.yaml |
M5Stack Dial + SDI-12 | Logger for SDI-12 substrate sensors (EC, VWC, temperature) with a dial readout. |
teros-12-sdi-12.yaml |
M5Stack Atom Lite (ESP32) + SDI-12 | Reads TEROS-12 and compatible SDI-12 soil sensors. Includes the calibration and pore-water EC math. |
terralink.yaml |
Growlink Terralink + M5Atom Lite | Turns a Growlink Terralink into an ESPHome node. |
atlas_wifi_hydroponics_kit.yaml |
Atlas Scientific EZO hydroponics kit on ESP32 | pH, EC, and RTD (temperature) from Atlas Scientific EZO modules. |
espoe_peristaltic_pumps.yaml |
M5Stack ESPPoE + relay/PWM | Peristaltic pump control for automated dosing. |
m5Stack ESPPOE PB HUB 2CH-DualButton-BLEproxy.yaml |
M5Stack ESPPoE + PB Hub | Two-channel switch / dual-button with BLE proxy. |
pwm_led_lights.yaml |
M5Stack Atom Lite + PWM unit | Dim a 0-10 V or PWM LED driver as a native HA light entity. Wired in place of the potentiometer. |
espatom_mlx90640.yaml |
M5Stack Atom Lite + MLX90640 | 32 × 24 thermal IR array for canopy temperature mapping. |
thermal_camera_leaf_temp.yaml |
M5Stack Atom Lite + MLX90614 | Single-pixel IR for direct leaf-surface temperature. Feeds the leaf-VPD calculation. |
THC-S Home Assistant Template Sensors calibrated for Coco coir |
HA template (not ESPHome) | Coco-coir-calibrated pwEC formula for the THC-S soil sensor. |
secrets.yaml.example |
— | Template for secrets.yaml. Copy and fill in WiFi credentials, API encryption key, and OTA password. |
Path: addons/
| Add-on | What it does |
|---|---|
addons/appdaemon/grow_monitor/ |
Grow Room Monitor — an AppDaemon app that watches seven sensor types (temp, RH, CO₂, VPD, leaf VPD, VWC, pwEC) with day/night-aware thresholds and trend analysis. Sends one consolidated, severity-graded notification with mute and pause actions rather than spamming you per sensor. Optional OpenAI integration writes a short situation summary into the alert. See Readme.MD. |
Path: teros-12/
| File | What it does |
|---|---|
teros-12/Readme.md |
TEROS-12 (and compatible SDI-12 clone) wiring, ESP32 sketch, calibration. A newer dedicated repo is TDR-Sensor. |
teros-12/EsPoE-Teros-12.ino |
Arduino sketch for the ESPPoE board reading TEROS-12 over SDI-12. |
teros-12/teros-12-sketch.ino |
Standalone Arduino sketch — has its own web UI and MQTT publishing. |
teros-12/libraries/ESP32-SDI12/ |
Bundled ESP32 SDI-12 library. |
Path: growingSOPs/
| Document | Topic |
|---|---|
cloning.md |
Cloning and propagation. |
Environment reference guide.md |
Stage-by-stage setpoint cheat sheet — temperature, RH, VPD, CO₂, PPFD, DLI. |
Derived crop signals.md |
Sensor-derived crop signals for leaf/air VPD, canopy cooling, dryback, EC trends, and Home Assistant templates. |
Indoor air flow.md |
Airflow requirements and room layout for indoor grows. |
Indoor Pathogens.md |
Common indoor cultivation pathogens — recognition, prevention, response. |
Cleaning.md |
Cleaning and sanitation procedures. |
| File | What it does |
|---|---|
automated_batch_tank.md |
System diagram and the full automation for batch-tank fill and dose. |
athena.html |
Standalone single-file Athena Pro Line batch-tank calculator. The hosted version lives at batch_tank_calculator. |
crop_steering_package.yaml |
Earlier single-file crop-steering snapshot. For new installs use Packages/CropSteering/. |
vpd_configuration.yaml |
Leaf and air VPD template sensors. |
PARTS_LIST.md |
Bill of materials — sensors, valves, plugs, microcontrollers, drivers. |
The wider system, broken into focused repos. Some are reference implementations, some are the production code, some are companion tools.
| Repo | What it is |
|---|---|
| HA-Irrigation-Strategy | A proper multi-zone (1-6) crop-steering controller for Home Assistant. Custom integration plus AppDaemon modules. Phase state machine, VWC/EC-driven irrigation, full dashboards. The most actively developed crop-steering setup in this ecosystem. |
| open-crop-steering | A Home Assistant add-on (with a Docker fallback) that turns cultivation recipes into versioned, immutable plans. Adds an AI runtime layer bounded by hard guardrails, and produces tamper-evident audit records suitable for regulated facilities. v0.1, in development. |
| irrigation_unlimited | Fork of the Irrigation Unlimited HA integration (rgc99), pinned for the irrigation stack. |
| Repo | What it is |
|---|---|
| batch_tank_calculator | Athena Pro Line batch-tank nutrient calculator — metric and imperial, scales to any reservoir volume, persists calculations to local storage, exports to CSV. Live site. |
| cannabis-grow-room-levers | A systems-thinking field guide — the grow room treated as a coupled energy / moisture / carbon / salt / biology system. Eleven control levers, four balances, a lever-interaction matrix, a diagnostic chain, six common failure modes. Single self-contained HTML. Live site. |
| Grow Room Training | Training material distilled from the levers framework — a visual manual, a 15-chapter textbook with auto-scored MCQs, printable field cards, and an LLM-agent playbook for autonomous HA control. |
| cultivation-intelligence | AI cultivation intelligence platform — keeps every sensor reading and irrigation event in a time-series history, with an LLM advisory layer on top. |
| Repo | What it is |
|---|---|
| mosquitto-bridge-setup | Mosquitto bridge configuration for dual-boot Windows/Linux relaying. Useful when a no-auth nutrient doser has to talk to authenticated HA MQTT. |
| visitors_repo | A small visitor sign-in / sign-out tracker for HA. Built to be quick and to not get tangled up when visitors forget to sign out. |
| rosinlab | Local-first rosin press and sift logging web app. Embeds inside Home Assistant via an iframe card. Compare mode plays up to three press videos side by side with parameters. |
| TDR-Sensor | The newer dedicated repo for TEROS-12 and compatible SDI-12 substrate sensor builds. Supersedes the teros-12/ folder here. |
The stack covers:
- CO₂ control — day/night setpoints, hysteresis, safety auto-off, low and high alerting, and an option to auto-dim lights when CO₂ is sustained low. See
blueprints/co2_control_and_alerts.yaml. - VPD calculations — live air VPD and leaf VPD via
vpd_configuration.yaml. Leaf VPD uses an MLX90614 IR temperature reading. - Automatic VPD control — drives a humidifier or dehumidifier to hold leaf VPD steady through temperature and RH drift.
- Crop steering and irrigation — full four-phase (P0/P1/P2/P3) package in
Packages/CropSteering/. For larger multi-zone setups use HA-Irrigation-Strategy. - Substrate sensing — TEROS-12 and SDI-12 sensors talking to an ESP32, giving you VWC and pore-water EC. See
teros-12/andesphome/teros-12-sdi-12.yaml. If you want something that just works, use Chill-Division/sdi12-substrate-sensor — calibrated and auto-discovers over MQTT. - Nutrient dosing — peristaltic pumps run from an M5Stack ESPPoE, automated batch-tank fill, multi-part Athena Pro Line dosing, then a post-dose pH/EC verification through Atlas Scientific EZO probes. See
automated_batch_tank.mdandautomations/refill_tank_triggered_by_low_level.yaml. - Lighting — 0-10 V or PWM-dimmable LED drivers exposed as native HA
lightentities through the M5Stack PWM unit. Seeesphome/pwm_led_lights.yaml. A linear PPFD acclimation ramp lives inautomations/light_acclimation.yaml. - Tank level monitoring — ultrasonic distance sensor on the tank lid with the readout on an M5Stack Dial mounted outside the tank. See
esphome/m5stack-dial-tank-monitor.yaml. - Notifications — consolidated environmental alerts with day/night thresholds, mute and pause actions, and an optional AI summary line. See
addons/appdaemon/grow_monitor/. - Fan speed control — AC Infinity fans driven from an external temp sensor. See
automations/Adjust ACI Fan Speed External Sensor.md. - AC control — IR-blaster control of a wall-mount split AC with PID, holding the room to about ±0.2 °C with regular hardware. See HA's Broadlink and SmartIR integrations.
- Thermal canopy temperature — ESP32 with an MLX90640 32 × 24 thermal array, or an MLX90614 single-pixel for spot leaf temp. See
esphome/espatom_mlx90640.yamlandesphome/thermal_camera_leaf_temp.yaml.
Everything below is what actually runs the build. Each entry links to its source.
| Add-on | Source | Notes |
|---|---|---|
| AppDaemon | Community Add-ons | Hosts addons/appdaemon/grow_monitor/ and the HA-Irrigation-Strategy AppDaemon modules. |
| ESPHome Device Builder | Official | Flashes and manages every sensor and actuator in esphome/. |
| Frigate NVR | Frigate | Object-detection NVR. |
| Matter Server | Official | Matter device support. |
| Mosquitto Broker | Official | MQTT broker. Used by ESPHome, Zigbee2MQTT, and the custom doser. |
| NetBird | NetBird | WireGuard-based mesh VPN. |
| Node-RED | Community Add-ons | Used by automations/crop steering node red flow. |
| OpenClaw Assistant | OpenClaw | Companion add-on for the OpenClaw integration. |
| Whisper | Official | Local speech-to-text for the voice assistant pipeline. |
| Z-Wave JS | Official | Z-Wave controller. |
| Zigbee2MQTT | Z2M | Zigbee bridge. Runs in parallel with ZHA on a second radio. |
| Visitors | This org | Visitor sign-in / sign-out web app. |
Integrations you actually have to set up — default_config auto-loaders aren't listed.
Grow-room directly relevant
| Integration | Source / docs |
|---|---|
| AC Infinity | HACS custom integration |
| Better Thermostat | HACS custom integration |
| Crop Steering System | HACS custom integration |
| ESPHome | Core integration |
| Frigate | HACS custom integration |
| Generic Hygrostat | Core integration |
| Generic Thermostat | Core integration |
| HVAC Group | HACS custom integration |
| InfluxDB | Core integration |
| Local Calendar | Core integration |
| Local To-do | Core integration |
| MQTT | Core integration |
| MetService NZ Weather | HACS custom integration |
| Mobile App | Core integration |
| Powercalc | HACS custom integration |
| Scheduler | HACS custom integration |
| Template | Core integration |
| ZHA | Core integration |
| Zigbee2MQTT | Add-on + MQTT integration |
| Z-Wave JS | Core integration |
The rest of the house
Click to expand
| Integration | Source / docs |
|---|---|
| Alarmo | HACS custom integration |
| Alexa Media Player | HACS custom integration |
| Ambient Network | Core integration |
| Anthropic / OpenAI / Grok / Google Generative AI | Conversation agents |
| Apple TV | Core integration |
| Bermuda BLE Trilateration | HACS custom integration |
| Bluetooth / iBeacon | Core integration |
| CO2 Signal | Core integration |
| EdgeOS | HACS custom integration |
| Generic Camera | Core integration |
| go2rtc | Core integration |
| HACS | Custom integration manager |
| HASS.Agent | HACS custom integration |
| Husqvarna Automower BLE | Core integration |
| Google Sheets / Google Translate | Core integration |
| LLM Vision | HACS custom integration |
| LocalTuya | HACS custom integration |
| Magic Areas | HACS custom integration |
| Matter | Core integration |
| Music Assistant | Core integration |
| Network Scanner | HACS custom integration |
| Node-RED Companion | HACS custom integration |
| OpenAI TTS | HACS custom integration |
| OpenClaw | HACS custom integration |
| Passive BLE Monitor | HACS custom integration |
| Reolink | Core integration |
| RuuviTag BLE | Core integration |
| Shelly | Core integration |
| Shopping List | Core integration |
| Simple Inventory | HACS custom integration |
| Sonoff (LAN) | HACS custom integration |
| Spook | HACS custom integration |
| Switch as X | Core integration |
| Synology DSM | Core integration |
| TP-Link Kasa | Core integration |
| Tuya | Core integration |
| Tuya Local | HACS custom integration |
| Uptime Kuma | Core integration |
| Victron BLE | Core integration |
| Watchman | HACS custom integration |
| Wyoming | Core integration |
| Xiaomi BLE | Core integration |
| Yale / Yale BLE | Core integration |
- Petro31/easy-time-jinja — Jinja-friendly time formatting.
- SirGoodenough/Availability-Template — reusable
availabilitytemplate for template entities. - TheFes/relative-time-plus — richer relative-time strings.
- Killerherts/nodeRed-HA-GrowingFunctions — Node-RED flows for HA grow automation.
- jeemers/Homegrown-Assistant — A great HA + ESPHome crop-steering reference.
- Intergalactic-XYZ/awesome-cropsteering — Curated awesome-list.
- cropsteering/OS-SDI12 — Raw SDI-12 to MQTT, no Home Assistant required.
- Chill-Division/M5Stack-ESPHome — M5Stack ESPHome configurations for indoor gardening.
- Chill-Division/sdi12-substrate-sensor — Calibrated SDI-12 substrate sensor with MQTT auto-discovery. Use this rather than rolling your own TEROS-12.
- kromadg/soil-sensor — THC-S soil-sensor reference.
- M5Stack sensors — most of the hardware in this repo.
- Hydrobuddy — open-source hydroponic nutrient calculator.
- Open Salts — ingredient breakdowns of common commercial nutrients.
- Grodan Cannabis Edition 2024 (PDF)
- Athena Pro Line Handbook (issuu)
- Growlink Crop Steering primer
- Ultimate Grow Room HVAC Guide (PDF)
- Grow-room airflow CFD walkthrough (YouTube)
- How to splice sensor wires properly (YouTube)
- OpenTHC — open cannabis-industry standards and tooling.
- farmOS — open-source farm record-keeping.
- OpenFOAM — CFD modelling, useful for airflow simulation.
Peri-pump automatic batch-tank filling:
The ESPHome configs under esphome/ still have device-specific credentials inline in places — API encryption keys, OTA passwords, WiFi AP fallback passwords. Before flashing anything in production, swap those for !secret references backed by a per-device esphome/secrets.yaml. Start from esphome/secrets.yaml.example and never commit the real secrets.yaml.
If you're forking this for your own build, rotate any credential you inherit from a committed example.
Still a work in progress. Issues and pull requests are welcome.