Prometheus exporter for metrics scraped from a Sungrow solar inverter (over modbus)
Go to file
Josh Deprez 83ed014616
Fix format
2024-03-22 21:35:05 +11:00
modbus go fmt ./... 2023-05-19 17:50:26 +10:00
.gitignore ignore ds_store 2021-01-24 15:50:49 +11:00
Dockerfile remove vendor 2024-03-22 21:14:02 +11:00
LICENSE Add LICENSE, fix minor lints 2023-01-07 16:41:15 +11:00
README.md Add Buildkite badge 2023-05-19 17:51:30 +10:00
go.mod go 1.22; go get -u; go mod tidy 2024-03-22 21:11:49 +11:00
go.sum go 1.22; go get -u; go mod tidy 2024-03-22 21:11:49 +11:00
main.go Shuffle and loop 2023-01-23 09:39:28 +11:00
sungrow Update tariffs and vendor 2023-07-14 10:16: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 Fix format 2024-03-22 21:35:05 +11:00

README.md

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 .