From 1dc185cbb3f147cee902d6330bb120300cfb022d Mon Sep 17 00:00:00 2001 From: ottovdv Date: Wed, 10 Sep 2025 14:51:43 +0200 Subject: [PATCH] Add Aandewiel DSMR-logger (#23289) --- .../meter/dsmrlogger-aandewiel.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 templates/definition/meter/dsmrlogger-aandewiel.yaml diff --git a/templates/definition/meter/dsmrlogger-aandewiel.yaml b/templates/definition/meter/dsmrlogger-aandewiel.yaml new file mode 100644 index 000000000..c75fa2b11 --- /dev/null +++ b/templates/definition/meter/dsmrlogger-aandewiel.yaml @@ -0,0 +1,82 @@ +template: dsmrlogger-aandewiel +products: + - brand: Aandewiel + description: + generic: DSMR logger restAPI version +requirements: + description: + generic: Aandewiel dsmr-logger +params: + - name: usage + choice: ["grid"] + - name: host +render: | + {{- define "uri" -}} + http://{{ .host }}/api/v1/sm/actual + {{- end }} + type: custom + power: + source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: > + ((.actual[] | select(.name == "power_delivered") | .value // 0) * 1000) + - ((.actual[] | select(.name == "power_returned") | .value // 0) * 1000) + + voltages: # phase voltages in V + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "voltage_l1") | .value + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "voltage_l2") | .value + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "voltage_l3") | .value + + currents: # phase currents in A + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "current_l1") | .value + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "current_l2") | .value + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: .actual[] | select(.name == "current_l3") | .value + + powers: + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: > + ((.actual[] | select(.name == "power_delivered_l1") | .value) * 1000) + - ((.actual[] | select(.name == "power_returned_l1") | .value) * 1000) + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: > + ((.actual[] | select(.name == "power_delivered_l2") | .value) * 1000) + - ((.actual[] | select(.name == "power_returned_l2") | .value) * 1000) + - source: http + uri: {{ include "uri" . }} + headers: + - content-type: application/json + jq: > + ((.actual[] | select(.name == "power_delivered_l3") | .value) * 1000) + - ((.actual[] | select(.name == "power_returned_l3") | .value) * 1000)