There was a post of the same name in Aug 2021 regarding a problem in accessing COM4 on a Windows PC. In that case, the issue turned out to be that the COM port was already being used by an Arduino node and was thus not available, resulting in the error shown in the title. This was proven by going to the .node-red folder and listing the serial port. It showed the port in use by an arduino node and the issue was solved by deleting the arduino node from the flow.
I get the same listing of an arduino node using COM4, i.e.:
My problem is that I DO NOT have an arduino node in my flow and it is the only flow open in node-red, so there is no arduino node to delete ?? Any suggestions on how to get around this are appreciated. Thanks
flows.json (30.7 KB)
I have attached the flows I am working with. The flow uses a Windows 11 COM port to send commands to a Logitech DTS-6 Coax Switch (lower flow) and then decodes the response from the DTS-6 to confirm that the desired action happened and is properly displayed in the dashboard (upper flow). [Note this flow is from a published file on this site by another contributor, but updated for Dashboard 2.0]
In order to establish a serial connection to the DTS-6, I am using an FTDI based USB to serial converter connected to the control port on the DTS-6. The node-red flow is set to COM 4 and and is configured to match the required baud rate and parameters. The device manager confirms that COM 4 is set correctly and is working properly.
In the original Aug 2021 post with similar issue / same title that I referenced earlier, it was suggested that the npm list serialport showed the nodes using COM ports, and that an arduino node was already using COM 4. When the poster deleted that Arduino node from his flow, the serialport node then worked correctly with his COM port.
Unfortunately, I do not have an arduino node in my flows, and there are no other node-red instances open in the browser I am using (Firefox) and my other open browser, (Chrome).
Did you add an Arduino node at one point? Maybe there is a config node left behind? Did you check the right hand sidebar configs for and unused Arduino (or other serial type) config node?
I did not create any arduino nodes with these flows and there is nothing related to arduino in the configuration nodes.
From "Stephen McLaughlin via Node-RED Forum" <notifications@nodered.discoursemail.com>
To randyholl@mchsi.com
Date 7/4/2025 1:27:05 AM
Subject [Node-RED Forum] [General] Serial port COM4 error: Error: Opening COM4: File not found - 2