Skip to content

Commit

Permalink
Sunspec: generalise battery control (#16750)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Oct 27, 2024
1 parent ae35824 commit 02d8f3c
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions templates/definition/meter/sunspec-battery-control.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,17 @@ render: |
{{- if eq .usage "battery" }}
type: custom
power:
source: calc
add:
- source: sunspec
{{- include "modbus" . | indent 4 }}
value: 160:3:DCW # mppt 3 (charge)
scale: -1
- source: sunspec
{{- include "modbus" . | indent 4 }}
value: 160:4:DCW # mppt 4 (discharge)
energy:
source: sunspec
{{- include "modbus" . | indent 2 }}
value: 160:4:DCWH # mppt 4 (discharge)
scale: 0.001
value: 802:W
soc:
source: sunspec
{{- include "modbus" . | indent 2 }}
value: 802:0:SoC
value: 802:SoC
limitsoc: # model 802
source: sunspec
{{- include "modbus" . | indent 2 }}
value: 802:0:SoCRsvMin
value: 802:SoCRsvMin
capacity: {{ .capacity }} # kWh
minsoc: {{ .minsoc }} # %
maxsoc: {{ .maxsoc }} # %
Expand Down

0 comments on commit 02d8f3c

Please sign in to comment.