Skip to content

Commit

Permalink
Deye: add single phase inverters (evcc-io#10692)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored Nov 11, 2023
1 parent 993aa06 commit 2fd77db
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
template: deye-hybrid
template: deye-hybrid-3p
covers: ["deye-hybrid"]
products:
- brand: Deye
description:
generic: SUN-(5/6/8/10/12)K-SG04LP3-EU series hybrid inverter
generic: 3p hybrid inverter
- brand: Sunsynk
description:
generic: SYNK-(8/10/12)K-SG04LP3 *untested*
generic: 3p hybrid inverter
params:
- name: usage
choice: ["grid", "pv", "battery"]
Expand All @@ -22,36 +23,36 @@ render: |
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 625 # Grid side total power
type: holding
decode: int16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 522 # "Total_GridBuy_Power Wh"
type: holding
decode: uint32
scale: 0.1
currents:
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 613 # "Out-of-grid - current A"
type: holding
decode: int16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 614 # "Out-of-grid - current B"
type: holding
decode: int16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 615 # "Out-of-grid - current C"
type: holding
decode: int16
Expand All @@ -63,32 +64,32 @@ render: |
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 672 # "PV1 input power"
type: holding
decode: int16
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 673 # "PV2 input power"
type: holding
decode: int16
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 674 # "PV3 input power"
type: holding
decode: int16
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
register:
address: 675 # "PV4 input power"
type: holding
decode: int16
decode: uint16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 534 # "Total_PV_Power_Wh"
type: holding
decode: uint32
Expand All @@ -98,24 +99,24 @@ render: |
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 590 # "Battery output power"
type: holding
decode: int16
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 588 # "battery capacity"
type: holding
decode: int16
decode: uint16
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
register:
address: 518 # "Total discharge of the battery (Wh)"
type: holding
decode: uint32
Expand Down
42 changes: 42 additions & 0 deletions templates/definition/meter/deye-mi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
template: deye-mi
products:
- brand: Deye
description:
generic: Micro inverter
- brand: Bosswerk
description:
generic: Micro inverter
- brand: Anker
description:
generic: Micro inverter
- brand: Sunsynk
description:
generic: Micro inverter
params:
- name: usage
choice: ["pv"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 9600
id: 1
advanced: true
render: |
type: custom
{{- if eq .usage "pv" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 86 # "Output active power"
type: holding
decode: uint32
scale: 0.1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 63 # "Total_Active_PowerWh"
type: holding
decode: uint32
scale: 0.1
{{- end }}
109 changes: 109 additions & 0 deletions templates/definition/meter/deye-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
template: deye-storage
products:
- brand: Deye
description:
generic: Storage (hybrid) inverter
- brand: Sunsynk
description:
generic: Storage (hybrid) inverter
params:
- name: usage
choice: ["pv", "battery", "grid"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 9600
id: 1
- name: capacity
advanced: true
render: |
type: custom
{{- if eq .usage "pv" }}
power:
source: calc
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 186 # "PV1 input power"
type: holding
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 187 # "PV2 input power"
type: holding
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 188 # "PV3 input power"
type: holding
decode: uint16
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 189 # "PV4 input power"
type: holding
decode: uint16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 96 # "historyPV PowerWh"
type: holding
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 190 # "Battery output power"
type: holding
decode: int16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 74 # "Battery cumulative discharge"
type: holding
decode: uint32
scale: 0.1
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 184 # "battery capacity"
type: holding
decode: uint16
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
{{- end }}
{{- if eq .usage "grid" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 169 # "Total grid power"
type: holding
decode: int16
energy:
source: calc
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 78 # "Total_GridBuy_PowerWh_low"
type: holding
decode: uint16
scale: 0.1
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 80 # "Total_GridBuy_PowerWh"
type: holding
decode: uint16
scale: 6553.6
{{- end }}
35 changes: 35 additions & 0 deletions templates/definition/meter/deye-string.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
template: deye-string
products:
- brand: Deye
description:
generic: String inverter
- brand: Sunsynk
description:
generic: String inverter
params:
- name: usage
choice: ["pv"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 9600
id: 1
render: |
type: custom
{{- if eq .usage "pv" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 86 # "Output active power"
type: holding
decode: uint32
scale: 0.1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 63 # "Total_Active_PowerWh"
type: holding
decode: uint32
scale: 0.1
{{- end }}
1 change: 1 addition & 0 deletions templates/evcc.io/brands.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"Acrel",
"Ads-tec",
"Alpha ESS",
"Anker",
"AVM",
"Bosswerk",
"Deye",
Expand Down

0 comments on commit 2fd77db

Please sign in to comment.