Prometheus exporter for metrics scraped from a Sungrow solar inverter (over modbus)
Find a file
2023-05-19 17:54:00 +10:00
modbus go fmt ./... 2023-05-19 17:50:26 +10:00
vendor gofmt vendored files 2023-05-19 17:54:00 +10: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 Shuffle and loop 2023-01-23 09:39:28 +11:00
README.md Add Buildkite badge 2023-05-19 17:51:30 +10: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

Build status 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 .