SMA Hybrid Inverter: add grid usage (#25456)

This commit is contained in:
Frank Steiler 2025-12-03 19:18:02 +01:00 • committed by GitHub
parent 4fb94b9b4a
commit aeaa1807b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ requirements:
de: Bei der Nutzung der aktiven Speichersteuerung durch evcc darf die Funktion 'Prognosebasierten Laden' im SMA Portal nicht aktiv sein. Ansonsten kann es zu Konflikten bei der Steuerung des Speichers kommen.
params:
- name: usage
choice: ["pv", "battery"]
choice: ["pv", "battery", "grid"]
allinone: true
- name: modbus
choice: ["tcpip"]
@ -36,12 +36,21 @@ render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 30865 # SMA Modbus Profile: Metering.GridMs.TotWIn
type: input
decode: int32nan
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 }}
@ -54,24 +63,73 @@ render: |
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31435 # SMA Modbus Profile: Metering.GridMs.A.phsA
address: 31435 # SMA Modbus Profile: Metering.GridMs.A.phsA # Grid current phase L1, unsigned (independent of flow direction)
type: input
decode: int32nan
scale: 0.001
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31437 # SMA Modbus Profile: Metering.GridMs.A.phsB
address: 31437 # SMA Modbus Profile: Metering.GridMs.A.phsB # Grid current phase L2, unsigned (independent of flow direction)
type: input
decode: int32nan
scale: 0.001
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31439 # SMA Modbus Profile: Metering.GridMs.A.phsC
address: 31439 # SMA Modbus Profile: Metering.GridMs.A.phsC # Grid current phase L3, unsigned (independent of flow direction)
type: input
decode: int32nan
scale: 0.001
powers:
- source: calc
add:
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31265 # SMA Modbus Profile: Metering.GridMs.WIn.phsA # Power drawn from grid phase L1, unsigned, zero if no consumption
type: input
decode: uint32nan
scale: 1
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31259 # SMA Modbus Profile: Metering.GridMs.W.phsA # Power grid feeding L1, unsigned, zero if no feeding
type: input
decode: uint32nan
scale: -1
- source: calc
add:
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31267 # SMA Modbus Profile: Metering.GridMs.WIn.phsB # Power drawn from grid phase L2, unsigned, zero if no consumption
type: input
decode: uint32nan
scale: 1
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31261 # SMA Modbus Profile: Metering.GridMs.W.phsB # Power grid feeding L2, unsigned, zero if no feeding
type: input
decode: uint32nan
scale: -1
- source: calc
add:
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31269 # SMA Modbus Profile: Metering.GridMs.WIn.phsC # Power drawn from grid phase L3, unsigned, zero if no consumption
type: input
decode: uint32nan
scale: 1
- source: modbus
{{- include "modbus" . | indent 8 }}
register:
address: 31263 # SMA Modbus Profile: Metering.GridMs.W.phsC # Power grid feeding L3, unsigned, zero if no feeding
type: input
decode: uint32nan
scale: -1
{{- end }}
{{- if eq .usage "pv" }}
power: