evcc-io/templates/definition/meter/senec-home.yaml

82 lines
2.3 KiB
YAML

template: senec-home
products:
- brand: SENEC
description:
generic: .Home
requirements:
description:
de: Batteriesteuerung umfasst nur das Netzladen, nicht die Entlade-Sperre. Der SENEC.Home P4 wird nicht unterstützt.
en: Battery control only includes grid charging, not the discharge lock. The SENEC.Home P4 is not supported.
capabilities: ["battery-control"]
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: host
- name: schema
- preset: battery-params
render: |
type: custom
power:
source: http
unpack: hex
decode: float32
uri: {{ .schema }}://{{ .host }}/lala.cgi
insecure: true
method: POST
headers:
- content-type: application/json
{{- if eq .usage "grid" }}
body: '{"ENERGY":{"GUI_GRID_POW":""}}'
jq: .ENERGY.GUI_GRID_POW | sub("fl_"; "")
{{- end }}
{{- if eq .usage "pv" }}
body: '{"ENERGY":{"GUI_INVERTER_POWER":""}}'
jq: .ENERGY.GUI_INVERTER_POWER | sub("fl_"; "")
{{- end }}
{{- if eq .usage "battery" }}
body: '{"ENERGY":{"GUI_BAT_DATA_POWER":""}}'
jq: .ENERGY.GUI_BAT_DATA_POWER | sub("fl_"; "")
scale: -1
{{- end }}
{{- if eq .usage "battery" }}
soc:
source: http
uri: {{ .schema }}://{{ .host }}/lala.cgi
insecure: true
method: POST
headers:
- content-type: application/json
body: '{"ENERGY":{"GUI_BAT_DATA_FUEL_CHARGE":""}}'
jq: .ENERGY.GUI_BAT_DATA_FUEL_CHARGE | sub("fl_"; "")
unpack: hex
decode: float32
batterymode:
source: switch
switch:
- case: 1 # normal
set:
source: http
uri: {{ .schema }}://{{ .host }}/lala.cgi
insecure: true
method: POST
headers:
- content-type: application/json
body: '{"ENERGY":{"SAFE_CHARGE_PROHIBIT":"u8_01"}}' # self consumption
- case: 2 # hold (not implemented)
set:
source: error
error: ErrNotAvailable
- case: 3 # charge
set:
source: http
uri: {{ .schema }}://{{ .host }}/lala.cgi
insecure: true
method: POST
headers:
- content-type: application/json
body: '{"ENERGY":{"SAFE_CHARGE_FORCE":"u8_01"}}' # force to charge
default:
source: error
error: ErrNotAvailable
{{- include "battery-params" . }}
{{- end }}