Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sungrow-Hybrid: fix charge #12215

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
fix charge
  • Loading branch information
premultiply committed Feb 12, 2024
commit 5e0133e1263de149f411b2780d417e01b5b76ffe
44 changes: 25 additions & 19 deletions templates/definition/meter/sungrow-hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,55 +107,45 @@ render: |
source: sequence
set:
- source: const
value: 0 # self consumption
value: 0 # Self-consumption mode (Default)
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13049 # EMS mode
type: writesingle
decode: uint16
- source: const
value: 0xCC # stop
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13050 # Forced mode
address: 13049 # EMS mode selection
type: writesingle
decode: uint16
- case: 2 # hold
set:
source: sequence
set:
- source: const
value: 2 # forced mode
value: 2 # Forced mode (charge/discharge/stop)
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13049 # EMS mode
address: 13049 # EMS mode selection
type: writesingle
decode: uint16
- source: const
value: 0xCC
value: 0xCC # Stop (Default)
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13050 # Forced mode
address: 13050 # Charge/discharge command
type: writesingle
decode: uint16
- case: 3 # charge
set:
source: sequence
set:
- source: const
value: 2 # forced mode
value: 2 # Forced mode (charge/discharge/stop)
set:
source: modbus
{{- include "modbus" . | indent 10 }}
Expand All @@ -165,13 +155,29 @@ render: |
type: writesingle
decode: uint16
- source: const
value: 0xAA
value: 0xAA # Charge
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13050 # Charge/discharge command
type: writesingle
decode: uint16
- source: modbus
{{- include "modbus" . | indent 8 }}
timeout: {{ .timeout }}
register:
address: 5627 # BDC rated power
type: input
decode: uint16
scale: 100
set:
source: modbus
{{- include "modbus" . | indent 10 }}
timeout: {{ .timeout }}
register:
address: 13050 # Forced mode
address: 13051 # Charge/discharge power
type: writesingle
decode: uint16
{{- if .capacity }}
Expand Down