Detect number of inverter strings (#999)
This commit is contained in:
parent
d6624ce05c
commit
d8d9368c35
2 changed files with 15 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue