Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored and andig committed Sep 1, 2022
1 parent d6f9e37 commit 176d4a4
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 18 deletions.
30 changes: 12 additions & 18 deletions templates/definition/meter/growatt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,49 @@ params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["rs485"]
choice: ["rs485", "tcpip"]
baudrate: 9600
id: 1
render: |
type: custom
power:
{{- if eq .usage "grid" }}
source: calc
add:
- source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1021 # PactouserTotal AC power to user Total
type: input
decode: uint32
scale: 10
- source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1029 # Pactogrid total AC power to grid total
type: input
decode: uint32
scale: -10
energy:
source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1046 # Etouser_tota Energy to user total
address: 1046 # Etouser_total Energy to user total
type: input
decode: uint32
scale: 10
{{- end }}
{{- if eq .usage "pv" }}
source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1 # Ppv Input power
type: input
decode: uint32
scale: 10
energy:
source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 91 # PV Energy total
type: input
Expand All @@ -65,25 +62,22 @@ render: |
source: calc
add:
- source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1009 # Pdischarge1 Discharge power
type: input
decode: uint32
scale: 10
- source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 4 }}
register: # manual non-sunspec register configuration
address: 1011 # Pcharge1 Charge power
type: input
decode: uint32
scale: -10
soc:
source: modbus
uri: {{ .host }}:{{ .port }}
id: 1
{{- include "modbus" . | indent 2 }}
register: # manual non-sunspec register configuration
address: 1014 # SOC
type: input
Expand Down
76 changes: 76 additions & 0 deletions templates/docs/meter/growatt_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
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
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
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

0 comments on commit 176d4a4

Please sign in to comment.