So there were limited options for cross OS compatible ways to handle this. In the future I may implement a server option instead of having node-red act as a client to the Ethernet Modem.
Currently when you update to @ncd-io/node-red-enterprise-sensors v2.1.1, refresh your page, and edit your TCP connection you’ll see a new option “Socket Timeout *Experimental”. activating this and setting a timeout will automatically resolve the issue you’re seeing, but there will still be a delay (granted not a delay of 2 hours as is the case for default keepalive timeouts). This functionality will be improved in the future.
Let me know if you run into any issues with this update or communications still have problems.
I’m currently using ncd-red-wireless-2 so maybe this is part of the issue? I’ll look at migrating to the enterprise-sensors module so I can try this new option. Is this an easy migration to do?
It should be. Its been a while since I’ve done it, but all the machine names match up so it should be a matter of uninstalling ncd-red-wireless-2 and installing @ncd-io/node-red-enterprise-sensors library.
I would recommend backing up your all flows in Node-Red before the switch just in case and marking down what version of the ncd-red-wireless-2 library you’re using.
Its recommended to use the command line. Open a new terminal/command line and use these commands:
cd .node-red
npm uninstall ncd-red-wireless-2
npm install @ncd-io/node-red-enterprise-sensors
Then you’ll want to restart node-red.
If you’re using Windows you might need to use chdir .node-red instead of cd. Some versions of windows support cd, other don’t.
If anything goes wrong you can just reverse the commands:
cd .node-red
npm uninstall @ncd-io/node-red-enterprise-sensors
npm install ncd-red-wireless-2@x.x.x
x.x.x would be the version number that you previously had installed. You can leave it off to install the latest version.