add more registers

This commit is contained in:
Josh Deprez 2021-01-25 16:05:57 +11:00
parent 9ace279f5e
commit ff0dc5a5e1
2 changed files with 5 additions and 1 deletions

View file

@ -124,7 +124,7 @@ func readRegs(client modbus.Client, start, qty uint16) {
func scrape(client modbus.Client) {
start := time.Now()
scrapeStart.SetToCurrentTime()
readRegs(client, 5000, 50)
readRegs(client, 5000, 100)
readRegs(client, 5100, 50)
scrapeEnd.SetToCurrentTime()
scrapeDuration.Set(time.Since(start).Seconds())

View file

@ -44,6 +44,10 @@ var sungrowInputRegs = map[uint16]*register{
5036: {"frequency", u16, 0.1, "Hz"},
5049: {"nominal_reactive_power", s16, 0.1, "kVA"},
5083: {"meter_power", s32, 1, "W"},
5085: {"meter_a_phase_power", s32, 1, "W"},
5097: {"daily_import_energy", u32, 0.1, "kWh"},
5113: {"daily_running_time", u16, 1, "m"},
5144: {"total_power_yield_2", u32, 0.1, "kWh"},
5148: {"frequency_2", frequency2, 0.01, "Hz"},