Skip to content

Commit

Permalink
Deye Hybrid 3p: add battery control (evcc-io#12415)
Browse files Browse the repository at this point in the history
  • Loading branch information
deadrabbit87 authored Feb 24, 2024
1 parent 93a1faf commit 18a0e93
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions templates/definition/meter/deye-hybrid-3p.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ products:
- brand: Sunsynk
description:
generic: 3p hybrid inverter
capabilities: ["battery-control"]
params:
- name: usage
choice: ["grid", "pv", "battery"]
Expand All @@ -17,6 +18,12 @@ params:
id: 1
- name: capacity
advanced: true
- name: minsoc
type: number
advanced: true
- name: maxsoc
type: number
advanced: true
render: |
type: custom
{{- if eq .usage "grid" }}
Expand Down Expand Up @@ -110,6 +117,131 @@ render: |
address: 588 # "battery capacity"
type: holding
decode: uint16
batterymode:
source: switch
switch:
- case: 1 # normal
set:
source: sequence
set:
- source: const
value: {{ .minsoc }}
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 166
type: writemultiple
decode: int32s
- source: const
value: 0
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 148
type: writemultiple
decode: int32s
- source: const
value: 2355
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 149
type: writemultiple
decode: int32s
- source: const
value: 0
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 172
type: writemultiple
decode: int32s
- case: 2 # hold
set:
source: sequence
set:
- source: const
value: {{ .maxsoc }}
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 166
type: writemultiple
decode: int32s
- source: const
value: 0
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 148 # soc time of use 1
type: writemultiple
decode: int32s
- source: const
value: 2355
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 149 # soc time of use 1
type: writemultiple
decode: int32s
- source: const
value: 0
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 172
type: writemultiple
decode: int32s
- case: 3 # charge
set:
source: sequence
set:
- source: const
value: {{ .maxsoc }}
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 166
type: writemultiple
decode: int32s
- source: const
value: 0
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 148 # soc time of use 1
type: writemultiple
decode: int32s
- source: const
value: 2355
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 149 # soc time of use 1
type: writemultiple
decode: int32s
- source: const
value: 1
set:
source: modbus
{{- include "modbus" . | indent 10 }}
register:
address: 172
type: writemultiple
decode: int32s
minsoc: {{.minsoc}}
maxsoc: {{.maxsoc}}
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
Expand Down

0 comments on commit 18a0e93

Please sign in to comment.