Skip to content

Superheld/ha-supergreenlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

72 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SuperGreenLab Controller for Home Assistant

Control and monitor a SuperGreenController (running SuperGreenOS) from Home Assistant โ€” fully local, over your LAN. No cloud account, no MQTT broker, no firmware changes.

What you get

For each grow box configured on your controller:

  • ๐Ÿ’ก Lights โ€” brightness per LED channel
  • ๐ŸŒก๏ธ Climate โ€” temperature, humidity, VPD and COโ‚‚ sensors
  • ๐ŸŒ€ Ventilation โ€” fan (in-box circulation) and blower (exhaust) speeds and curve limits
  • โฐ Light schedule โ€” on/off times (as simple HH:MM controls)
  • โš™๏ธ Plus watering, weight, LED spectrum, sensor sources and the controller's other settings, and a restart button

The controller is the parent Home Assistant device, and each enabled box is its own sub-device under it ("Box 0", "Box 1", โ€ฆ). So a box's entities are grouped together automatically, their names stay short ("Temperature", "Fan mode"), and you can assign each box to its own Area. Controller-wide things (restart, state, valve, motors) live on the controller device.

Installation (HACS)

Requires HACS. If you don't have it yet, install HACS first by following its documentation.

  1. Open HACS โ†’ top-right โ‹ฎ โ†’ Custom repositories.
  2. Repository: https://github.com/Superheld/ha-supergreenlab โ€” Type: Integration โ†’ Add.
  3. Search for SuperGreenLab Controller โ†’ Download.
  4. Restart Home Assistant.
Install without HACS

On Home Assistant OS / Supervised, use the Terminal & SSH app:

cd /tmp && rm -rf sgl && git clone https://github.com/Superheld/ha-supergreenlab.git sgl
mkdir -p /config/custom_components
cp -r /tmp/sgl/custom_components/supergreenlab /config/custom_components/

Then restart Home Assistant. To update later, run the same commands again. On HA Container / Core, copy custom_components/supergreenlab into your config/custom_components/ folder instead.

Removing

Settings โ†’ Devices & Services โ†’ SuperGreenLab Controller โ†’ โ‹ฎ โ†’ Delete removes the controller and all its entities. To uninstall completely, then remove the repository from HACS (โ‹ฎ โ†’ Remove) and restart Home Assistant. (A dashboard you created from the strategy/templates is separate โ€” delete it under Settings โ†’ Dashboards if you don't want it.)

Setup

Auto-discovery works only for controllers still on the default mDNS name supergreencontroller. The app derives the mDNS name from the device name, so once you've named your controller it won't be auto-discovered (a name-independent fix needs a firmware change โ€” see DEVELOPMENT.md). If a SuperGreenLab Controller discovered card appears under Settings โ†’ Devices & Services, just confirm it.

Otherwise โ€” and this is the normal case โ€” add it manually by IP:

  1. Settings โ†’ Devices & Services โ†’ Add Integration โ†’ SuperGreenLab Controller.
  2. Enter the controller's IP address (e.g. 192.168.1.50).
  3. Leave username / password blank โ€” they're only needed if you set an auth token on the device.

The controller's chip MAC is used as its unique id, so a changing DHCP address won't create duplicates. Once a controller is set up, Home Assistant tracks it by MAC and updates its IP automatically when DHCP hands it a new address โ€” even after you've renamed the controller (which is exactly when mDNS discovery can no longer find it). As a manual fallback you can always open the integration's โ‹ฎ โ†’ Reconfigure and enter a new address; your entities and history are kept. If the device later asks for an auth token, Home Assistant prompts you to re-authenticate automatically.

Configure your boxes

Open Configure on the integration โ†’ Device layout to enable the boxes you use and assign each LED channel to a box. Sensor sources, schedules, fan curves and the rest appear as settings on the controller's device page (under Configuration).

๐Ÿ’ก Tip: assign each box device to a Home Assistant Area to place it in its physical room.

What the entities do

Per box (the most-used ones; many advanced/diagnostic entities exist too but are disabled by default โ€” enable them from the device page if you need them):

Lights

  • Light 0/1/2 โ€ฆ โ€” brightness (0โ€“100 %) of each LED channel assigned to the box.
  • Light on โ€” read-only: whether the box light is currently on.
  • Light output โ€” read-only: the % the schedule/season currently commands.

Light schedule

  • Timer mode โ€” the main light-driving switch: Manual (just the brightness, no schedule), On/Off schedule (on/off at fixed times), Season (day length follows a simulated, slowly-shifting season). Season is a firmware feature the official app doesn't offer โ€” here you can pick it, set the season parameters below, and press Start season to begin.
  • Light on time / off time โ€” the actual schedule times (shown in your local time; see the sync note below).
  • Season start month / day, Season duration, Season sim days, Start season (button) โ€” the Season-mode parameters and the โ€œstart it nowโ€ trigger (see Season mode below).
  • Season date โ€” read-only: the simulated calendar date the box is currently at while a season runs (shows where the season has progressed to).

Climate (read-only)

  • Temperature, Humidity, VPD, COโ‚‚ (and Weight if enabled) โ€” the box's live readings, taken from the sensor each โ€ฆsource points at.

Climate sources

  • Temperature/Humidity/VPD/COโ‚‚ source โ€” which physical sensor (at which port) feeds that reading for this box.

Ventilation

  • Fan mode / Blower mode โ€” what the unit follows: Manual, Timer (coupled to the light), or Temperature / Humidity / VPD / COโ‚‚ (auto-curve).
  • Fan/Blower speed min / max โ€” the duty range (% when the reference is at its low / high end).
  • Fan/Blower reference from / to โ€” the reference range the curve ramps over.
  • Fan / Blower โ€” read-only: the unit's current duty %.

Other

  • Sunglasses mode (switch) โ€” dims the box lights ~20 min for working inside; self-clears.

Device-wide diagnostics: State, Restarts, and โ€ฆpresent flags (which i2c sensors the controller detects).

Season mode

Season is a firmware light mode the official app doesn't expose โ€” so it's little-known, but it's real and works. Instead of a fixed on/off schedule, the light follows a simulated, slowly-shifting season: a soft daily sunrise โ†’ midday โ†’ sunset curve whose day length drifts over your grow, like the sun does across real months. It's compressed into your actual grow length.

Set it via the box's Timer mode โ†’ Season, then:

  • Season start month / day โ€” which calendar date the simulated season starts at (e.g. April 1).
  • Season duration โ€” how many days of season to simulate (e.g. 215 โ†’ spring into autumn).
  • Season sim days โ€” over how many real days to compress that (= your grow length, e.g. 75).
  • Start season (button) โ€” press to begin from now.
  • Season date (read-only) โ€” shows the simulated date the box is currently at, so you can watch the season progress.

Example: start April 1, duration 120, sim days 60 โ†’ over 60 real days your plants experience the Aprilโ†’August light progression, 2ร— compressed.

Heads-up: like the on/off schedule, Season runs on the controller's clock, which has no timezone โ€” its daily peak lands at solar noon in UTC, so it's shifted by your UTC offset until the firmware gains proper timezone support.

App and Home Assistant don't sync live

Both the official app and this integration talk to the same controller independently โ€” there is no live link between them. What that means in practice:

  • No status sync. The app's grow-phase label (Vegetative/Bloom/Auto) lives only inside the app (and its cloud); it isn't stored on the controller, so Home Assistant can't read or set it. Change the schedule from HA and the app keeps showing its last-set phase. (HA derives its own Light phase from the times.)
  • Changes propagate by polling, not live push โ€” that works, it's just not instant. A change made in HA reaches the controller right away; a change made elsewhere shows up in HA on its next config poll (up to a few minutes). Nothing is broken here, it just isn't real-time.
  • The app only sets, it doesn't show what's set. The app's schedule screen lets you enter times but doesn't display the controller's currently-active schedule โ€” so you can't read back the real values there. Home Assistant does show the live device values, so use HA to see what's actually set.
  • The hour can read differently in each. The controller's firmware runs the schedule in UTC (it sets no timezone). HA converts that to your local time so the times match your wall clock; the app shows the raw number. So the same schedule can appear as e.g. 21:00 in the app and 23:00 in HA โ€” HA's is the real switching time. The clean fix belongs in the firmware (see DEVELOPMENT.md); until then, set the schedule from one place to avoid confusion.

Tips

  • Light brightness sets each channel's intensity; the light's actual output still follows the box's on/off schedule.
  • Make a fan or blower follow temperature, time, humidity, โ€ฆ: use the box's Fan/Blower mode control (Manual / Timer / Temperature / Humidity / VPD / COโ‚‚). It sets the reference and a sensible range in one step; fine-tune the range and min/max afterwards. (A raw source select is available disabled-by-default for power users.)
  • Sensor source dropdowns list only the sensors the controller detects as present at their ports โ€” not every theoretical option. If detection finds none of a kind, all are shown so you can still set it up.
  • Sunglasses mode (a switch per box) dims the box's lights for ~20 minutes so you can work inside without being blinded; it clears itself afterwards. Handy in automations โ€” e.g. turn it on when a door sensor opens.

Troubleshooting

  • Integration not listed after install โ†’ restart Home Assistant.
  • โ€œFailed to connectโ€ โ†’ check the IP and that Home Assistant can reach the controller on your network.
  • Anything else โ†’ Settings โ†’ System โ†’ Logs (filter supergreenlab), or open an issue.

Bundled Lovelace cards

The integration ships for easy configuration custom mode-aware cards and auto-loads them โ€” no separate HACS plugin and no manual dashboard resource. Each card needs only one anchor entity (its mode); the rest is resolved automatically from the same box.

sgl-fan-card

For a fan or blower โ€” point it at the unit's mode select. Shows the mode plus only the relevant settings (Manual โ†’ speed; Timer โ†’ just the speed range, since the unit follows the light schedule automatically; Temperature/Humidity/VPD/COโ‚‚ โ†’ current reading + reference range + speed), and the current speed.

# Fan (in-box circulation)
type: custom:sgl-fan-card
mode: select.supergreencontroller_box_0_fan_mode
# Blower (exhaust) โ€” same card, blower mode entity
type: custom:sgl-fan-card
mode: select.supergreencontroller_box_0_blower_mode

sgl-light-card

The box's light scheduler (like the app's schedule screen) โ€” point it at the box Timer mode select. Shows the mode (Manual / On/Off / Season) and only the inputs that mode needs: in On/Off the on/off times; in Season the current season date plus the season parameters and the Start season button. Per-channel brightness isn't here โ€” those are the box's light entities (use them on the device page or a plain entities card).

