Add SunSpec meter (#19624)

This commit is contained in:
benesolar 2025-04-21 11:48:16 +02:00 • committed by GitHub
parent 4afd2d238b
commit 20e37117cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,122 @@
template: sunspec-meter
products:
- description:
de: SunSpec Zähler
en: SunSpec Meter
- brand: Fronius
description:
de: Smartmeter (über Wechselrichter)
en: Smartmeter (via Inverter)
params:
- name: usage
choice: ["grid", "pv"]
- name: modbus
choice: ["tcpip"]
render: |
type: custom
# sunspec model 201 or 203 (int+sf)/ 211 or 213 (float) meter
{{- if eq .usage "grid" }}
power:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:W
- 211:W
- 203:W
- 213:W
energy:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:TotWhImp
- 211:TotWhImp
- 203:TotWhImp
- 213:TotWhImp
scale: 0.001
currents:
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:AphA
- 211:AphA
- 203:AphA
- 213:AphA
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:AphB
- 213:AphB
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:AphC
- 213:AphC
voltages:
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:PhVphA
- 211:PhVphA
- 203:PhVphA
- 213:PhVphA
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:PhVphB
- 213:PhVphB
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:PhVphC
- 213:PhVphC
powers:
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:WphA
- 211:WphA
- 203:WphA
- 213:WphA
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:WphB
- 213:WphB
- source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 203:WphC
- 213:WphC
{{- end }}
{{- if eq .usage "pv" }}
power:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:W
- 211:W
- 203:W
- 213:W
energy:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: {{ .id }}
value:
- 201:TotWhExp
- 211:TotWhExp
- 203:TotWhExp
- 213:TotWhExp
scale: 0.001
{{- end }}