evcc-io/templates/definition/meter/fronius-solarapi-v1.yaml
2022-03-29 15:54:02 +02:00

31 lines
871 B
YAML

template: fronius-solarapi-v1
products:
- brand: Fronius
description:
generic: Solar API V1
guidedsetup:
enable: true
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: host
example: 192.0.2.2
required: true
render: |
type: custom
power:
source: http
uri: http://{{ .host }}/solar_api/v1/GetPowerFlowRealtimeData.fcgi
{{- if eq .usage "grid" }}
jq: if .Body.Data.Site.P_Grid == null then 0 else .Body.Data.Site.P_Grid end
{{- end }}
{{- if eq .usage "pv" }}
jq: if .Body.Data.Site.P_PV == null then 0 else .Body.Data.Site.P_PV end
{{- end }}
{{- if eq .usage "battery" }}
jq: if .Body.Data.Site.P_Akku == null then 0 else .Body.Data.Site.P_Akku end
soc:
source: http
uri: http://{{ .host }}/solar_api/v1/GetPowerFlowRealtimeData.fcgi
jq: .Body.Data.Inverters."1".SOC
{{- end }}