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

Update sofarsolar-g3.yaml for charging battery #16979

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions templates/definition/meter/sofarsolar-g3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ render: |
address: 0x1187
type: writemultiple
decode: bytes
- case: 3 # charge (not implemented -> normal)
- case: 3 # charge
set:
source: const
value: 0 # self-use
source: sequence
set:
source: sequence
- source: const
value: 3 # passive
set:
- source: ignore
source: ignore
error: "modbus: response data size '18' does not match count '4'"
set:
source: modbus
Expand All @@ -208,7 +208,20 @@ render: |
address: 0x1110
type: writemultiple
decode: int16
- source: error
error: ErrNotAvailable
- source: convert
convert: int2bytes
set:
source: const
value: '0x00000000_7FFFFFFF_7FFFFFFF'
set:
source: ignore
error: "modbus: response data size '18' does not match count '4'"
set:
source: modbus
{{- include "modbus" . | indent 14 }}
register:
address: 0x1187
type: writemultiple
decode: bytes
capacity: {{ .capacity }} # kWh
{{- end }}