node-red-nodes
node-red-nodes copied to clipboard
serialport node hangs after some time (no input from/no output to serial device)
Which node are you reporting an issue on?
node-red-node-serialport
What are the steps to reproduce?
- Arduino Uno with sketch, that writes every 30 seconds sensor data via serial.write
- Arduino is connected via USB cable, Port is ACM0
- Arduino LED 13 blinks every second, so its possible to see if the controller is crashed or not
What happens?
After some time (30 minutes or 12 hours or 2 days, interval is not the same) in node-red is no data available. The arduino LED 13 blinks. To solve the problem its possible
- to disconnect the arduino for a short time (disconnect the usb cable, connect the cable)
- redeploy the flow After that, everything is fine until the next crash.
In case of the "crash" there is via dmesg no entrie available, that the usb port is disconnected
What do you expect to happen?
It would be nice, if its possible to reset the serial connection via a node. So its possible to create a flow to check the last time a message arrived. If > 60 seconds reset the connection.
Please tell us about your environment:
-
[ ] Node-RED version: 0.18.5
-
[ ] node.js version: 6.14.3
-
[ ] npm version: 3.10.10
-
[ ] Platform/OS: Linux Debian Jessie
-
[ ] Browser: Chrome
which version of the serialport node do you have installed ?
Same problem. Just installed everything today, so serialport is 0.10.0
(off the installler) and Node-RED is 1.0.4
. Similar discussion here.
I'm having similar issue. I configured a 3G USB dongle to send SMS from a Raspberry but I cannot get the data in Node Red for serial in node, data which is available in putty
And here the configuration from Node Red
When I created first time the flow everything worked, even RSSI data was received in Node Red bu suddenly the data stop arriving in Node Red Serial-In. Any idea where can be the issue? I've restarted Node-Red, disconnect and reconnect the 3G dongle but without success.
Only one device can access the port at a time - please ensure that no other application has grabbed the port first. Also check that it hasn't moved to say ttyUSB4 for some reason.
Finally - please try to use the Node-RED discourse forum for general how-to type questions as there will be a much wider audience who may be able to help you.
The problem still exist. The serial port connects, register some data, and timeout. In the past (5 years ago, didn't have any version number) the serial port was reconnecting when there was a new message arrived. But now the node simply stay dead until i redeploy.
So please add a function to reconnect by the flow.
Hi. I have this problem for ages!!! I use nodered in Windows for about 3 years and always keep it up to date. I have several serial devices connected to an ethernet serial server (Digi Etherlite 32). I use other software like eventghost and home assistant without any problems but nodered keeps failing. Like some user said...it can last 2 hours, 2 days, one week....but eventually fails. And when it fails....only a restart flows command will bring to life. It seems that serialport is unreliable. Any log or setting that I can supply for debug?
Which version of the serialport node are you using ? The latest version accepts a payload that can have an optional enabled
property (boolean true or false) - that can be used to stop and restart the port dynamically.
I was using 1.0.1. I've just updated to 2.0.2. Restarting the port should not be needed in first place.
I'll see how this version behaves.
Thanks.
We know it "shouldn't be needed" - but until we can reliably find the source of the bug and whether it is in our code, the underlying library, some combination of driver, os, hardware then sadly that is where we are.
Thanks. I'll let you know if it fails again.
I have the same problem: the node stops receiving data from the serial even though the Arduino is still running perfectly; if in the middle of some data record, resetting the Arduino will cost me lots of money as I must start the experiment over.
Same Issue: Openwrt 19.07.7 NPM 6.14.18 Node.js v14.19.3 Node-Red 2.2.2 node-red-node-serialport 1.0.1
Node hangs after 1, 2 or more weeks, period cannot be reproduced. If I address the serial port directly via Openwrt CLI, the data still arrives. So it's not the system's fault.
I'm upgrading to node-red-node-serialport v1.0.4 on Wednesday and will report if it breaks
I have a similar issue where data stops arriving after a few hours, can sometimes be days. Restarting the nodered.service fixes the issue.
I may need to auto restart the service every x hours
I was using 1.0.1. I've just updated to 2.0.2. Restarting the port should not be needed in first place.
I'll see how this version behaves.
Thanks.
Been using it since and it hasn't failed yet. Hope it keeps this way. :)
I've recently updated and it's gone from every few days to every few hours, it's worse than ever.
Also now a restart of the service won't help it needs a system reboot
I've recently updated and it's gone from every few days to every few hours, it's worse than ever.
Also now a restart of the service won't help it needs a system reboot
Which Version do you use before and after the Update?
I'm not sure on the previous version but I'm using the current version that the raspberry pi script pulls from the node red site.
Same Issue: Openwrt 19.07.7 NPM 6.14.18 Node.js v14.19.3 Node-Red 2.2.2 node-red-node-serialport 1.0.1
Node hangs after 1, 2 or more weeks, period cannot be reproduced. If I address the serial port directly via Openwrt CLI, the data still arrives. So it's not the system's fault.
I'm upgrading to node-red-node-serialport v1.0.4 on Wednesday and will report if it breaks
I have had two test devices running 1.0.4 since March 21st, and the node on one of them crashed again yesterday afternoon.