diff --git a/templates/definition/meter/kostal-piko.yaml b/templates/definition/meter/kostal-piko.yaml index 4e45a89de..7a1ff9537 100644 --- a/templates/definition/meter/kostal-piko.yaml +++ b/templates/definition/meter/kostal-piko.yaml @@ -14,32 +14,27 @@ render: | power: {{- if eq .usage "grid" }} # Grid - source: calc - add: - - source: http - uri: http://{{ .host }}/api/dxs.json?dxsEntries=67109120 # PV AC Ausgang - jq: .dxsEntries[0].value | if . == null then 0 else . end - scale: -1 - - source: http - uri: http://{{ .host }}/api/dxs.json?dxsEntries=83886848 # Netzbezug - jq: .dxsEntries[0].value | if . == null then 0 else . end - - source: http - uri: http://{{ .host }}/api/dxs.json?dxsEntries=83886336 # PV Eigenverbrauch - jq: .dxsEntries[0].value | if . == null then 0 else . end + source: http + uri: http://{{ .host }}/api/dxs.json?dxsEntries=83886336&dxsEntries=83886848&dxsEntries=83886592&dxsEntries=67109120 # Home PV Power + Home Grid Power + Home Bat Power - PV/Bat Inverter Power + # | ----------------------------- Home PV W -------- | + | --------------------------- Home Grid W -------- | + | --------------------------- Home Bat W --------- | - | --------------------------- PV/BAT Inv W ------- | + jq: (.dxsEntries[] | select(.dxsId==83886336) | .value ) + (.dxsEntries[] | select(.dxsId==83886848) | .value ) + (.dxsEntries[] | select(.dxsId==83886592) | .value ) - (.dxsEntries[] | select(.dxsId==67109120) | .value ) {{- end -}} {{- if eq .usage "pv" }} # PV source: http - uri: http://{{ .host }}/api/dxs.json?dxsEntries=67109120 # PV AC Ausgang - jq: .dxsEntries[0].value | if . == null then 0 else . end + uri: http://{{ .host }}/api/dxs.json?dxsEntries=33555203&dxsEntries=33555459 # PV1 Power + PV2 Power + # | ----------------------------- PV1 W ------------ | + | ----------------------------- PV2 W ------------ | + jq: (.dxsEntries[] | select(.dxsId==33555203) | .value ) + (.dxsEntries[] | select(.dxsId==33555459) | .value ) {{- end -}} {{- if eq .usage "battery" }} # Battery source: http - uri: http://{{ .host }}/api/dxs.json?dxsEntries=33556226&dxsEntries=33556238&dxsEntries=33556230 # Battery Voltage * Energy * Charging Indicator - jq: (.dxsEntries[] | select(.dxsId==33556226) | .value) * (.dxsEntries[] | select(.dxsId==33556238) | .value) * (if (.dxsEntries[] | select(.dxsId==33556230) | .value) == 0 then -1 else 1 end) | if . == null then 0 else . end + uri: http://{{ .host }}/api/dxs.json?dxsEntries=33556225&dxsEntries=33556226 # Battery Current A * Battery Voltage + # -1 * | ----------------------------- Bat A ------------ | * | ----------------------------- Bat V ------------ | + jq: -1 * (.dxsEntries[] | select(.dxsId==33556225) | .value ) * (.dxsEntries[] | select(.dxsId==33556226) | .value ) soc: source: http uri: http://{{ .host }}/api/dxs.json?dxsEntries=33556229 # Battery SOC - jq: .dxsEntries[0].value | if . == null then 0 else . end + # | ----------------------------- Bat SOC% --------- | + jq: (.dxsEntries[] | select(.dxsId==33556229) | .value ) {{- end -}}