From fccd7ba3ea13246d2850e4486cbcdb7f8ca5b5a7 Mon Sep 17 00:00:00 2001 From: Thomas Ihmann Date: Mon, 24 Mar 2025 14:30:43 +0100 Subject: [PATCH] Add Buderus/Bosch/Junkers (#19977) --- templates/definition/charger/emsesp.yaml | 112 +++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 templates/definition/charger/emsesp.yaml diff --git a/templates/definition/charger/emsesp.yaml b/templates/definition/charger/emsesp.yaml new file mode 100644 index 000000000..2a79704d4 --- /dev/null +++ b/templates/definition/charger/emsesp.yaml @@ -0,0 +1,112 @@ +template: emsesp +products: + - brand: Buderus + description: + generic: Buderus (SG Ready) + - brand: Bosch + description: + generic: Bosch (SG Ready) + - brand: Junkers + description: + generic: Junkers (SG Ready) +group: heating +# requirements: +# evcc: ["sponsorship"] +params: + - name: host + - name: token + - name: tempsource + type: choice + choice: ["", "warmwater"] + description: + de: "Temperaturquelle" + en: "Temperature source" +render: | + type: sgready + getmode: + source: go + script: | + res := 1 + switch { + case SG1 == "1" && SG4 == "0": res = 3 # Frostschutz + case SG1 == "0" && SG4 == "0": res = 1 # Normal + case SG1 == "0" && SG4 == "1": res = 2 # Forcierter Betrieb + case SG1 == "1" && SG4 == "1": res = 2 # Sofortige Ansteuerung + } + res + in: + - name: SG1 + type: string + config: + source: http + uri: http://{{ .host }}/api/boiler/hpin1opt + jq: '.value[0:1]' + - name: SG4 + type: string + config: + source: http + uri: http://{{ .host }}/api/boiler/hpin4opt + jq: '.value[0:1]' + setmode: + source: switch + switch: + - case: 1 # normal + set: + source: sequence + set: + - source: http + uri: http://{{ .host }}/api/boiler/hpin4opt + method: POST + headers: + - content-type: application/json + - authorization: Bearer {{ .token}} + body: > + { "value" : "0xxxxxxxxxxx" } + - source: http + uri: http://{{ .host }}/api/boiler/hpin1opt + method: POST + headers: + - content-type: application/json + - authorization: Bearer {{ .token}} + body: > + { "value" : "0xxxxxxxxxxxxxx" } + - case: 2 # boost + set: + source: http + uri: http://{{ .host }}/api/boiler/hpin4opt + method: POST + headers: + - content-type: application/json + - authorization: Bearer {{ .token}} + body: > + { "value" : "1xxxxxxxxxxx" } + - case: 3 # dimm + set: + source: sequence + set: + - source: http + uri: http://{{ .host }}/api/boiler/hpin1opt + method: POST + headers: + - content-type: application/json + - authorization: Bearer {{ .token}} + body: > + { "value" : "1xxxxxxxxxxxxxx" } + - source: http + uri: http://{{ .host }}/api/boiler/hpin4opt + method: POST + headers: + - content-type: application/json + - authorization: Bearer {{ .token}} + body: > + { "value" : "0xxxxxxxxxxx" } + {{- if .tempsource }} + temp: + source: http + uri: http://{{ .host }}/api/boiler/dhw/curtemp + jq: .value + limittemp: + source: http + uri: http://{{ .host }}/api/boiler/dhw/settemp + jq: .value + {{- end }}