From c22886f209ec32b6aec941a9cbdb616db1f9374d Mon Sep 17 00:00:00 2001 From: deadrabbit87 Date: Thu, 28 Nov 2024 11:30:37 +0100 Subject: [PATCH 1/4] Create kostal-plenticore-HW0200.yaml --- .../meter/kostal-plenticore-HW0200.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 templates/definition/meter/kostal-plenticore-HW0200.yaml diff --git a/templates/definition/meter/kostal-plenticore-HW0200.yaml b/templates/definition/meter/kostal-plenticore-HW0200.yaml new file mode 100644 index 0000000000..7ef256dea6 --- /dev/null +++ b/templates/definition/meter/kostal-plenticore-HW0200.yaml @@ -0,0 +1,116 @@ +template: kostal-plenticore-HW0200 +products: + - brand: Kostal + description: + generic: Plenticore Hybrid (Gen2) +capabilities: ["battery-control"] +linked: + - template: kostal-ksem-inverter + usage: grid + - template: kostal-ksem + usage: grid + excludetemplate: kostal-ksem-inverter +covers: ["kostal-plenticore-gen2"] +requirements: + description: + de: | + Nur ein System kann und darf auf den Wechselrichter zugreifen! Für die aktive Batteriesteuerung muss die externe Batteriesteuerung über Modbus mit dem Handwerkerzugang aktiviert sein. Das Netzladen steht mit dieser Vorlage zur Verfügung, ist aktuell jedoch inkompatibel mit Wechselrichtern der HW-Version 0100). + en: | + Only a single system may access the inverter! For active battery control, the external battery control via Modbus must be activated using installer access. The function for grid charging the battery is available using this template, but is currently incompatible with inverters of HW version 0100. +params: + - name: usage + choice: ["pv", "battery"] + allinone: true + - name: modbus + choice: ["tcpip"] + id: 71 + port: 1502 + - name: endianness + description: + de: Byte-Reihenfolge (Little/Big) + en: Endianness (Little/Big) + validvalues: ["big", "little"] + default: little + advanced: true + - name: capacity + advanced: true + - name: maxacpower + # battery control + - name: watchdog + type: duration + default: 60s + advanced: true +render: | + {{- if eq .usage "pv" }} + type: custom + power: + source: calc + add: # The add plugin sums up all string values + - source: sunspec + {{- include "modbus" . | indent 4 }} + value: 160:1:DCW # string 1 + - source: sunspec + {{- include "modbus" . | indent 4 }} + value: 160:2:DCW # string 2 + - source: sunspec + {{- include "modbus" . | indent 4 }} + value: 160:3:DCW # string 3 + energy: + source: sunspec + {{- include "modbus" . | indent 2 }} + value: 103:WH # total yield + scale: 0.001 + maxacpower: {{ .maxacpower }} # W + {{- end }} + {{- if eq .usage "battery" }} + type: custom + power: + source: sunspec + {{- include "modbus" . | indent 2 }} + value: 802:W # 802 battery control + soc: + source: sunspec + {{- include "modbus" . | indent 2 }} + value: 802:SoC # 802 battery control + batterymode: + source: watchdog + timeout: {{ .watchdog }} # re-write at timeout/2 + reset: 1 # reset watchdog on normal + set: + source: switch + switch: + - case: 1 # normal + set: + source: const + value: 0 # % (set once to reset from forced charge) + set: + source: modbus + {{- include "modbus" . | indent 10 }} + register: + address: 1028 # battery charge current (DC) setpoint, relative [%] + type: writemultiple + encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} + - case: 2 # hold + set: + source: const + value: 0 # % + set: + source: modbus + {{- include "modbus" . | indent 10 }} + register: + address: 1028 # battery charge current (DC) setpoint, relative [%] + type: writemultiple + encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} + - case: 3 # charge + set: + source: const + value: -100 # % + set: + source: modbus + {{- include "modbus" . | indent 10 }} + register: + address: 1028 # battery charge current (DC) setpoint, relative [%] + type: writemultiple + encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} + capacity: {{ .capacity }} # kWh + {{- end }} From 9bf4df821cec711a2a157d7c1ebb15a0e361714d Mon Sep 17 00:00:00 2001 From: deadrabbit87 Date: Thu, 28 Nov 2024 11:34:21 +0100 Subject: [PATCH 2/4] Update kostal-plenticore.yaml --- templates/definition/meter/kostal-plenticore.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/definition/meter/kostal-plenticore.yaml b/templates/definition/meter/kostal-plenticore.yaml index ec0e631357..d60c3553ae 100644 --- a/templates/definition/meter/kostal-plenticore.yaml +++ b/templates/definition/meter/kostal-plenticore.yaml @@ -13,9 +13,9 @@ linked: requirements: description: de: | - Nur ein System kann und darf auf den Wechselrichter zugreifen! Für die aktive Batteriesteuerung muss die externe Batteriesteuerung über Modbus mit dem Handwerkerzugang aktiviert sein. Netzladen ist nicht verfügbar. + Nur ein System kann und darf auf den Wechselrichter zugreifen! Für die aktive Batteriesteuerung muss die externe Batteriesteuerung über Modbus mit dem Handwerkerzugang aktiviert sein. Diese Vorlage ist für Wechselrichter mit der HW Version 0100. Netzladen steht nicht zur verfügung. en: | - Only a single system may access the inverter! For active battery control, the external battery control via Modbus must be activated using installer access. Grid charging is not available. + Only a single system may access the inverter! For active battery control, the external battery control via Modbus must be activated using installer access. This template is for inverters with HW version 0100. Grid charging is not available. params: - name: usage choice: ["pv", "battery"] From e70c38cebd47e1ef5c9a65afcb47e37bcaf5d1f9 Mon Sep 17 00:00:00 2001 From: deadrabbit87 Date: Thu, 28 Nov 2024 11:36:14 +0100 Subject: [PATCH 3/4] Delete templates/definition/meter/kostal-plenticore-gen2.yaml --- .../meter/kostal-plenticore-gen2.yaml | 115 ------------------ 1 file changed, 115 deletions(-) delete mode 100644 templates/definition/meter/kostal-plenticore-gen2.yaml diff --git a/templates/definition/meter/kostal-plenticore-gen2.yaml b/templates/definition/meter/kostal-plenticore-gen2.yaml deleted file mode 100644 index 5c2d6083ca..0000000000 --- a/templates/definition/meter/kostal-plenticore-gen2.yaml +++ /dev/null @@ -1,115 +0,0 @@ -template: kostal-plenticore-gen2 -products: - - brand: Kostal - description: - generic: Plenticore Hybrid (Gen2) -capabilities: ["battery-control"] -linked: - - template: kostal-ksem-inverter - usage: grid - - template: kostal-ksem - usage: grid - excludetemplate: kostal-ksem-inverter -requirements: - description: - de: | - Nur ein System kann und darf auf den Wechselrichter zugreifen! Für die aktive Batteriesteuerung muss die externe Batteriesteuerung über Modbus mit dem Handwerkerzugang aktiviert sein. Das Netzladen steht mit dieser Vorlage zur Verfügung, ist aktuell jedoch inkompatibel mit Gen.1 Wechselrichtern (z.B. HW-Version 0100). - en: | - Only a single system may access the inverter! For active battery control, the external battery control via Modbus must be activated using installer access. The function for grid charging the battery is available using this template, but actually incompatible with Gen.1 inverters (e.g. HW version 0100). -params: - - name: usage - choice: ["pv", "battery"] - allinone: true - - name: modbus - choice: ["tcpip"] - id: 71 - port: 1502 - - name: endianness - description: - de: Byte-Reihenfolge (Little/Big) - en: Endianness (Little/Big) - validvalues: ["big", "little"] - default: little - advanced: true - - name: capacity - advanced: true - - name: maxacpower - # battery control - - name: watchdog - type: duration - default: 60s - advanced: true -render: | - {{- if eq .usage "pv" }} - type: custom - power: - source: calc - add: # The add plugin sums up all string values - - source: sunspec - {{- include "modbus" . | indent 4 }} - value: 160:1:DCW # string 1 - - source: sunspec - {{- include "modbus" . | indent 4 }} - value: 160:2:DCW # string 2 - - source: sunspec - {{- include "modbus" . | indent 4 }} - value: 160:3:DCW # string 3 - energy: - source: sunspec - {{- include "modbus" . | indent 2 }} - value: 103:WH # total yield - scale: 0.001 - maxacpower: {{ .maxacpower }} # W - {{- end }} - {{- if eq .usage "battery" }} - type: custom - power: - source: sunspec - {{- include "modbus" . | indent 2 }} - value: 802:W # 802 battery control - soc: - source: sunspec - {{- include "modbus" . | indent 2 }} - value: 802:SoC # 802 battery control - batterymode: - source: watchdog - timeout: {{ .watchdog }} # re-write at timeout/2 - reset: 1 # reset watchdog on normal - set: - source: switch - switch: - - case: 1 # normal - set: - source: const - value: 0 # % (set once to reset from forced charge) - set: - source: modbus - {{- include "modbus" . | indent 10 }} - register: - address: 1028 # battery charge current (DC) setpoint, relative [%] - type: writemultiple - encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} - - case: 2 # hold - set: - source: const - value: 0 # % - set: - source: modbus - {{- include "modbus" . | indent 10 }} - register: - address: 1028 # battery charge current (DC) setpoint, relative [%] - type: writemultiple - encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} - - case: 3 # charge - set: - source: const - value: -100 # % - set: - source: modbus - {{- include "modbus" . | indent 10 }} - register: - address: 1028 # battery charge current (DC) setpoint, relative [%] - type: writemultiple - encoding: {{ if (eq .endianness "big") }}float32{{ else }}float32s{{ end }} - capacity: {{ .capacity }} # kWh - {{- end }} From 1025a2101e53c64682178aae0f2258335f7bca1d Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 29 Nov 2024 09:21:31 +0100 Subject: [PATCH 4/4] Update templates/definition/meter/kostal-plenticore-HW0200.yaml --- templates/definition/meter/kostal-plenticore-HW0200.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/meter/kostal-plenticore-HW0200.yaml b/templates/definition/meter/kostal-plenticore-HW0200.yaml index 7ef256dea6..a015d922f6 100644 --- a/templates/definition/meter/kostal-plenticore-HW0200.yaml +++ b/templates/definition/meter/kostal-plenticore-HW0200.yaml @@ -1,4 +1,4 @@ -template: kostal-plenticore-HW0200 +template: kostal-plenticore-hw0200 products: - brand: Kostal description: