OpenEMS: enable grid charging (#22951)

This commit is contained in:
Ingo 2025-08-14 22:12:45 +02:00 • committed by GitHub
parent 6f03177a54
commit 3c11886d35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,8 @@ params:
en: adjusted to the API timeout
usages: ["battery"]
advanced: true
- name: maxchargepower
default: 4200
- name: maxacpower
- name: capacity
advanced: true
@ -85,7 +87,7 @@ render: |
method: POST
headers:
- content-type: application/json
body: '{"value":0}'
body: '{"value": 0}'
- case: 2 # hold
set:
source: http
@ -97,11 +99,19 @@ render: |
method: POST
headers:
- content-type: application/json
body: '{"value":0}'
- case: 3 # charge (not implemented)
body: '{"value": 0}'
- case: 3 # charge
set:
source: error
error: ErrNotAvailable
source: http
uri: http://{{ .host }}/rest/channel/{{ .battery }}/SetActivePowerLessOrEquals
auth:
type: basic
user: x
password: {{ .password }}
method: POST
headers:
- content-type: application/json
body: '{"value": {{ mul .maxchargepower -1 }}}' # charge power is negative
{{- end }}
capacity: {{ .capacity }} # kWh
{{- end }}