SAX: fix uint offsets and modbus id (#6724)

This commit is contained in:
premultiply 2023-03-09 18:31:13 +01:00 • committed by GitHub
parent 1ae60cd823
commit a0072f2b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 16 deletions

View file

@ -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 }}

View file

@ -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