Node-red-contrib-modbus. Cannot recover TCP connection after server rebooting

Hello community.

I have a question about possibility to automatically recover TCP connection after modbus server rebooting.

There is next situation: Where I deploy the flow, all work good (TCP connection is set, client can read data from server via modbus protocol). But when I reboot the server, TCP connection falls and did't recover when TCP server is in network. To solve this problem I should deploy flow again. After this all work good until next server rebooting.

It seems to me it is internal bug of node-red-contrib-modbus lib. When modbus client node cannot connect to modbus server, it try to do again in specified time interval (according to checkbox in node parameters). But it try to do that only one time (not periodically). If second connection attempt was unsuccessful, node is set to "error mode" and does not work until next flow deployement.

I read similar topic:

but I did't find solution there. Any ideas about it ?

One more thing. There is something similar when work with modbus RTU connection. When I disconnect slave deivce whole Node-RED goes down and I should start it again (Node-RED server runs on Windows10 64bit - probalbly it can be a reason of these problems??)

I think this is a know issue Modebus-Flex-Getter Node stops working every few hours - "initialize" Reopened · Issue #246 · BiancoRoyal/node-red-contrib-modbus · GitHub

I cannot find solution of this issue there. Only description. Will it be fixed in next version of library ? Or there is some work-around I should use to solve this problem ?

The issue is still "open" (so not fixed).

Whether it gets fixed is down to the author. If you can add info to the issue it may help the author fix issue faster.

Thank you for your help. I am new in Node-RED forum. So, there are a lot of thing here I don't know.

Hello.
I have the same problem.
I use Modbus Flex Server. (TCP/IP)
When I deploy / restart NodeRed the client connects to server.
If I reboot home router, the connection fails.
For client to connect, I have to deploy / restart NodeRed flows.
Did you find any sollution?
Thanks.

Yes. The problem was in Node.js version. You should use recommended version of this software instead of latest. More information you can find here:

https://nodered.org/docs/faq/node-versions

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.