From 49d1e32b98ff6e120483a8e58ba08a1ca401a2fb Mon Sep 17 00:00:00 2001 From: thse22 <140459518+thse22@users.noreply.github.com> Date: Fri, 12 Apr 2024 08:35:28 +0200 Subject: [PATCH] FoxESS H3: add battery control (#13368) --- templates/definition/meter/fox-ess-h3.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/templates/definition/meter/fox-ess-h3.yaml b/templates/definition/meter/fox-ess-h3.yaml index 48a7313e9..1deb6025e 100644 --- a/templates/definition/meter/fox-ess-h3.yaml +++ b/templates/definition/meter/fox-ess-h3.yaml @@ -3,12 +3,22 @@ products: - brand: FoxESS description: generic: H3 Series Hybrid Inverter +capabilities: ["battery-control"] params: - name: usage choice: ["grid", "pv", "battery"] - name: modbus choice: ["rs485", "tcpip"] id: 247 + - name: capacity + advanced: true + # battery control + - name: minsoc + type: number + advanced: true + - name: maxsoc + type: number + advanced: true render: | type: custom {{- if eq .usage "grid" }} @@ -77,4 +87,17 @@ render: | address: 31038 # Soc type: holding decode: int16 + limitsoc: + source: convert + convert: float2int + set: + source: modbus + {{- include "modbus" . | indent 4 }} + register: + address: 41009 # limit soc + type: writesingle + decode: uint16 + capacity: {{ .capacity }} # kWh + minsoc: {{ .minsoc }} # % + maxsoc: {{ .maxsoc }} # % {{- end }}