Skip to content

Commit

Permalink
Solax: add battery control (evcc-io#11281)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Dec 28, 2023
1 parent 6d08844 commit 840f33a
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions templates/definition/meter/solax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ products:
- brand: Qcells
description:
generic: Q.HOME ESS HYB-G3
capabilities: ["battery-control"]
params:
- name: usage
choice: ["grid", "pv", "battery"]
Expand Down Expand Up @@ -75,6 +76,81 @@ render: |
address: 28 # 0x001C Battery Capacity
type: input
decode: uint16
batterymode:
source: switch
switch:
- case: 1 # normal
set:
source: sequence
set:
- source: const
value: 0 # self use mode
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x001F # SolarChargeUseMode
type: writesingle
decode: uint16
- source: const
value: 0 # Stop force charge & discharge
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x0020 # Manual mode
type: writesingle
decode: uint16
- case: 2 # hold
set:
source: sequence
set:
- source: const
value: 2 # backup mode
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x001F # SolarChargeUseMode
type: writesingle
decode: uint16
- source: const
value: 0 # Stop force charge & discharge
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x0020 # Manual mode
type: writesingle
decode: uint16
- case: 3 # charge
set:
source: sequence
set:
- source: const
value: 3 # manual mode
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x001F # SolarChargeUseMode
type: writesingle
decode: uint16
- source: const
value: 1 # Force charge
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 0x0020 # Manual mode
type: writesingle
decode: uint16
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
Expand Down

0 comments on commit 840f33a

Please sign in to comment.