Sign inSign up

kroeberd/growatthub

By kroeberd

•Updated 4 months ago

DONT USE IT

Image
0

2.1K

kroeberd/growatthub repository overview

⁠GrowattHub ⚡ Solar Intelligence

Self-hosted monitoring platform for Growatt solar energy devices — NOAH 2000 batteries, inverters, and hybrid systems. Single Docker container — backend API + frontend UI combined.


⁠Features

  • Live energy flow — animated real-time diagram (Solar → Battery → Grid → Home)
  • Multi-device — monitor multiple NOAH / Inverter units simultaneously
  • Home Assistant — automatic MQTT discovery, all sensors appear in HA instantly
  • Discord alerts — online/offline, low battery, error codes, daily reports
  • SQLite persistence — lightweight, no external DB required
  • Circuit breaker — automatic retry/backoff, resilient to Growatt API outages
  • Prometheus metrics — /api/metrics endpoint for Grafana
  • WebSocket — live UI updates, no browser polling

⁠Quick Start

docker run -d \
  --name growtthub \
  --restart unless-stopped \
  -p 3000:3000 \
  -p 4000:4000 \
  -v /path/to/data:/app/data \
  -e [email protected] \
  -e GROWATT_PASSWORD=yourpassword \
  -e NOAH_DEVICE_IDS=ABC123456 \
  kroeberd/growtthub:latest

Or with docker-compose:

cp .env.example .env
# Edit .env with your credentials
docker compose up -d

⁠Unraid

Import the template manually: Docker → Add Container → Template → paste URL

https://raw.githubusercontent.com/kroeberd/GrowattHub/main/unraid/growtthub.xml

⁠Configuration

All settings via environment variables. See .env.example⁠ for full reference.

⁠Required
VariableDescription
GROWATT_USERNAMEYour Growatt account email
GROWATT_PASSWORDYour Growatt account password
NOAH_DEVICE_IDSComma-separated NOAH 2000 serial numbers
INVERTER_DEVICE_IDSComma-separated inverter serial numbers
⁠MQTT (optional)
VariableDefaultDescription
MQTT_BROKER_URL—e.g. mqtt://192.168.1.100:1883
MQTT_BASE_TOPICgrowtthubTopic prefix
MQTT_DISCOVERY_PREFIXhomeassistantHA auto-discovery prefix
⁠Discord (optional)
VariableDefaultDescription
DISCORD_WEBHOOK_URL—Webhook URL for notifications
DISCORD_LOW_BATTERY_THRESHOLD15Alert threshold in %
DISCORD_DAILY_REPORT_TIME20:00Daily report time (HH:MM)

⁠Ports

PortService
3000Web dashboard (Next.js)
4000REST API + WebSocket (Fastify)

⁠MQTT Topics

growtthub/status                              → system online/offline (LWT)
growtthub/{siteId}/{deviceId}/telemetry       → live sensor data (JSON)
growtthub/{siteId}/{deviceId}/availability    → online / offline
homeassistant/sensor/{deviceId}_{sensor}/config  → HA discovery

⁠API

GET  /api/health
GET  /api/devices
GET  /api/devices/:id
GET  /api/devices/:id/telemetry?from&to&limit
GET  /api/devices/:id/stats/daily?days
GET  /api/devices/:id/stats/today
GET  /api/events?limit
POST /api/events/acknowledge-all
GET  /api/mqtt/status
POST /api/mqtt/rediscover
POST /api/discord/test
GET  /api/metrics        ← Prometheus
WS   /ws                 ← Live telemetry stream

⁠Tech Stack

LayerTechnology
BackendNode.js 20, TypeScript, Fastify
ORMDrizzle ORM + SQLite (WAL)
FrontendNext.js 14, React, Recharts, Tailwind
Process managersupervisord
MQTTmqtt.js v5
ContainersDocker, multi-arch (amd64 + arm64)

⁠License

MIT — kroeberd

Tag summary

Content type

Image

Digest

sha256:722ea2ee1…

Size

80.9 MB

Last updated

4 months ago

docker pull kroeberd/growatthub