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