we use TRB 255’s to send modbus commands to various brands of solar inverters via mqtt (TCP and RTU).
In some cases we have this issue:
if we read the registers locally, via the TRB UI, we get a response, but if we try to read the same registers remotely via mqtt we get only errors. Can someone explain this behaviour? It’seems that the process of converting the mqtt commands to the modbus protocol causes this…
i’ve written about a similar issue in the past and with your help we managed to find a workaround (which involved sending som initialisation commands before the read/write request), altough that time the issue was only present when using modbus TCP.
There’s a similar workaround also for a RTU connecction?
{
“cookie” : 65432,
“success” : false,
“error” : “read register failure - Response not from requested slave”
}
I tried to replicate this behaviour using the modbus gateway restart Shell command, but in this case without luck.
As i said before, i think the issue is in the way the mqtt payload gets redirected to the modbus slave.
We had a similar issue with another brand of inverter (but on modbus TCP) and the solution was to initialize the connection before a request, something like this:
Open new connection example
2 65555 0 0 0 192.168.1.10 502 10
<ip, ipv6>
natural number 0-7
0 - open closed connection or reopen, 1 - close connection, 2 - is a status request.
- IPv4 = 0, IPv6 = 1
Does anyone know if a similar workaround could be used also on RTU?