From 8a800497004bdef02bf29ab5836c0140eef0006d Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Tue, 9 May 2023 14:40:53 +0200 Subject: [PATCH] Add SMA WebBox (#7865) --- templates/definition/meter/sma-webbox.yaml | 35 ++++++++++++++++++++++ templates/docs/meter/sma-webbox_0.yaml | 15 ++++++++++ 2 files changed, 50 insertions(+) create mode 100644 templates/definition/meter/sma-webbox.yaml create mode 100644 templates/docs/meter/sma-webbox_0.yaml diff --git a/templates/definition/meter/sma-webbox.yaml b/templates/definition/meter/sma-webbox.yaml new file mode 100644 index 000000000..409334b52 --- /dev/null +++ b/templates/definition/meter/sma-webbox.yaml @@ -0,0 +1,35 @@ +template: sma-webbox +products: + - brand: SMA + description: + generic: WebBox +params: + - name: usage + choice: ["pv"] + allinone: true + - name: modbus + choice: ["tcpip"] + port: 502 + id: 2 + help: + en: The Modbus TCP-Server needs to be enabled on this WebBox + de: Der Modbus TCP-Server muss auf dieser WebBox aktiviert sein +render: | + type: custom + {{- if eq .usage "pv" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: # manual non-sunspec register configuration + address: 30775 # Pac + type: holding + decode: int32nan + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: # manual non-sunspec register configuration + address: 30513 # E-Total + type: holding + decode: uint64nan + scale: 0.001 + {{- end }} diff --git a/templates/docs/meter/sma-webbox_0.yaml b/templates/docs/meter/sma-webbox_0.yaml new file mode 100644 index 000000000..2d6962964 --- /dev/null +++ b/templates/docs/meter/sma-webbox_0.yaml @@ -0,0 +1,15 @@ +product: + brand: SMA + description: WebBox +render: + - usage: pv + default: | + type: template + template: sma-webbox + usage: pv + + # Modbus TCP + modbus: tcpip + id: 2 + host: 192.0.2.2 # Hostname + port: 502 # Port