evcc-io/templates/definition/meter/sofarsolar-g3.yaml
premultiply 195e2e65cc
SofarSolar: Fix timeouts by delay (#7023)
* default modbus request delay: 1s

Increasing delay may help if timeouts occur.
2023-03-24 09:44:03 +01:00

150 lines
3.3 KiB
YAML

template: sofarsolar-g3
products:
- brand: SofarSolar
description:
generic: HYD 5…20K-3PH
- brand: SofarSolar
description:
generic: HYD 3…6K-EP
- brand: SofarSolar
description:
generic: SOFAR 80…136KTL
- brand: SofarSolar
description:
generic: SOFAR 5…24KTL-G3
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 9600
comset: 8N1
port: 502
id: 1
- name: delay
default: 1s
- name: capacity
advanced: true
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0488 # ActivePower_PCC_Total
type: holding
decode: int16
scale: -10
currents:
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0492 # Current_PCC_R
type: holding
decode: uint16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x049D # Current_PCC_S
type: holding
decode: uint16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x04A8 # Current_PCC_T
type: holding
decode: uint16
scale: 0.01
powers:
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0493 # ActivePower_PCC_R
type: holding
decode: int16
scale: -10
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x049E # ActivePower_PCC_S
type: holding
decode: int16
scale: -10
- source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x04A9 # ActivePower_PCC_T
type: holding
decode: int16
scale: -10
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x068E # Energy_Purchase_Total
type: holding
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "pv" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x05C4 # Power_PV_Total
type: holding
decode: uint16
scale: 100
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0686 # PV_Generation_Total
type: holding
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0606 # Power_Bat1
type: holding
decode: int16
scale: 0.01
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x0608 # SOC_Bat1
type: holding
decode: uint16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
delay: {{ .delay }}
register:
address: 0x069A # Bat_Discharge_Total
type: holding
decode: uint32
scale: 0.1
{{- if ne .capacity "" }}
capacity: {{ .capacity }} # kWh
{{- end }}
{{- end }}