Modbus values goes zero after change and deploy

Hello everyone,
I'm new to node-red and i want to use it for modbus values / store / preview / dashboard.

there is a strange behavior and i don't know if i'm missing something or is some kind of bug.
as you can see here, i'm polling 20 values from localhost modbus tcp server, with some values already exist and coming through.

But, when i make any change on node-red flow and click deploy to register the change, the values of the modbus poll goes zero:

This becomes even more strange, when i check the localserver with another modbus tcp client, and saw that the values are really still on the modbus server !

the only way to restore the modbus poll correctly, is by restarting node-red instance from the command line. (ctrl+c -> and then : node-red)

I'm running the node-red locally on win10 pro, installed with the official method in documentation. Any comments appreciated.

Are you using full deploy?

There are 3 modes of deployment:

  • Full (all nodes are effectively destroyed and everything is recreated (including comms connections) - regardless of only modifying a single node)
  • Flows (all nodes connected by wires destroyed and recreated)
  • Node (Only modified nodes are destroyed and recreated)

While a full deploy should not break the modbus node - there may be a bug. Therefore doing only a nodes deploy will avoid unnecessary rebuilds & may avoid the issue.

Hello Stephen @Steve-Mcl ,

i tried all the possible deploy options below:

the only thing that is working is restarting node-red from command line.

I meant, use nodes deploy to avoid the modbus nodes being affected by your updates.

Just found the bug. This issue happening when node-red has modbus tcp server on some flow , and the same node-red instance running a modbus tcp client blocks.
I tried the same thing with another modbus tcp server , and the client behaves ok , after changes and deploy. This happening when modbus tcp server exists in node-red, even in different flow.

Is there an official bug reporting method to act on it ?

The node's page on the node red flows page (node-red-contrib-modbus (node) - Node-RED) has a link (on the right had side) to the nodes github page where you can select the Issues tab and add a new issue (after checking to see if there is already one there that covers your case).