Just tried that. No incoming data anymore whatsoever.
I guess that’s normal, as the boiler is a Mdobus RTU device and not ModbusTCP.
So I am just tunneling RTU over TCP.
The hardware (bridge device or the cabling) is not the issue : as you see in my example, the modbus-communication works correctly from a 3rd party application. It’s not working correctly from HA.
Apparently the Modbus implementation of my boiler is a custom implementation (too many response bytes).
I want to solve it by treating it as a TCP sensor and not a Modbus sensor.
I just don’t know how to configure the template, so that it uses the 3rd and 4th byte as an INT, which is the requested temperature (x10).
The command to query the modbus register is fixed.
So I have :
- platform: tcp
name: Test temperatuur boven
host: 192.168.2.245
port: 20108
timeout: 5
payload: "\x0a\x03\x00\x12\x00\x01\x25\x74"
value_template: ?????
Can I enter the payload like this (in hex bytes)?
How do I enter the value_template to evaluate bytes 3 and 4?
Wrote a custom app that sits between the modbus communication from HA to boiler. It acts as a TCP socket and TCP server. It chops the zeros of when needed. Working fine…