evcc-io/templates/definition/meter/fronius-gen24.yaml

338 lines
8.3 KiB
YAML

template: fronius-gen24
products:
- brand: Fronius
description:
generic: Symo GEN24 Plus
- brand: Fronius
description:
generic: Primo GEN24 Plus
capabilities: ["battery-control", "curtail"]
requirements:
description:
de: |
Um die aktive Ladesteuerung zu nutzen darf der Energiekosten-Assistent (ECA) im Fronius Solar.web nicht aktiviert sein. (Fronius Solar.web->Einstellungen->Betriebsmodus->Eigenverbrauch)
en: |
To use active charge control, the Energy Cost Assistant (ECA) must not be activated in Fronius Solar.web. (Fronius Solar.web -> Settings -> Operating Mode -> Self-Consumption)
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: host
- name: port
default: 502
- name: id
default: 200
advanced: true
help:
en: "Meter address of primary or secondary meters. On the web interface of the inverter, only the address of the first meter (e.g., 200) can be set. Additional meters receive an ascending number (e.g., 201)."
de: "Zähleradresse von Primär- oder Sekundärzählern. Auf der Weboberfläche des Wechselrichters kann nur die Adresse des ersten Zählers (z.B. 200) eingestellt werden. Zusätzliche Zähler erhalten eine aufsteigende Nummer (z.B: 201)."
usages: ["grid"]
- name: integer
description:
generic: Integer
deprecated: true
- name: maxacpower
deprecated: true # read from nameplate
- preset: battery-params
- name: maxchargerate
render: |
type: custom
# sunspec model 20x (int+sf)/ 21x (float) meter
{{- if eq .usage "grid" }}
power:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:W
- 211:W
- 203:W
- 213:W
energy:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:TotWhImp
- 211:TotWhImp
- 203:TotWhImp
- 213:TotWhImp
scale: 0.001
returnenergy:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:TotWhExp
- 211:TotWhExp
- 203:TotWhExp
- 213:TotWhExp
scale: 0.001
currents:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:AphA
- 211:AphA
- 203:AphA
- 213:AphA
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:AphB
- 211:AphB
- 203:AphB
- 213:AphB
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:AphC
- 211:AphC
- 203:AphC
- 213:AphC
voltages:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:PhVphA
- 211:PhVphA
- 203:PhVphA
- 213:PhVphA
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:PhVphB
- 211:PhVphB
- 203:PhVphB
- 213:PhVphB
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:PhVphC
- 211:PhVphC
- 203:PhVphC
- 213:PhVphC
powers:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:WphA
- 211:WphA
- 203:WphA
- 213:WphA
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:WphB
- 211:WphB
- 203:WphB
- 213:WphB
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: {{ .id }}
value:
- 201:WphC
- 211:WphC
- 203:WphC
- 213:WphC
{{- end }}
{{- if eq .usage "pv" }}
power:
source: calc
add:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:1:DCW # mppt 1
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:2:DCW # mppt 2
energy:
source: calc
add:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:1:DCWH # mppt 1
scale: 0.001
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:2:DCWH # mppt 2
scale: 0.001
{{- include "sunspec-maxacpower-tcp" . }}
curtail:
source: sequence
set:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 123:WMaxLimPct
- source: switch
switch:
- case: 100 # Uncurtailed
set:
source: const
value: 0 # Limit disabled
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 123:WMaxLim_Ena
default:
source: const
value: 1 # Limit enabled
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 123:WMaxLim_Ena
curtailed: # the limit percentage only applies while the limit is enabled
source: go
in:
- name: ena
type: bool
config:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 123:WMaxLim_Ena
- name: limit
type: float
config:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 123:WMaxLimPct
script: |
percent := 100
if ena {
percent = int(limit)
}
percent
{{- end }}
{{- if eq .usage "battery" }}
power:
source: calc
add:
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:3:DCW # mppt 3 charge
scale: -1
- source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:4:DCW # mppt 4 discharge
energy:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:4:DCWH # mppt 4 (discharge)
scale: 0.001
returnenergy:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 160:3:DCWH # mppt 3 (charge)
scale: 0.001
soc:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:ChaState
batterymode: # model 124
source: switch
switch:
- case: 1 # normal
set:
source: sequence
set:
- source: const
value: 0
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 100 # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 2 # hold
set:
source: sequence
set:
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 3 # charge
set:
source: sequence
set:
- source: const
value: 1 # off
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:ChaGriSet
- source: const
value: 2
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: {{ if .maxchargerate }}-{{ .maxchargerate }}{{ end }} # %
set:
source: sunspec
uri: {{ joinHostPort .host .port }}
id: 1
value: 124:0:OutWRte
- case: 4 # holdcharge
set:
source: sequence
set:
- source: const
value: 1
set:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: 1
value: 124:0:StorCtl_Mod
- source: const
value: 0 # %
set:
source: sunspec
uri: {{ .host }}:{{ .port }}
id: 1
value: 124:0:InWRte
default:
source: error
error: ErrNotAvailable
{{- include "battery-params" . }}
{{- end }}