node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

Same Serial Port Connected in Two Flow files Not working while disabling one of the flow

Open avinash-choudhary opened this issue 4 years ago • 1 comments

Hi Team

I am trying to add COM2 in two flow files Flow1 and Flow2. The data is displayed in both flows initially . But when we disable and enable Flow1 then the Flow2 serial port is not displaying the data though it displays connected .

FLOW1

Screenshot 2021-06-17 at 11 21 48 AM

FLOW2

Screenshot 2021-06-17 at 11 21 52 AM

Initial Debug Message

fa26bb56cd1955edf7a859a34777eec8ad255d80

Disable and enable FLOW2 from postman

Screenshot 2021-06-17 at 11 25 22 AM e7b80a9f641020fdbd26a054024567a9a39e48f7_2_1284x1000

Debug Message after disable and enable

Screenshot 2021-06-17 at 11 25 38 AM

As u noticed the Flow1 Data is not displaying in the Debug Window though both flows are connected

Node-RED version: v1.2.6 Node.js version: v15.5.0 npm version: 7.3.0 Platform/OS: Windows 10 Browser: Chrome

avinash-choudhary avatar Jul 12 '21 06:07 avinash-choudhary

You should think about serial port nodes as if they are real serial ports - you can't plug two cables into one socket. While in theory what you have may work indeed if you disable one, then the behaviour of the other may well be affected. It would be cleaner to have one single com2 node and then use link nodes to fork the messages to another tab in Node-RED.

I must admit I thought this came up fairly recently and at the time I tested it with Nodejs14 and latest Node-RED 1.3.5 it did work correctly but I can't find that issue or forum post right now.

dceejay avatar Jul 12 '21 13:07 dceejay