diff --git a/templates/definition/meter/growatt-hybrid.yaml b/templates/definition/meter/growatt-hybrid.yaml new file mode 100644 index 0000000000..1ba302e135 --- /dev/null +++ b/templates/definition/meter/growatt-hybrid.yaml @@ -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 }} diff --git a/templates/docs/meter/growatt-hybrid_0.yaml b/templates/docs/meter/growatt-hybrid_0.yaml new file mode 100644 index 0000000000..5f4d574232 --- /dev/null +++ b/templates/docs/meter/growatt-hybrid_0.yaml @@ -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 diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index 9757e81ea7..83966a2b85 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -59,6 +59,7 @@ "Eastron", "FENECON", "Fronius", + "Growatt", "Homematic IP", "Huawei", "Janitza", @@ -90,6 +91,7 @@ "Eastron", "FENECON", "Fronius", + "Growatt", "Homematic IP", "Huawei", "Janitza",