homebridge-growcontrol
v1.3.0
Published
Homebridge plugin for automated grow-tent management — irrigation cycles, climate monitoring, adaptive exhaust, light & UVB scheduling via Zigbee/deCONZ
Maintainers
Readme
homebridge-growcontrol
Automated grow-tent management for Homebridge
A Homebridge platform plugin that automates a complete grow-tent environment — irrigation, lighting, UVB, climate monitoring, and adaptive exhaust — all controlled through Zigbee smart devices via deCONZ/Phoscon.
Features
- 💧 Irrigation — saturation cycles with configurable pump / pause / cycles per growth phase
- 🛡️ Watchdog — hard timeout per pump-on slot, emergency shutoff on hang
- 🚰 Drain sensor — optional contact sensor stops the pump when drainage is detected
- 📅 Scheduler — minute-precision cron for pump times, UVB window, and light day/night cycle
- 🌡️ Climate monitoring — polls temperature + humidity sensors, calculates VPD
- 💨 Adaptive exhaust — VPD-based pulse control with smoothing, cold-weather protection, and a state machine (idle → pulsing → cooldown)
- 📊 Dashboard UI — 5-tab custom Homebridge UI with live charts, device status chips, and a plant progress card
Dashboard
| Tab | Content | |-----|---------| | Overview | Plant card (photo + progress reveal) · climate tiles · device chips · phase timeline | | Irrigation | Active phase metrics · start / abort · live progress | | Log | 14-day bar chart · pump log · event log | | Climate | VPD / Temp / rH smooth charts with target zones · exhaust switching history | | Settings | Phase scheduler · plant profile · device assignment · HB connection |
Plant Card
Climate Charts
All charts use Catmull-Rom spline smoothing. The Climate tab shows:
- VPD, Temperature, and rH as individual smooth lines with colored target-zone bands
- Exhaust switching history — step chart (blue = fan on, dark = idle) that makes the adaptive smoothing behavior visible over time
Color Coding
Values are colored against per-phase target zones stored in the plant profile:
| Color | Meaning | |-------|---------| | 🟢 Green | Within target range | | 🩵 Light blue | Slightly below target | | 🔵 Blue | Well below target | | 🟠 Orange | Slightly above target | | 🔴 Red | Well above target |
Requirements
Hardware
- Raspberry Pi 3 or newer
- ConBee II (or compatible) Zigbee stick with deCONZ / Phoscon
- Zigbee smart plugs for: pump, exhaust fan, lights, UVB lamp
- Zigbee temperature/humidity sensor
- Optional: Zigbee contact sensor for drain detection
Software
- Homebridge ≥ 1.6.0
- Node.js ≥ 18
- deCONZ / Phoscon running locally
- homebridge-deconz (exposes Zigbee devices to Homebridge)
Installation
Install via the Homebridge UI plugin search, or manually:
npm install -g homebridge-growcontrol
sudo systemctl restart homebridgeThen add to your Homebridge config.json:
{
"platform": "GrowControl",
"name": "GrowControl",
"homebridgeUser": "admin",
"homebridgePass": "yourpassword"
}Open Homebridge UI → GrowControl → Settings to assign your Zigbee devices and configure growth phases.
Growth Phases
Three sequential phases, fully configurable in the UI:
| Phase | Default VPD target | Pump on | Cycles | |-------|--------------------|---------|--------| | Seedling | 0.4 – 0.8 kPa | 5 s | 3× | | Growth | 0.8 – 1.2 kPa | 8 s | 5× | | Bloom | 1.2 – 1.6 kPa | 12 s | 8× |
Each phase has its own:
- Pump schedule (times + days)
- Light schedule (on/off times)
- UVB window
- Climate target zones (VPD, temperature, humidity)
- Exhaust control mode (adaptive / off)
Adaptive Exhaust Control
The exhaust runs a VPD-based pulse state machine:
- Climate is polled every 10 minutes
- VPD deviation from target is calculated with exponential smoothing (
smoothingSteps) - Pulse duration scales with deviation (
pulseScaleSec) - After each pulse a cooldown period prevents rapid cycling
- Cold-outdoor protection detects temperature drops after exhaust runs and reduces pulse duration
All parameters are tunable per phase in the Settings tab.
Storage
Data is stored in /var/lib/homebridge/growcontrol/:
| File | Contents |
|------|---------|
| pump.json | Phase config, device IDs, scheduler templates, pump log |
| climate.json | Climate time series — ring buffer, ~7 days at 10 min intervals |
| plant.json | Plant profile, phase history, climate targets, saved profiles |
| events.json | Event log (phase changes, watchdog triggers, VPD status changes) |
Architecture
index.js ← Platform entry, Valve accessory, starts Scheduler + Climate
core/homebridge.js ← HB REST API wrapper, JWT auto-refresh
core/store.js ← JSON storage, synchronous flush, ring buffers
modules/pump/pump.js ← Saturation cycles, watchdog, drain sensor
modules/pump/schedule.js ← DeviceScheduler: pump, UVB, lights (minute cron)
modules/climate/climate.js ← ClimateMonitor, VPD calculation, event logging
modules/climate/exhaust.js ← AdaptiveExhaustControl state machine
homebridge-ui/server.js ← Custom UI IPC server
homebridge-ui/public/ ← Dashboard (Bootstrap 5, Tabler Icons, SVG charts)License
MIT © 2026
