Tiny application to access real-time data from Sungrow inverters with WiNet-S dongle over WebSocket and publish data to a mqtt server.
Written in GoLang, based on https://github.com/nItroTools/sungrow-go.
- Pull image from DockerHub manually or via Docker-Compose file: https://hub.docker.com/r/stefanroeck/sungrow
docker-compose.yml:
version: "3.9"
services:
sungrow-go:
image: stefanroeck/sungrow
restart: unless-stopped
environment:
- SUNGROW_HOST=${SUNGROW_HOST}
- MQTT_URL=${MQTT_URL}
- MQTT_USER=${MQTT_USER}
- MQTT_PASSWORD=${MQTT_PASSWORD}
- SLEEP=30
- Checkout Repo
$ go install .
$ go build ./bin
env GOOS=linux GOARCH=arm GOARM=7 go build -o ./bin/sungrow-go-raspi
env CGO_ENABLED=0 GOOS=linux go build -o ./bin/sungrow-go-docker
List available and required parameters
$ sungrow-go -help
Basic usage with ip address of your inverter (e.g. 192.168.2.100
)
$ sungrow-go -host 192.168.2.100 -mqtt.server mqtt://test.mosquitto.org:1883 -mqtt.topic honk/demo
Sample Message:
{
"activePower": 0.99,
"arrayInsulationResistance": 3000,
"busVoltage": 693.6,
"currentPhaseA": 1.5,
"currentPhaseB": 1.4,
"currentPhaseC": 1.4,
"gridFrequency": 49.97,
"inverterTemp": 34.7,
"status": "running",
"sunPower": 0.99,
"todayEnergy": 2.2,
"totalEnergy": 6584.9,
"totalRunningTime": 1948,
"voltagePhaseA": 232,
"voltagePhaseB": 235.2,
"voltagePhaseC": 236
}
Tested Sungrow inverters with WiNet-S dongle:
- SH10RT (by https://github.com/nItroTools/sungrow-go)
- SG15RT