type: custom:sgl-light-card
mode: select.supergreencontroller_box_0_timer_mode

sgl-box-card

A box's hardware setup โ€” the one-time wiring choices: which sensor source feeds each metric (Climate sensors) and what spectrum each LED channel is (Light spectrum). It deliberately leaves out live values, fan modes and the schedule โ€” those have their own cards. Unlike the other cards it's anchored with entity: (any entity of the box, e.g. its timer mode select), not mode:.

type: custom:sgl-box-card
entity: select.supergreencontroller_box_0_timer_mode

Any derived entity or the title can be overridden explicitly in the YAML.

Dashboard

Auto-generated (easiest)

The integration ships a dashboard strategy that builds a complete modern dashboard for you โ€” one Sections view per box, with native tiles and mode-dependent fields (shown/hidden via HA's visibility). It detects your boxes and resolves the real entity ids itself, so there's nothing to adjust and it keeps working after re-adds.

Clickable (HA 2026.5+): Settings โ†’ Dashboards โ†’ Add dashboard โ†’ under โ€œCommunity dashboardsโ€ pick SuperGreenLab.

Via YAML (any version):

  1. Settings โ†’ Dashboards โ†’ Add dashboard โ†’ New dashboard from scratch โ†’ give it a name โ†’ it creates an empty dashboard.
  2. Open that dashboard, enter edit mode (top-right pencil), then โ‹ฎ โ†’ Raw configuration editor.
  3. Replace the whole content with exactly:
    strategy:
      type: custom:sgl-dashboard
    No views: โ€” a dashboard strategy generates the whole dashboard itself.

Want it inside an existing dashboard instead of a dedicated one? That's a view strategy โ€” ask and we'll add one (it generates a single view you drop into any dashboard, without replacing it).

Paste-in templates (manual)

These are static; adjust the entity ids to your box.


Building on or contributing to this integration? See DEVELOPMENT.md.

About

Home Assistant integration for the SuperGreenLab SuperGreenController (local HTTP, no cloud)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors