Add Aandewiel DSMR-logger (#23289)

This commit is contained in:
ottovdv 2025-09-10 14:51:43 +02:00 • committed by GitHub
parent 74de97676c
commit 1dc185cbb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)