Solaredge: add curtailment (#31982)
This commit is contained in:
parent
b66d6532ae
commit
caf366bd34
2 changed files with 145 additions and 0 deletions
|
|
@ -9,9 +9,11 @@ requirements:
|
|||
de: |
|
||||
Nur ein System kann und darf zeitgleich eine Modbus TCP-Verbindung zum Wechselrichter haben!
|
||||
Für die optionale Batteriesteuerung muss StorageConf_CtrlMode (0xE004) auf 4 "Remote" stehen.
|
||||
Curtailment begrenzt die Einspeiseleistung auf den gewünschten Prozentsatz der maximalen AC-Leistung. Der Wechselrichter begrenzt automatisch die PV-Leistung, um dies zu erreichen.
|
||||
en: |
|
||||
Only one system can and may have a Modbus TCP connection to the inverter at the same time!
|
||||
For optional battery control, StorageConf_CtrlMode (0xE004) must be set to 4 "Remote".
|
||||
Curtailment will limit the export power to the desired percentage of the maximum AC power. The inverter will automatically limit the PV power to achieve this.
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
|
|
@ -20,6 +22,7 @@ params:
|
|||
id: 1
|
||||
port: 1502
|
||||
- name: maxacpower
|
||||
required: true
|
||||
- preset: battery-params
|
||||
- name: maxdischargepower
|
||||
default: 5000
|
||||
|
|
@ -107,6 +110,110 @@ render: |
|
|||
type: holding
|
||||
decode: float32nans
|
||||
maxacpower: {{ .maxacpower }} # W
|
||||
curtail:
|
||||
source: sequence
|
||||
set:
|
||||
- source: switch
|
||||
switch:
|
||||
- case: 100
|
||||
set:
|
||||
source: go
|
||||
in:
|
||||
- name: mode
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 18 }}
|
||||
register:
|
||||
address: 57344 # Export Control Mode
|
||||
type: holding
|
||||
decode: uint16
|
||||
out:
|
||||
- name: out
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 18 }}
|
||||
register:
|
||||
address: 57344 # Export Control Mode
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
script: |
|
||||
mode &^ 1 // clear bit 0 (export limitation), preserve other bits (e.g. indirect production limitation)
|
||||
default:
|
||||
source: go
|
||||
in:
|
||||
- name: mode
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 14 }}
|
||||
register:
|
||||
address: 57344 # Export Control Mode
|
||||
type: holding
|
||||
decode: uint16
|
||||
out:
|
||||
- name: out
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 14 }}
|
||||
register:
|
||||
address: 57344 # Export Control Mode
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
script: |
|
||||
mode | 1 // set bit 0 (export limitation via meter), preserve other bits
|
||||
- source: const
|
||||
value: 0 # Total
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 57345 # Export Control Limit Mode
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 6 }}
|
||||
register:
|
||||
address: 57346 # Export Control Site Limit
|
||||
type: writemultiple
|
||||
encoding: float32s
|
||||
scale: {{ divf (maxf .maxacpower 1) 100 }} # % to W
|
||||
curtailed:
|
||||
source: go
|
||||
in:
|
||||
- name: mode
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 57344 # Export Control Mode
|
||||
type: holding
|
||||
decode: uint16
|
||||
- name: limit
|
||||
type: float
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 57346 # Export Control Site Limit
|
||||
type: holding
|
||||
decode: float32s
|
||||
script: |
|
||||
percent := 100.0
|
||||
if mode&1 != 0 {
|
||||
percent = limit * 100 / {{ maxf .maxacpower 1 }}
|
||||
}
|
||||
p := int(percent + 0.5)
|
||||
if p < 0 {
|
||||
p = 0
|
||||
}
|
||||
if p > 100 {
|
||||
p = 100
|
||||
}
|
||||
p
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
power:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ products:
|
|||
description:
|
||||
de: Wechselrichter
|
||||
en: Inverter
|
||||
capabilities:
|
||||
- curtail
|
||||
requirements:
|
||||
description:
|
||||
de: Nur ein System kann und darf auf den Wechselrichter zugreifen!
|
||||
|
|
@ -111,4 +113,40 @@ render: |
|
|||
value:
|
||||
- 101:AphC
|
||||
- 103:AphC
|
||||
curtail:
|
||||
source: sequence
|
||||
set:
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 6 }}
|
||||
register:
|
||||
address: 61441 # Active Power Limit (%)
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
- source: const
|
||||
value: 1
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 61696 # Commit Power Control Settings
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
curtailed:
|
||||
source: go
|
||||
in:
|
||||
- name: limit
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 61441 # Active Power Limit (%)
|
||||
type: holding
|
||||
decode: uint16
|
||||
script: |
|
||||
percent := int(limit)
|
||||
if percent > 100 {
|
||||
percent = 100
|
||||
}
|
||||
percent
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue