167 lines
6.4 KiB
YAML
167 lines
6.4 KiB
YAML
template: enphase
|
|
products:
|
|
- brand: Enphase
|
|
description:
|
|
generic: IQ Envoy
|
|
requirements:
|
|
params:
|
|
- name: usage
|
|
choice: ["grid", "pv", "battery"]
|
|
- name: host
|
|
- name: schema
|
|
default: http
|
|
advanced: true
|
|
- name: token
|
|
help:
|
|
en: "Required if Envoy Firmware D7.x.xxx. Token is valid for one year. Instructions for obtaining a token via web UI: https://enphase.com/download/accessing-iq-gateway-local-apis-or-local-ui-token-based-authentication"
|
|
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: cache
|
|
advanced: true
|
|
default: 1s
|
|
- name: battery_type
|
|
description:
|
|
en: "Enphase Battery Type (AC or IQ)"
|
|
de: "Enphase Batterietyp (AC oder IQ)"
|
|
help:
|
|
en: "Select 'iq' for new Enphase IQ Batteries. Leave at default 'ac' for older generation AC Batteries."
|
|
de: "Wähle 'iq' falls die neuere 'IQ Battery' Generation installiert ist. Standardeinstellung 'ac' für die ältere 'AC Battery' Generation."
|
|
default: ac
|
|
choice: ["ac", "iq"]
|
|
advanced: true
|
|
render: |
|
|
type: custom
|
|
{{- if eq .usage "grid" }}
|
|
power:
|
|
source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: .consumption[] | select(.measurementType == "net-consumption").wNow
|
|
currents:
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 ) and ( .consumption[] | select(.measurementType == "net-consumption").lines | length >= 1 )) then .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent else 0 end
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 ) and ( .consumption[] | select(.measurementType == "net-consumption").lines | length >= 2 )) then .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent else 0 end
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .consumption[] | select(.measurementType == "net-consumption").activeCount >= 1 ) and ( .consumption[] | select(.measurementType == "net-consumption").lines | length >= 3 )) then .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent else 0 end
|
|
{{- end }}
|
|
{{- if eq .usage "pv" }}
|
|
power:
|
|
source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (.production | length) > 1 and (.production[] | select(.measurementType == "production").activeCount >= 1) then .production[] | select(.measurementType == "production").wNow else .production[] | select(.type == "inverters").wNow end
|
|
energy:
|
|
source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (.production | length) > 1 and (.production[] | select(.measurementType == "production").activeCount >= 1) then .production[] | select(.measurementType == "production").whLifetime else .production[] | select(.type == "inverters").whLifetime end
|
|
scale: 0.001
|
|
currents:
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .production[] | select(.measurementType == "production").activeCount >= 1 ) and ( .production[] | select(.measurementType == "production").lines | length >= 1 )) then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else 0 end
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .production[] | select(.measurementType == "production").activeCount >= 1 ) and ( .production[] | select(.measurementType == "production").lines | length >= 2 )) then .production[] | select(.measurementType == "production").lines[1].rmsCurrent else 0 end
|
|
- source: http
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: if (( .production[] | select(.measurementType == "production").activeCount >= 1 ) and ( .production[] | select(.measurementType == "production").lines | length >= 3 )) then .production[] | select(.measurementType == "production").lines[2].rmsCurrent else 0 end
|
|
{{- end }}
|
|
{{- if eq .usage "battery" }}
|
|
power:
|
|
source: http
|
|
{{- if eq .battery_type "iq" }}
|
|
uri: {{ .schema }}://{{ .host }}/ivp/livedata/status
|
|
{{- else }}
|
|
uri: {{ .schema }}://{{ .host }}/production.json?details=1
|
|
{{- end}}
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
{{- if eq .battery_type "iq" }}
|
|
jq: ((.meters.storage.agg_p_mw // 0) / 1000 | round)
|
|
{{- else }}
|
|
jq: .storage[] | .wNow
|
|
{{- end}}
|
|
soc:
|
|
source: http
|
|
uri: {{ .schema }}://{{ .host }}/ivp/ensemble/inventory
|
|
{{- if .token }}
|
|
auth:
|
|
type: bearer
|
|
token: {{ .token }}
|
|
insecure: true
|
|
{{- end }}
|
|
cache: {{ .cache }}
|
|
jq: '[.[].devices[] | select(.percentFull != null) | .percentFull] | add / length'
|
|
capacity: {{ .capacity }} # kWh
|
|
{{- end }}
|