diff --git a/templates/definition/meter/huawei-sun2000-hybrid.yaml b/templates/definition/meter/huawei-sun2000-hybrid.yaml index 9fd6d8c8e..5e53b1dfc 100644 --- a/templates/definition/meter/huawei-sun2000-hybrid.yaml +++ b/templates/definition/meter/huawei-sun2000-hybrid.yaml @@ -73,7 +73,7 @@ render: | timeout: {{ .timeout }} connectdelay: 1s register: - address: 37113 # Grid import export power + address: 37113 # Grid import/export power type: holding decode: int32nan scale: -1 @@ -82,7 +82,16 @@ render: | {{- include "modbus" . | indent 2 }} timeout: {{ .timeout }} register: - address: 37121 # Active energy import from the grid + address: 37121 # Active energy imported from the grid + type: holding + decode: uint32nan + scale: 0.01 + returnenergy: + source: modbus + {{- include "modbus" . | indent 2 }} + timeout: {{ .timeout }} + register: + address: 37119 # Active energy exported to the grid type: holding decode: uint32nan scale: 0.01 @@ -140,11 +149,10 @@ render: | timeout: {{ .timeout }} connectdelay: 1s register: - {{- if eq .storageunit "1" }} - address: 37001 - {{- end }} {{- if eq .storageunit "2" }} address: 37743 + {{- else }} + address: 37001 {{- end }} type: holding decode: int32nan @@ -154,11 +162,23 @@ render: | {{- include "modbus" . | indent 2 }} timeout: {{ .timeout }} register: - {{- if eq .storageunit "1" }} - address: 37068 # [Energy storage unit 1] Total discharge - {{- end }} {{- if eq .storageunit "2" }} address: 37755 # [Energy storage unit 2] Total discharge + {{- else }} + address: 37068 # [Energy storage unit 1] Total discharge + {{- end }} + type: holding + decode: uint32nan + scale: 0.01 + returnenergy: + source: modbus + {{- include "modbus" . | indent 2 }} + timeout: {{ .timeout }} + register: + {{- if eq .storageunit "2" }} + address: 37753 # [Energy storage unit 2] Total charge + {{- else }} + address: 37066 # [Energy storage unit 1] Total charge {{- end }} type: holding decode: uint32nan @@ -168,11 +188,10 @@ render: | {{- include "modbus" . | indent 2 }} timeout: {{ .timeout }} register: - {{- if eq .storageunit "1" }} - address: 37004 - {{- end }} {{- if eq .storageunit "2" }} address: 37738 + {{- else }} + address: 37004 {{- end }} type: holding decode: uint16nan