From 15dc29241a91a77447d95f393a682e768ffdb59b Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Tue, 11 Mar 2025 20:30:22 +0100 Subject: [PATCH] Solax: add mppt3 & active battery control (#19659) --- templates/definition/meter/solax.yaml | 46 ++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/templates/definition/meter/solax.yaml b/templates/definition/meter/solax.yaml index f8cc2ba49..0f0ff527d 100644 --- a/templates/definition/meter/solax.yaml +++ b/templates/definition/meter/solax.yaml @@ -15,9 +15,16 @@ params: - name: modbus choice: ["rs485", "tcpip"] baudrate: 19200 + - name: mppt3 + type: bool + default: false + description: + de: "Der Wechselrichter hat einen dritten PV-Eingang (MPPT3)" + en: "The inverter has a third PV input (MPPT3)" - name: storageunit type: int - deprecated: true + default: 1 + advanced: true - name: capacity advanced: true - name: maxacpower @@ -30,7 +37,7 @@ render: | {{- if eq .usage "grid" }} source: modbus {{- include "modbus" . | indent 2 }} - register: # manual non-sunspec register configuration + register: address: 70 # 0x0046 feedin_power(meter) type: input decode: int32s @@ -38,7 +45,7 @@ render: | energy: source: modbus {{- include "modbus" . | indent 2 }} - register: # manual non-sunspec register configuration + register: address: 74 # 0x004A consum_energy_total(meter) type: input decode: uint32s @@ -49,20 +56,28 @@ render: | add: - source: modbus {{- include "modbus" . | indent 4 }} - register: # manual non-sunspec register configuration + register: address: 10 # 0x000A Powerdc1 type: input decode: uint16 - source: modbus {{- include "modbus" . | indent 4 }} - register: # manual non-sunspec register configuration + register: address: 11 # 0x000B Powerdc2 type: input decode: uint16 + {{- if eq .mppt3 "true" }} + - source: modbus + {{- include "modbus" . | indent 4 }} + register: + address: 292 # 0x0124 Powerdc3 + type: input + decode: uint16 + {{- end }} energy: source: modbus {{- include "modbus" . | indent 2 }} - register: # manual non-sunspec register configuration + register: address: 148 # 0x0094 SolarEnergyTotal type: input decode: uint32s @@ -72,8 +87,12 @@ render: | {{- if eq .usage "battery" }} source: modbus {{- include "modbus" . | indent 2 }} - register: # manual non-sunspec register configuration + register: + {{- if eq .storageunit "1" }} address: 22 # 0x0016 Batpower_Charge1 + {{- else }} + address: 297 # 0x0129 Batpower_Charge2 + {{- end }} type: input decode: int16 scale: -1 @@ -81,9 +100,20 @@ render: | source: modbus {{- include "modbus" . | indent 2 }} register: - address: 28 # 0x001C Battery Capacity + {{- if eq .storageunit "1" }} + address: 28 # 0x001C Battery 1 Capacity + {{- else }} + address: 301 # 0x012D Battery 2 Capacity + {{- end }} type: input decode: uint16 + # energy: + # source: modbus + # register: + # address: 29 # 0x001D Battery Output Energy Total + # type: input + # decode: uint32s + # scale: 0.1 batterymode: source: switch switch: