Add Sonnenbatterie comfort, eco 5, eco 6, oem 6.5 (#8679)

This commit is contained in:
ngehrsitz 2023-07-11 12:36:22 +02:00 • committed by GitHub
parent 383ef6a044
commit 75e98550de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,54 @@
template: sonnenbatterie-eco56
products:
- brand: Sonnen
description:
generic: comfort, eco 5, eco 6, oem 6.5
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: host
- name: port
default: 7979
- name: capacity
advanced: true
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M39 - .M38 # current purchase - current feed-in at the interconnection point
energy:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M41 # cumulated purchase since installation
{{- end }}
{{- if eq .usage "pv" }}
power:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M03 # current pv power
energy:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M37 # cumulated pv production since installation of Sonnenbatterie
{{- end }}
{{- if eq .usage "battery" }}
power:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
# M34 current discharging power, S65 max inverter power
# M35 current charging power, S65 max inverter power
jq: (if .M34 <= .S65 then .M34 else 0 end) - (if .M35 <= .S65 then .M35 else 0 end)
energy:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M31 # total stored energy over lifetime
soc:
source: http
uri: http://{{ .host }}:{{ .port }}/rest/devices/battery
jq: .M30 # SOC relative to usable capacity (.M05 # display SOC)
{{- if .capacity }}
capacity: {{ .capacity }} # kWh
{{- end }}
{{- end }}

View file

@ -0,0 +1,44 @@
product:
brand: Sonnen
description: comfort, eco 5, eco 6, oem 6.5
render:
- usage: grid
default: |
type: template
template: sonnenbatterie-eco56
usage: grid
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
advanced: |
type: template
template: sonnenbatterie-eco56
usage: grid
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
- usage: pv
default: |
type: template
template: sonnenbatterie-eco56
usage: pv
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
advanced: |
type: template
template: sonnenbatterie-eco56
usage: pv
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
- usage: battery
default: |
type: template
template: sonnenbatterie-eco56
usage: battery
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
advanced: |
type: template
template: sonnenbatterie-eco56
usage: battery
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 7979 # Port (Optional)
capacity: 50 # Akkukapazität in kWh (Optional)