diff --git a/templates/definition/meter/sax.yaml b/templates/definition/meter/sax.yaml index b2f09b441..e6f994e57 100644 --- a/templates/definition/meter/sax.yaml +++ b/templates/definition/meter/sax.yaml @@ -9,27 +9,36 @@ params: - name: modbus choice: ["tcpip"] port: 3600 + id: 64 render: | type: custom {{- if eq .usage "grid" }} power: - source: modbus - {{- include "modbus" . | indent 2 }} - # register details - register: - address: 48 # Leistung des Smartmeters - type: holding - decode: int16 + source: calc + add: + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 48 # Leistung des Smartmeters + type: holding + decode: uint16 + - source: const + value: -16384 {{- end }} {{- if eq .usage "battery" }} power: - source: modbus - {{- include "modbus" . | indent 2 }} - # register details - register: - address: 47 # Leistung P vom Speicher. (Messwert) - type: holding - decode: int16 + source: calc + add: + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 47 # Leistung P vom Speicher. (Messwert) + type: holding + decode: uint16 + - source: const + value: -16384 soc: source: modbus {{- include "modbus" . | indent 2 }} diff --git a/templates/docs/meter/sax_0.yaml b/templates/docs/meter/sax_0.yaml index 7c159ec7f..5b25b3399 100644 --- a/templates/docs/meter/sax_0.yaml +++ b/templates/docs/meter/sax_0.yaml @@ -10,7 +10,7 @@ render: # Modbus TCP modbus: tcpip - id: 1 + id: 64 host: 192.0.2.2 # Hostname port: 3600 # Port - usage: battery @@ -21,6 +21,6 @@ render: # Modbus TCP modbus: tcpip - id: 1 + id: 64 host: 192.0.2.2 # Hostname port: 3600 # Port