From 9efa2aa2d7ae721dc409ef9a0ec01f0e36d64ccd Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:59:27 +0200 Subject: [PATCH] Youless: Add pv meter (#9023) --- templates/definition/meter/youless.yaml | 22 +++++++++++++++++++++- templates/docs/meter/youless_0.yaml | 9 +++++++++ templates/evcc.io/brands.json | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/templates/definition/meter/youless.yaml b/templates/definition/meter/youless.yaml index 68d076b57..22f39cd1b 100644 --- a/templates/definition/meter/youless.yaml +++ b/templates/definition/meter/youless.yaml @@ -3,13 +3,20 @@ products: - brand: Youless description: generic: Energy Monitor +requirements: + description: + de: | + Zur Erfassung der PV-Produktion wird ein extern angebundenener S0-Erzeugungszähler benötigt. + en: | + An externally connected S0 generation meter is required to record the solar production. params: - name: usage - choice: ["grid"] + choice: ["grid", "pv"] - name: host required: true render: | type: custom + {{- if eq .usage "grid" }} power: source: http uri: http://{{ .host }}/e @@ -20,3 +27,16 @@ render: | uri: http://{{ .host }}/e method: GET jq: .[0]|.p1+.p2 + {{- end }} + {{- if eq .usage "pv" }} + power: + source: http + uri: http://{{ .host }}/e + method: GET + jq: .[0].ps0 + energy: + source: http + uri: http://{{ .host }}/e + method: GET + jq: .[0].cs0 + {{- end }} diff --git a/templates/docs/meter/youless_0.yaml b/templates/docs/meter/youless_0.yaml index ee9f7460d..7753a7cd1 100644 --- a/templates/docs/meter/youless_0.yaml +++ b/templates/docs/meter/youless_0.yaml @@ -1,6 +1,9 @@ product: brand: Youless description: Energy Monitor +description: | + Zur Erfassung der PV-Produktion wird ein extern angebundenener S0-Erzeugungszähler benötigt. + render: - usage: grid default: | @@ -8,3 +11,9 @@ render: template: youless usage: grid host: 192.0.2.2 # IP-Adresse oder Hostname + - usage: pv + default: | + type: template + template: youless + usage: pv + host: 192.0.2.2 # IP-Adresse oder Hostname diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index ed42d0650..e2d5b021e 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -174,6 +174,7 @@ "TP-Link", "VARTA", "Victron", + "Youless", "ZCS Azzurro" ], "Vehicles": [