Node-red-contrib-modbus no reconnect

Hi,

my Problem my Modbus not reconnect.


I want to implement Modbus devices that can fail for 1 to 2 hours at any time.
After a short time the Modbus client should try to establish a connection to the device. After the reconnect timer has expired, I only get a connection again when I press deploy.

Read this thread .. possibly related.

1 Like

after the connection is lost, the node is in the init status. This status does not change even if the Modbus device can be reached again. The Modbus Node print the Message "Error: Client Not Ready To Read At State init"

  1. lost Connection (I stop the modbus server for a few minutes)
  2. after a short time change to init Status. I start the Modbus server and the status never changes

    As soon as I restart the NodeRed or press the deploy button, everything works normally again (data is retrieved)
    I've already tried increasing the interval of Inject(Timer). However, I couldn't see any improvement

I see you have in your Modbus config the option to "Reconnect on timeout" checked
theoretically it should reconnect.

What nodejs version do you have ?

grafik

ok .. so this is the problem .. you are running Nodejs v14
you have to downgrade to v12 ..
until a fix /update is ready for these Modbus nodes (there is some discussion on the node's github page)


I see the version of Node-red is couple of versions behind
since you are on a Linux based system .. running the official installation script with the --node12 parameter should downgrade your nodejs to 12 and upgrade your Node-red to the latest 2.0.5

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node12

1 Like

Thanks, I change my Version to 12.13.0 and my problem is fixed.
@UnborN Thank you again for your quick help. :slight_smile:

2 Likes

thanks @UnborN - love the way this community really steps up and sorts things out.

1 Like

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