diff --git a/templates/definition/meter/huawei-sun2000-dongle.yaml b/templates/definition/meter/huawei-sun2000-dongle.yaml index 80f5b4269c..4c76c55cc3 100644 --- a/templates/definition/meter/huawei-sun2000-dongle.yaml +++ b/templates/definition/meter/huawei-sun2000-dongle.yaml @@ -2,7 +2,7 @@ template: huawei-dongle products: - brand: Huawei description: - generic: SUN2000 with SDongle + generic: SUN2000 (SDongle) requirements: description: de: | diff --git a/templates/definition/meter/huawei-sun2000-rs485.yaml b/templates/definition/meter/huawei-sun2000-rs485.yaml deleted file mode 100644 index cbe9a66c12..0000000000 --- a/templates/definition/meter/huawei-sun2000-rs485.yaml +++ /dev/null @@ -1,120 +0,0 @@ -template: huawei-sun2000-rs485 -covers: - - huawei-sun2000-8ktl -products: - - brand: Huawei - description: - generic: SUN2000 via RS485 Modbus -params: - - name: usage - choice: ["grid", "pv", "battery"] - - name: modbus - choice: ["rs485", "tcpip"] - baudrate: 9600 - - name: storageunit - type: number - default: 1 - advanced: true - - name: capacity - advanced: true -render: | - type: custom - {{- if eq .usage "grid" }} - power: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 37113 # Grid import export power - type: holding - decode: int32 - scale: -1 - energy: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 37121 # Active energy import from the grid - type: holding - decode: uint32 - scale: 0.01 - currents: - - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 37107 # Huawei phase A grid current - type: holding - decode: int32 - scale: -0.01 - - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 37109 # Huawei phase B grid current - type: holding - decode: int32 - scale: -0.01 - - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 37111 # Huawei phase C grid current - type: holding - decode: int32 - scale: -0.01 - {{- end }} - {{- if eq .usage "pv" }} - power: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 32064 # Input power DC (if no battery in your system - for more precise readings use 32080 # Active generation power AC) - type: holding - decode: int32 - energy: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 32106 # Accumulated energy yield - type: holding - decode: uint32 - scale: 0.01 - {{- end }} - {{- if eq .usage "battery" }} - power: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - {{- if eq .storageunit "1" }} - address: 37001 - {{- end }} - {{- if eq .storageunit "2" }} - address: 37743 - {{- end }} - type: holding - decode: int32nan - scale: -1 - soc: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - {{- if eq .storageunit "1" }} - address: 37004 - {{- end }} - {{- if eq .storageunit "2" }} - address: 37738 - {{- end }} - type: holding - decode: uint16nan - scale: 0.1 - energy: - source: modbus - {{- include "modbus" . | indent 2 }} - 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 - {{- end }} - type: holding - decode: uint32 - scale: 0.01 - capacity: {{ .capacity }} # kWh - {{- end }} diff --git a/templates/definition/meter/huawei-sun2000-dongle-powersensor.yaml b/templates/definition/meter/huawei-sun2000.yaml similarity index 92% rename from templates/definition/meter/huawei-sun2000-dongle-powersensor.yaml rename to templates/definition/meter/huawei-sun2000.yaml index 791455dfb3..2dc79ee1a3 100644 --- a/templates/definition/meter/huawei-sun2000-dongle-powersensor.yaml +++ b/templates/definition/meter/huawei-sun2000.yaml @@ -1,29 +1,32 @@ -template: huawei-dongle-powersensor +template: huawei-sun2000 +covers: ["huawei-dongle-powersensor", "huawei-sun2000-rs485"] products: - brand: Huawei description: - generic: SUN2000 with SDongle & Power Sensor + generic: SUN2000 capabilities: ["battery-control"] requirements: description: de: | - Erfordert "Modbus/TCP". Freischaltung via "Errichterzugang" in den Kommunikationseinstellungen des Wechselrichters. + Grid und Batterie erfordern den PowerSensor. + "Modbus/TCP" erfordert Freischaltung via "Errichterzugang" in den Kommunikationseinstellungen des Wechselrichters. Siehe https://forum.huawei.com/enterprise/en/modbus-tcp-guide/thread/667250677153415168-667213868771979264 en: | - Needs "Modbus/TCP". Activation using "maintenance access" within the communication settings of the inverter. + Grid and Battery require the PowerSensor. + Modbus/TCP requires activation using "maintenance access" within the communication settings of the inverter. See https://forum.huawei.com/enterprise/en/modbus-tcp-guide/thread/667250677153415168-667213868771979264 params: - name: usage choice: ["grid", "pv", "battery"] allinone: true + - name: modbus + choice: ["rs485", "tcpip"] + - name: timeout + default: 15s - name: storageunit type: number default: 1 advanced: true - - name: modbus - choice: ["tcpip"] - - name: timeout - default: 15s - name: capacity advanced: true render: | @@ -162,7 +165,7 @@ render: | set: - source: const value: 2 # discharge - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -171,7 +174,7 @@ render: | encoding: uint16 - source: const value: 0 # duration - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -180,7 +183,7 @@ render: | encoding: uint16 - source: const value: 1 # Minute - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -189,7 +192,7 @@ render: | encoding: uint16 - source: const value: 0 # W - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -202,7 +205,7 @@ render: | set: - source: const value: 1 # charge - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -211,7 +214,7 @@ render: | encoding: uint16 - source: const value: 0 # duration - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -220,7 +223,7 @@ render: | encoding: uint16 - source: const value: 1 # Minute - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -229,7 +232,7 @@ render: | encoding: uint16 - source: const value: 10000 # W - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: @@ -238,7 +241,7 @@ render: | encoding: uint32 - source: const value: 1 # Enable - set: + set: source: modbus {{- include "modbus" . | indent 12 }} register: