Atmoce: remove battery curtailment (#32803)
This commit is contained in:
parent
d3d8950096
commit
0ac212bcb1
1 changed files with 0 additions and 59 deletions
|
|
@ -413,65 +413,6 @@ render: |
|
|||
decode: uint32
|
||||
{{- end }}
|
||||
{{- if not ( eq .firmware "<01.01.00.28.15" ) }}
|
||||
curtail:
|
||||
source: switch
|
||||
switch:
|
||||
- case: 100 # No curtailment
|
||||
set:
|
||||
source: const
|
||||
value: 0xFFFFFFFF # No limit
|
||||
set:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 60324 # Grid Maximum Export Power (kW * 1000)
|
||||
type: writemultiple
|
||||
encoding: uint32
|
||||
default:
|
||||
source: go
|
||||
in:
|
||||
- name: maxdischargepower
|
||||
type: int
|
||||
config:
|
||||
source: const
|
||||
value: {{ .maxdischargepower }}
|
||||
script: |
|
||||
powerlimit := ( maxdischargepower * curtail ) / 100
|
||||
powerlimit
|
||||
out:
|
||||
- name: powerlimit
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 10 }}
|
||||
register:
|
||||
address: 60324 # Grid Maximum Export Power (kW * 1000)
|
||||
type: writemultiple
|
||||
encoding: uint32
|
||||
curtailed: # the power limit is expressed as percent of nominal discharge power
|
||||
source: go
|
||||
in:
|
||||
- name: limit
|
||||
type: int
|
||||
config:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 8 }}
|
||||
register:
|
||||
address: 60324 # Grid Maximum Export Power (kW * 1000)
|
||||
type: holding
|
||||
decode: uint32
|
||||
- name: maxdischargepower
|
||||
type: int
|
||||
config:
|
||||
source: const
|
||||
value: {{ .maxdischargepower }}
|
||||
script: |
|
||||
percent := 100
|
||||
if limit != 0xFFFFFFFF && maxdischargepower > 0 {
|
||||
// round, the watt conversion does not reproduce the written percent exactly
|
||||
percent = (limit*100 + maxdischargepower/2) / maxdischargepower
|
||||
}
|
||||
percent
|
||||
dim:
|
||||
source: ifelse
|
||||
if:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue