Detect number of inverter strings (#999)

This commit is contained in:
andig 2021-05-11 15:05:40 +02:00 • committed by GitHub
parent d6624ce05c
commit d8d9368c35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -35,6 +35,7 @@ const (
taskEVSEWifi = "evsewifi"
taskGoE = "go-e"
taskInverter = "inverter"
taskStrings = "strings"
taskBattery = "battery"
taskMeter = "meter"
taskFronius = "fronius"
@ -90,6 +91,18 @@ func init() {
},
})
taskList.Add(tasks.Task{
ID: taskStrings,
Type: tasks.Modbus,
Depends: TaskSunspec,
Config: map[string]interface{}{
"ids": sunspecIDs,
"models": []int{160},
"point": "N",
"invalid": []int{0xFFFF},
},
})
taskList.Add(tasks.Task{
ID: taskBattery,
Type: tasks.Modbus,

View file

@ -150,6 +150,8 @@ func (h *ModbusHandler) testSunSpec(log *util.Logger, conn meters.Connection, de
val = int(res.Uint16())
case "enum16":
val = int(res.Enum16())
case "count":
val = int(res.Count())
default:
panic("invalid point type: " + typ)
}