Prometheus exporter for metrics scraped from a Sungrow solar inverter (over modbus)
Find a file
2023-01-22 14:09:39 +11:00
modbus delete some unused files 2021-01-11 14:14:45 +11:00
vendor go 1.19 && go get -u && go mod tidy && go mod vendor 2023-01-06 15:26:59 +11:00
.gitignore ignore ds_store 2021-01-24 15:50:49 +11:00
Dockerfile use smaller container as base 2021-01-05 20:47:41 +11:00
go.mod Move module path 2023-01-06 16:53:25 +11:00
go.sum go 1.19 && go get -u && go mod tidy && go mod vendor 2023-01-06 15:26:59 +11:00
LICENSE Add LICENSE, fix minor lints 2023-01-07 16:41:15 +11:00
main.go off by one? 2023-01-22 14:09:39 +11:00
README.md Update README harder 2023-01-07 17:15:02 +11:00
sungrow.go Add LICENSE, fix minor lints 2023-01-07 16:41:15 +11:00
sungrow_map.go Keep skipped values, split reads more 2023-01-22 13:51:05 +11:00
tariff.go Add LICENSE, fix minor lints 2023-01-07 16:41:15 +11:00

sungrow

Go Reference

A Prometheus exporter that scrapes a Sungrow inverter for information about solar generation, usage, and other fun data. It includes a (minor) fork of github.com/goburrow/modbus (to enable working with Sungrow's "encryption").

This is part of my own custom solar monitoring setup, so has a few quirks suited to me. In particular, it exports the necessary tariff values to compute import cost and export value - if you are using Aurorar Tariff 93 in Tasmania. It defaults to connecting to the IP address of the inverter on my home network.

⚠️ There is ABSOLUTELY NO WARRANTY provided with this code. If for whatever reason it blows up your inverter, THAT'S ON YOU.

Building

Docker is recommended:

$ docker build -t sungrow .