From d6f9e37b9ba3ce987b58fdbe6ed3d912bc49fc3c Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 1 Sep 2022 12:44:35 +0200 Subject: [PATCH] wip --- templates/definition/meter/growatt.yaml | 91 +++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 templates/definition/meter/growatt.yaml diff --git a/templates/definition/meter/growatt.yaml b/templates/definition/meter/growatt.yaml new file mode 100644 index 0000000000..b6b08aded0 --- /dev/null +++ b/templates/definition/meter/growatt.yaml @@ -0,0 +1,91 @@ +template: growatt +products: + - brand: Growatt + description: + generic: Hybrid Inverter +guidedsetup: + enable: true +params: + - name: usage + choice: ["grid", "pv", "battery"] + - name: modbus + choice: ["rs485"] +render: | + type: custom + power: + {{- if eq .usage "grid" }} + source: calc + add: + - source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + 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 + 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 + register: # manual non-sunspec register configuration + address: 1046 # Etouser_tota Energy to user total + type: input + decode: uint32 + scale: 10 + {{- end }} + {{- if eq .usage "pv" }} + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + 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 + register: # manual non-sunspec register configuration + address: 91 # PV Energy total + type: input + decode: uint32 + scale: 10 + {{- end }} + {{- if eq .usage "battery" }} + source: calc + add: + - source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: # manual non-sunspec register configuration + address: 1009 # Pdischarge1 Discharge power + type: input + decode: uint32 + scale: 10 + - source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + 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 + register: # manual non-sunspec register configuration + address: 1014 # SOC + type: input + decode: uint16 + {{- end }}