Improve SunSpec config (#4093)
This commit is contained in:
parent
3a56fb3a0d
commit
7047a11db0
7 changed files with 28 additions and 20 deletions
|
|
@ -24,9 +24,9 @@ render: |
|
|||
# reference: https://github.com/volkszaehler/mbmd/blob/master/meters/sunspec/models.go
|
||||
{{- if eq .usage "grid" }}
|
||||
type: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 200
|
||||
model: sunspec
|
||||
{{- if eq .integer "true" }}
|
||||
# sunspec model 203 (int+sf) meter
|
||||
power: 203:W
|
||||
|
|
@ -49,14 +49,14 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
model: sunspec
|
||||
value: 160:1:DCW # mppt 1
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
model: sunspec
|
||||
value: 160:2:DCW # mppt 2
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
|
|
@ -65,20 +65,20 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
model: sunspec
|
||||
value: 160:3:DCW # mppt 3 charge
|
||||
scale: -1
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
model: sunspec
|
||||
value: 160:4:DCW # mppt 4 discharge
|
||||
soc:
|
||||
source: modbus
|
||||
model: sunspec
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
model: sunspec
|
||||
value: ChargeState
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ params:
|
|||
id: 71
|
||||
render: |
|
||||
type: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . }}
|
||||
model: sunspec
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ render: |
|
|||
source: calc
|
||||
add: # The add plugin sums up both string values
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
value: 160:1:DCW # string 1
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
value: 160:2:DCW # string 2
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ render: |
|
|||
power:
|
||||
{{- if eq .usage "grid" }}
|
||||
source: modbus
|
||||
model: sunspec
|
||||
timeout: {{ .timeout }}
|
||||
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
|
||||
id: 1
|
||||
subdevice: 1 # Metering device
|
||||
timeout: {{ .timeout }}
|
||||
model: sunspec
|
||||
value: 203:W
|
||||
scale: -1
|
||||
{{- end }}
|
||||
|
|
@ -36,15 +36,15 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
timeout: {{ .timeout }}
|
||||
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
|
||||
id: 1
|
||||
timeout: {{ .timeout }}
|
||||
model: sunspec
|
||||
value: 103:DCW
|
||||
- source: modbus
|
||||
timeout: {{ .timeout }}
|
||||
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
|
||||
id: 1
|
||||
timeout: {{ .timeout }}
|
||||
register:
|
||||
address: 62836 # Battery 1 Instantaneous Power
|
||||
type: holding
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@ render: |
|
|||
type: custom
|
||||
power:
|
||||
source: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
timeout: {{ .timeout }}
|
||||
{{- if eq .usage "grid" }}
|
||||
subdevice: 1
|
||||
model: sunspec
|
||||
value: 203:W # sunspec 3-phase meter power reading
|
||||
scale: -1
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
model: sunspec
|
||||
value: Power
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
value: 160:1:DCW # mppt 1
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
value: 160:2:DCW # mppt 2
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
|
|
@ -59,16 +59,17 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
value: 160:3:DCW # mppt 3 charge
|
||||
scale: -1
|
||||
- source: modbus
|
||||
model: sunspec
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
model: sunspec
|
||||
value: 160:4:DCW # mppt 4 discharge
|
||||
soc:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
model: sunspec
|
||||
value: ChargeState
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ render: |
|
|||
type: modbus
|
||||
{{- include "modbus" . }}
|
||||
{{- if eq .usage "grid" }}
|
||||
model: sunspec
|
||||
{{- if eq .integer "true" }}
|
||||
# sunspec model 203 (int+sf) meter
|
||||
power: 203:W
|
||||
|
|
@ -37,4 +38,7 @@ render: |
|
|||
- 213:AphB
|
||||
- 213:AphC
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
model: sunspec
|
||||
power: Power
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue