SMA Modbus: split templates (#11909)
This commit is contained in:
parent
9517277157
commit
2d160525dd
4 changed files with 203 additions and 65 deletions
|
|
@ -83,7 +83,7 @@ render: |
|
|||
decode: uint32nan
|
||||
batterymode:
|
||||
source: watchdog
|
||||
timeout: {{ .watchdog }} # re-write at timeout/2
|
||||
timeout: {{ .watchdog }}
|
||||
reset: 1 # reset watchdog on normal
|
||||
set:
|
||||
source: switch
|
||||
|
|
|
|||
|
|
@ -2,14 +2,10 @@ template: sma-inverter-modbus
|
|||
products:
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Island (Modbus)
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Boy Storage (Modbus)
|
||||
capabilities: ["battery-control"]
|
||||
generic: Wechselrichter (Modbus)
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["battery"]
|
||||
choice: ["pv"]
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
|
|
@ -17,12 +13,6 @@ params:
|
|||
help:
|
||||
en: The Modbus TCP-Server needs to be enabled on this inverter
|
||||
de: Der Modbus TCP-Server muss an diesem Wechselrichter aktiviert sein
|
||||
- name: capacity
|
||||
advanced: true
|
||||
- name: watchdog
|
||||
type: duration
|
||||
default: 60s
|
||||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
power:
|
||||
|
|
@ -40,55 +30,3 @@ render: |
|
|||
type: holding
|
||||
decode: uint64nan
|
||||
scale: 0.001
|
||||
{{- if eq .usage "battery" }}
|
||||
soc:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30845 # SMA Modbus Profile: Bat.ChaStt
|
||||
type: holding
|
||||
decode: uint32nan
|
||||
batterymode:
|
||||
source: watchdog
|
||||
timeout: {{ .watchdog }} # re-write at timeout/2
|
||||
reset: 1 # reset watchdog on normal
|
||||
set:
|
||||
source: switch
|
||||
switch:
|
||||
- case: 1 # normal
|
||||
set:
|
||||
source: const
|
||||
value: 10000 # Maximale Wirkleistung
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- case: 2 # hold
|
||||
set:
|
||||
source: const
|
||||
value: 0 # Maximale Wirkleistung
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- case: 3 # charge
|
||||
set:
|
||||
source: const
|
||||
value: -10000 # Maximale Wirkleistung
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
{{- if .capacity }}
|
||||
capacity: {{ .capacity }} # kWh
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
89
templates/definition/meter/sma-sbs-modbus.yaml
Normal file
89
templates/definition/meter/sma-sbs-modbus.yaml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
template: sma-sbs-modbus
|
||||
products:
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Boy Storage (Modbus)
|
||||
capabilities: ["battery-control"]
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["battery"]
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
id: 3
|
||||
help:
|
||||
en: The Modbus TCP-Server needs to be enabled on this inverter
|
||||
de: Der Modbus TCP-Server muss an diesem Wechselrichter aktiviert sein
|
||||
- name: capacity
|
||||
advanced: true
|
||||
- name: watchdog
|
||||
type: duration
|
||||
default: 60s
|
||||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
power:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30775 # SMA Modbus Profile: GridMs.TotW
|
||||
type: input
|
||||
decode: int32nan
|
||||
energy:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30513 # SMA Modbus Profile: Metering.TotWhOut
|
||||
type: holding
|
||||
decode: uint64nan
|
||||
scale: 0.001
|
||||
soc:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30845 # SMA Modbus Profile: Bat.ChaStt
|
||||
type: holding
|
||||
decode: uint32nan
|
||||
batterymode:
|
||||
source: watchdog
|
||||
timeout: {{ .watchdog }}
|
||||
reset: 1 # reset watchdog on normal
|
||||
set:
|
||||
source: switch
|
||||
switch:
|
||||
- case: 1 # normal
|
||||
set:
|
||||
source: const
|
||||
value: 10000 # Maximale Wirkleistung 100.00%
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- case: 2 # hold
|
||||
set:
|
||||
source: const
|
||||
value: 0 # Maximale Wirkleistung 0.00%
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- case: 3 # charge
|
||||
set:
|
||||
source: const
|
||||
value: -10000 # Maximale Wirkleistung -100.00%
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 44039 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSptMaxNom
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
{{- if .capacity }}
|
||||
capacity: {{ .capacity }} # kWh
|
||||
{{- end }}
|
||||
111
templates/definition/meter/sma-si-modbus.yaml
Normal file
111
templates/definition/meter/sma-si-modbus.yaml
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
template: sma-si-modbus
|
||||
products:
|
||||
- brand: SMA
|
||||
description:
|
||||
generic: Sunny Island (Modbus)
|
||||
capabilities: ["battery-control"]
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["battery"]
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
id: 3
|
||||
help:
|
||||
en: The Modbus TCP-Server needs to be enabled on this inverter
|
||||
de: Der Modbus TCP-Server muss an diesem Wechselrichter aktiviert sein
|
||||
- name: capacity
|
||||
advanced: true
|
||||
- name: watchdog
|
||||
type: duration
|
||||
default: 60s
|
||||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
power:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30775 # SMA Modbus Profile: GridMs.TotW
|
||||
type: input
|
||||
decode: int32nan
|
||||
energy:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30513 # SMA Modbus Profile: Metering.TotWhOut
|
||||
type: holding
|
||||
decode: uint64nan
|
||||
scale: 0.001
|
||||
soc:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 30845 # SMA Modbus Profile: Bat.ChaStt
|
||||
type: holding
|
||||
decode: uint32nan
|
||||
batterymode:
|
||||
source: watchdog
|
||||
timeout: {{ .watchdog }}
|
||||
reset: 1 # reset watchdog on normal
|
||||
set:
|
||||
source: switch
|
||||
switch:
|
||||
- case: 1 # normal
|
||||
set:
|
||||
source: const
|
||||
value: 803 # inaktiv (Ina)
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 40151 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WCtlComAct
|
||||
type: writemultiple
|
||||
decode: uint32
|
||||
- case: 2 # hold
|
||||
set:
|
||||
source: sequence
|
||||
set:
|
||||
- source: const
|
||||
value: 0 # Wirkleistungsvorgabe
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 12 }}
|
||||
register:
|
||||
address: 40149 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSpt
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- source: const
|
||||
value: 802 # aktiv (Act)
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 12 }}
|
||||
register:
|
||||
address: 40151 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WCtlComAct
|
||||
type: writemultiple
|
||||
decode: uint32
|
||||
- case: 3 # charge
|
||||
set:
|
||||
source: sequence
|
||||
set:
|
||||
- source: const
|
||||
value: -2147483648 # Wirkleistungsvorgabe
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 12 }}
|
||||
register:
|
||||
address: 40149 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WSpt
|
||||
type: writemultiple
|
||||
decode: int32
|
||||
- source: const
|
||||
value: 802 # aktiv (Act)
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 12 }}
|
||||
register:
|
||||
address: 40151 # SMA Modbus Profile: Inverter.WModCfg.WCtlComCfg.WCtlComAct
|
||||
type: writemultiple
|
||||
decode: uint32
|
||||
{{- if .capacity }}
|
||||
capacity: {{ .capacity }} # kWh
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue