Hi folks,
5 Aug 22:10:48 - [info] Node-RED version: v1.3.5
5 Aug 22:10:48 - [info] Node.js version: v12.22.1
5 Aug 22:10:48 - [info] Linux 5.10.17-v7+ arm LE
5 Aug 22:10:49 - [info] Loading palette nodes
5 Aug 22:10:54 - [info] Dashboard version 2.29.1 started at /ui
I'm working on a reasonable sized project for my day job, it's heavily reliant on RS485 communications to a proprietary device for production line testing purposes, in simple terms I've built a piece of test equipment and I'm writing some Node Red to control it.
So I've been having some intermittent serial in/serial out comms issues. This is RS485 using some USB-RS485 adapters I have been using for years with LabVIEW without any problems. It's not a USB device issue, I'm 99.9% certain of that.
There are a couple of complications I have had to/chosen to try and handle;
- firstly - when the device I'm connecting to boots up it sends a couple of lines of strings out via the RS485 port
- secondly - to make some reusable code and to handle all the different commands I need to send via the RS485 I created a sub-flow with pre-configured environmental variables
My sub flow was designed using the serial request node, this worked but couldn't handle the boot up strings, and I eventually got intermittent issues. So I re-worked this to have a serial in node in my main flow and a serial out in my sub-flow, this also worked for a while, the boot up messages were handled and the replies to my sent serial commands worked OK as well . . . but again intermittently I would get issues and timeouts when the comms started failing. If I went in and deleted the serial port settings from both nodes and recreated them things would start working again.
Then during a re-start of my Raspberry pi and restart of Node Red I noticed the following in the console window:
5 Aug 22:10:55 - [info] Starting flows
5 Aug 22:10:56 - [info] Started flows
(node:937) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:937) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 closed listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
5 Aug 22:10:56 - [info] [serialconfig:a735c45c.b4efd8] serial port /dev/ttyUSB0 opened at 115200 baud 8N1
I've managed to get rid of these memory leak messages by disabling the serial in and serial out nodes . . . further more they come back when I enable the serial out node in the sub-flow and Deploy . . .
6 Aug 16:58:37 - [info] Starting modified nodes
6 Aug 16:58:38 - [info] Started modified nodes
(node:936) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:936) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 closed listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
I really don't understand what is happening, maybe this is happening because I'm using serial out from a sub-flow ?
I'm meant to be on holiday this week but have been working on this project from home to try and catch up . . . I'm getting very delayed due to this problem, any help any can give would be a big help.
kind regards,
Simon G