From 9b83f87de77f2f57f433b9929181f0e71ae118c6 Mon Sep 17 00:00:00 2001 From: pdeliot Date: Mon, 11 Nov 2024 16:11:30 +0100 Subject: [PATCH 1/6] support phase currents, and three-phase with enphase envoy --- templates/definition/meter/enphase.yaml | 170 +++++++++++++++++++++++- 1 file changed, 169 insertions(+), 1 deletion(-) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index 12b497ad00..c9658d7190 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -27,9 +27,93 @@ render: | auth: type: bearer password: {{ .token }} - insecure: true + insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").wNow + powers: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].wNow else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].wNow else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].wNow else empty end + currents: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent else empty end + voltages: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsVoltage else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsVoltage else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage else empty end {{- end }} {{- if eq .usage "pv" }} power: @@ -53,6 +137,90 @@ render: | {{- end }} jq: .production | max_by(.wNow).whLifetime scale: 0.001 + powers: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].wNow else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].wNow else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].wNow else empty end + currents: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsCurrent else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsCurrent else empty end + voltages: + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsVoltage else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsVoltage else empty end + - source: http + uri: http://{{ .host }}/production.json?details=1 + {{- if .token }} + auth: + type: bearer + password: {{ .token }} + insecure: true + {{- end }} + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsVoltage else empty end {{- end }} {{- if eq .usage "battery" }} power: From 1ff6beef0fa78ffaea1386d4dd5b46d78abb15c4 Mon Sep 17 00:00:00 2001 From: pdeliot Date: Wed, 20 Nov 2024 19:53:38 +0100 Subject: [PATCH 2/6] Update enphase.yaml replace "empty" value when missing by 0 --- templates/definition/meter/enphase.yaml | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index c9658d7190..28a4a7a7ae 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -39,7 +39,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].wNow else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].wNow else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -48,7 +48,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].wNow else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].wNow else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -57,7 +57,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].wNow else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].wNow else 0 end currents: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -67,7 +67,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -76,7 +76,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -85,7 +85,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent else 0 end voltages: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -95,7 +95,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsVoltage else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsVoltage else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -104,7 +104,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsVoltage else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsVoltage else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -113,7 +113,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage else empty end + jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage else 0 end {{- end }} {{- if eq .usage "pv" }} power: @@ -146,7 +146,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].wNow else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].wNow else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -155,7 +155,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].wNow else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].wNow else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -164,7 +164,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].wNow else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].wNow else 0 end currents: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -174,7 +174,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -183,7 +183,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsCurrent else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsCurrent else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -192,7 +192,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsCurrent else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsCurrent else 0 end voltages: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -202,7 +202,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsVoltage else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsVoltage else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -211,7 +211,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsVoltage else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsVoltage else 0 end - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} @@ -220,7 +220,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsVoltage else empty end + jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsVoltage else 0 end {{- end }} {{- if eq .usage "battery" }} power: From 08c1940735917daf23a3b6fe024c6cb77a90f1f6 Mon Sep 17 00:00:00 2001 From: pdeliot Date: Sat, 23 Nov 2024 19:03:36 +0100 Subject: [PATCH 3/6] Adding a new way to support 1p and 3p Adding "phases" optional parameter to switch on 3 phases support. --- templates/definition/meter/enphase.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index 28a4a7a7ae..efc7404ec7 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -17,6 +17,9 @@ params: de: "Ab Envoy Firmware D7.x.xxx notwendig. Token ist ein Jahr gültig. Anleitung (Obtaining a token via web UI): https://enphase.com/download/accessing-iq-gateway-local-apis-or-local-ui-token-based-authentication" - name: capacity advanced: true + - name: phases + choice: ["1", "3"] + default: "1" render: | type: custom {{- if eq .usage "grid" }} @@ -30,6 +33,7 @@ render: | insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").wNow + {{- if eq .phases "3"}} powers: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -114,6 +118,7 @@ render: | insecure: true {{- end }} jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage else 0 end + {{- end }} {{- end }} {{- if eq .usage "pv" }} power: @@ -137,6 +142,7 @@ render: | {{- end }} jq: .production | max_by(.wNow).whLifetime scale: 0.001 + {{- if eq .phases "3"}} powers: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -221,6 +227,7 @@ render: | insecure: true {{- end }} jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsVoltage else 0 end + {{- end }} {{- end }} {{- if eq .usage "battery" }} power: From 7311439f692ccc04e38fb767fa4786757ad26fee Mon Sep 17 00:00:00 2001 From: pdeliot Date: Sat, 23 Nov 2024 19:05:34 +0100 Subject: [PATCH 4/6] New way to support 3 phase Added "phases" parameter to activate 3 phase support and attached capacities. From 809643f17e2042f65f33ca47dc092c8b3cded936 Mon Sep 17 00:00:00 2001 From: pdeliot Date: Mon, 2 Dec 2024 10:04:11 +0100 Subject: [PATCH 5/6] Update enphase.yaml -removed powers -removed voltages -re-added 3 phase measurements for 1 phase devices -removed 1/3 phase option --- templates/definition/meter/enphase.yaml | 119 ------------------------ 1 file changed, 119 deletions(-) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index efc7404ec7..9f02b04c76 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -17,9 +17,6 @@ params: de: "Ab Envoy Firmware D7.x.xxx notwendig. Token ist ein Jahr gültig. Anleitung (Obtaining a token via web UI): https://enphase.com/download/accessing-iq-gateway-local-apis-or-local-ui-token-based-authentication" - name: capacity advanced: true - - name: phases - choice: ["1", "3"] - default: "1" render: | type: custom {{- if eq .usage "grid" }} @@ -33,35 +30,6 @@ render: | insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").wNow - {{- if eq .phases "3"}} - powers: - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].wNow else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].wNow else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].wNow else 0 end currents: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -90,35 +58,6 @@ render: | insecure: true {{- end }} jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent else 0 end - voltages: - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsVoltage else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsVoltage else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage else 0 end - {{- end }} {{- end }} {{- if eq .usage "pv" }} power: @@ -142,35 +81,6 @@ render: | {{- end }} jq: .production | max_by(.wNow).whLifetime scale: 0.001 - {{- if eq .phases "3"}} - powers: - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].wNow else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].wNow else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].wNow else 0 end currents: - source: http uri: http://{{ .host }}/production.json?details=1 @@ -199,35 +109,6 @@ render: | insecure: true {{- end }} jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsCurrent else 0 end - voltages: - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsVoltage else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[1].rmsVoltage else 0 end - - source: http - uri: http://{{ .host }}/production.json?details=1 - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[2].rmsVoltage else 0 end - {{- end }} {{- end }} {{- if eq .usage "battery" }} power: From 03015b930fdc2a6179b5eeeb4690a0049306c99f Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:21:21 +0100 Subject: [PATCH 6/6] remove ws --- templates/definition/meter/enphase.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index 8272935ebb..7d22b15a1d 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -27,7 +27,7 @@ render: | auth: type: bearer password: {{ .token }} - insecure: true + insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").wNow currents: