npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

Readme

homebridge-growcontrol

Automated grow-tent management for Homebridge

npm Homebridge Node License: MIT

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


Installation

Install via the Homebridge UI plugin search, or manually:

npm install -g homebridge-growcontrol
sudo systemctl restart homebridge

Then 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:

  1. Climate is polled every 10 minutes
  2. VPD deviation from target is calculated with exponential smoothing (smoothingSteps)
  3. Pulse duration scales with deviation (pulseScaleSec)
  4. After each pulse a cooldown period prevents rapid cycling
  5. 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