diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index 2ff2f0e56a..c830c5aa9f 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -19,18 +19,7 @@ render: | {{- if eq .usage "grid" }} power: source: http - uri: http://{{ .host }}/production.json - method: GET - {{- if .token }} - auth: - type: bearer - password: {{ .token }} - insecure: true - {{- end }} - jq: .consumption[] | select(.measurementType == "net-consumption").wNow - energy: - source: http - uri: http://{{ .host }}/production.json + uri: http://{{ .host }}/ivp/livedata/status method: GET {{- if .token }} auth: @@ -38,13 +27,13 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .consumption[] | select(.measurementType == "net-consumption").whLifetime + jq: .meters.grid.agg_p_mw scale: 0.001 {{- end }} {{- if eq .usage "pv" }} power: source: http - uri: http://{{ .host }}/production.json + uri: http://{{ .host }}/ivp/livedata/status method: GET {{- if .token }} auth: @@ -52,7 +41,8 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .production[] | select(.measurementType == "production").wNow + jq: .meters.pv.agg_p_mw + scale: 0.001 energy: source: http uri: http://{{ .host }}/production.json @@ -69,7 +59,7 @@ render: | {{- if eq .usage "battery" }} power: source: http - uri: http://{{ .host }}/production.json?details=1 + uri: http://{{ .host }}/ivp/livedata/status method: GET {{- if .token }} auth: @@ -77,10 +67,11 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .storage[] | select(.type == "acb").wNow + jq: .meters.storage.agg_p_mw + scale: 0.001 soc: source: http - uri: http://{{ .host }}/ivp/ensemble/inventory + uri: http://{{ .host }}/ivp/livedata/status method: GET {{- if .token }} auth: @@ -88,7 +79,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .[].devices | map(.percentFull) | add / length + jq: .meters.soc {{- if .capacity }} capacity: {{ .capacity }} # kWh {{- end }}