From 1a2747cdc09b00bb14ab17201eca6960af4f703a Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Mon, 30 Oct 2023 20:56:33 +0100 Subject: [PATCH] Add Loxone template (#10535) * Add Loxone template * remove default GET --- templates/definition/meter/loxone.yaml | 56 ++++++++++++++++++++++++++ templates/evcc.io/brands.json | 2 + 2 files changed, 58 insertions(+) create mode 100644 templates/definition/meter/loxone.yaml diff --git a/templates/definition/meter/loxone.yaml b/templates/definition/meter/loxone.yaml new file mode 100644 index 000000000..ff9c209e9 --- /dev/null +++ b/templates/definition/meter/loxone.yaml @@ -0,0 +1,56 @@ +template: loxone +products: + - brand: Loxone + description: + generic: Miniserver +params: + - name: usage + choice: ["grid", "pv", "battery", "charge"] + - name: host + - name: user + - name: password + - name: meterblock + required: true + description: + de: Zählerbaustein + en: Meter block + help: + de: Bezeichnung aus Loxone Config + en: Name from Loxone Config + - name: socblock + required: false + description: + de: Bausteinbezeichnung für Ladezustand + en: Function block name for state of charge + help: + de: Bezeichnung aus Loxone Config, nur für Batterie + en: Name from Loxone Config, only for battery +render: | + type: custom + power: + source: http + uri: http://{{ .host }}/jdev/sps/io/{{ .meterblock }} + auth: + type: basic + user: {{ .user }} + password: {{ .password }} + jq: .LL.value + scale: 1000 + energy: + source: http + uri: http://{{ .host }}/jdev/sps/io/{{ .meterblock }}/all + auth: + type: basic + user: {{ .user }} + password: {{ .password }} + jq: first(.LL[] | select(type == "object" and (.name == "Mr" or .name == "Mrc")) .value) + {{- if and (eq .usage "battery") .socblock }} + soc: + source: http + uri: http://{{ .host }}/jdev/sps/io/{{ .socblock }} + auth: + type: basic + user: {{ .user }} + password: {{ .password }} + jq: .LL.value + {{- end }} diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index 0d8c6997c..e5773e834 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -109,6 +109,7 @@ "Janitza", "Kostal", "LG", + "Loxone", "M-TEC", "my-PV", "myStrom", @@ -169,6 +170,7 @@ "IGEN Tech", "Kostal", "LG", + "Loxone", "M-TEC", "myStrom", "OpenEMS",