Curtailment devices: new device class for feed-in limitation (BC) (#32416)
This commit is contained in:
parent
7c0ddf1828
commit
8661c66fc7
40 changed files with 819 additions and 149 deletions
25
templates/definition/curtailer/sma-homemanager.yaml
Normal file
25
templates/definition/curtailer/sma-homemanager.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
template: sma-homemanager
|
||||
products:
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Home Manager 2.0
|
||||
params:
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
id: 2
|
||||
help:
|
||||
en: ModbusTCP server needs to be enabled.
|
||||
de: Der ModbusTCP Server muss aktiviert sein.
|
||||
render: |
|
||||
type: custom
|
||||
curtail:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 40016 # Wirkleistungssollwert P, in % der maximalen Wirkleistung (PMAX) der PV-Anlage
|
||||
type: writesingle
|
||||
encoding: uint16
|
||||
curtailed:
|
||||
source: error
|
||||
error: ErrNotAvailable
|
||||
135
templates/definition/curtailer/solaredge.yaml
Normal file
135
templates/definition/curtailer/solaredge.yaml
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
template: solaredge
|
||||
products:
|
||||
- brand: SolarEdge
|
||||
description:
|
||||
de: Wechselrichter (Einspeisebegrenzung)
|
||||
en: Inverter (feed-in limitation)
|
||||
requirements:
|
||||
description:
|
||||
de: |
|
||||
Nur ein System kann und darf zeitgleich eine Modbus TCP-Verbindung zum Wechselrichter haben!
|
||||
Die Einspeisebegrenzung begrenzt die Netzeinspeisung am Netzanschlusspunkt auf den geforderten Prozentsatz der installierten Generatorleistung.
|
||||
en: |
|
||||
Only one system can and may have a Modbus TCP connection to the inverter at the same time!
|
||||
Feed-in limitation limits the export power at the grid connection point to the requested percentage of the installed generator power.
|
||||
params:
|
||||
- name: modbus
|
||||
choice: ["tcpip", "rs485"]
|
||||
id: 1
|
||||
port: 1502
|
||||
- name: productionnominalmax
|
||||
type: float
|
||||
unit: Wp
|
||||
required: true
|
||||
description:
|
||||
en: Installed generator power
|
||||
de: Installierte Generatorleistung
|
||||
help:
|
||||
en: Rated generator/module power of the installation (reference value according to § 9 EEG).
|
||||
de: Gesamtnennleistung bzw. Modul- oder Generatorleistung der Anlage (Bezugsgröße nach § 9 EEG).
|
||||
render: |
|
||||
type: custom
|
||||
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 .productionnominalmax 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 .productionnominalmax 1 }}
|
||||
}
|
||||
p := int(percent + 0.5)
|
||||
if p < 0 {
|
||||
p = 0
|
||||
}
|
||||
if p > 100 {
|
||||
p = 100
|
||||
}
|
||||
p
|
||||
|
|
@ -2,7 +2,7 @@ package definition
|
|||
|
||||
import "embed"
|
||||
|
||||
//go:embed charger/*.yaml meter/*.yaml vehicle/*.yaml tariff/*.yaml messenger/*.yaml circuit/*.yaml hems/*.yaml
|
||||
//go:embed charger/*.yaml meter/*.yaml vehicle/*.yaml tariff/*.yaml messenger/*.yaml circuit/*.yaml hems/*.yaml curtailer/*.yaml
|
||||
var YamlTemplates embed.FS
|
||||
|
||||
//go:embed */*.tpl
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ render: |
|
|||
power:
|
||||
source: const
|
||||
value: {{ .power }}
|
||||
{{- if .curtailable }}
|
||||
{{- if eq .curtailable "true" }}
|
||||
curtail:
|
||||
source: js
|
||||
vm: shared
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
template: sma-homemanager-modbus
|
||||
products:
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Home Manager 2.0 Modbus
|
||||
capabilities: ["curtail"]
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["grid"]
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
id: 2
|
||||
help:
|
||||
en: ModbusTCP server needs to be enabled.
|
||||
de: Der ModbusTCP Server muss aktiviert sein.
|
||||
render: |
|
||||
type: custom
|
||||
power:
|
||||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 6 }}
|
||||
register:
|
||||
address: 30865 # SMA Modbus Profile: Metering.GridMs.TotWIn
|
||||
type: input
|
||||
decode: int32nan
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 6 }}
|
||||
register:
|
||||
address: 30867 # SMA Modbus Profile: Metering.GridMs.TotWOut
|
||||
type: input
|
||||
decode: int32nan
|
||||
scale: -1
|
||||
energy:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30581 # SMA Modbus Profile: Metering.GridMs.TotWhIn
|
||||
type: holding
|
||||
decode: int32nan
|
||||
scale: 0.001
|
||||
returnenergy:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30583 # SMA Modbus Profile: Metering.GridMs.TotWhOut
|
||||
type: holding
|
||||
decode: int32nan
|
||||
scale: 0.001
|
||||
curtail:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 40016 # Wirkleistungssollwert P, in % der maximalen Wirkleistung (PMAX) der PV-Anlage.
|
||||
type: writesingle
|
||||
decode: uint16
|
||||
curtailed:
|
||||
source: error
|
||||
error: ErrNotAvailable
|
||||
Loading…
Add table
Add a link
Reference in a new issue