Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Growatt hybrid inverter template #4278

Merged
merged 6 commits into from
Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions templates/definition/meter/growatt-hybrid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
template: growatt-hybrid
products:
- brand: Growatt
description:
generic: Hybrid Inverter
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 9600
id: 1
render: |
type: custom
power:
{{- if eq .usage "grid" }}
source: calc
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1021 # PactouserTotal AC power to user Total
type: input
decode: uint32
scale: 0.1
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1029 # Pactogrid total AC power to grid total
type: input
decode: uint32
scale: -0.1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1046 # Etouser_total Energy to user total
type: input
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "pv" }}
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1 # Ppv Input power
type: input
decode: uint32
scale: 0.1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 91 # PV Energy total
type: input
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "battery" }}
source: calc
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1009 # Pdischarge1 Discharge power
type: input
decode: uint32
scale: 0.1
- source: modbus
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1011 # Pcharge1 Charge power
type: input
decode: uint32
scale: -0.1
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1014 # SOC
type: input
decode: uint16
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1054 # Edischarge1_total Total discharge energy1
type: input
decode: uint32
scale: 0.1
{{- end }}
76 changes: 76 additions & 0 deletions templates/docs/meter/growatt-hybrid_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
product:
brand: Growatt
description: Hybrid Inverter
render:
- usage: grid
default: |
type: template
template: growatt-hybrid
usage: grid

# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter

# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port

# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: pv
default: |
type: template
template: growatt-hybrid
usage: pv

# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter

# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port

# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: battery
default: |
type: template
template: growatt-hybrid
usage: battery

# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter

# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port

# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
2 changes: 2 additions & 0 deletions templates/evcc.io/brands.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"Eastron",
"FENECON",
"Fronius",
"Growatt",
"Homematic IP",
"Huawei",
"Janitza",
Expand Down Expand Up @@ -90,6 +91,7 @@
"Eastron",
"FENECON",
"Fronius",
"Growatt",
"Homematic IP",
"Huawei",
"Janitza",
Expand Down