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 85ad361 commit d6f9e37
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions templates/definition/meter/growatt.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit d6f9e37

Please sign in to comment.