-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Serial port becomes unusable until node-red restart w/ newer versions #288
Comments
This package doesn't do anything with the serial port - other then list what's available on the system- it's all managed by the zwave-js library, that this module uses, and zwave-js is using the popular
Log file please to capture all events leading up to and including this event - you can enable logging in the Controller Node (set to Please don't edit the log file - just upload the file as is. whilst I wait for the log file, I'll ping @AlCalzone, to see if he has any immediate input with any known issues with Node 20 and the This module will bring down the driver (and in doing so, will release the serial port - see below) - so my guess is, this is an issue with
|
No known issues from my side, but the linked issue seems to be a reasonable explanation for the behavior. Does the node-red serialport plug in also use this library? |
it does |
Everything is being closed down according to log.
|
It may be the case that whatever is wrong is something that was fixed by whoever maintains node-red-node-serialport - as I mentioned, when I upgraded that the problem with port locks that use that node went away. fyi I actually walked the version of node-red-node-serialport upwards 'til the problem went away. I believe 2.0.2 is the very latest version. |
My suggestion is to downgrade to Node 18 for the time being (its still preferred for Node RED at this stage) Nothing in this module will be responsible for the error, as I believe it to be upstream somewhere. |
@marcus-j-davies - thanks - I will try that. |
After a downgrade to node v18.17.1 the problem no longer occurs. Thanks for your help! |
What happened?
A few days ago I updated nodejs and node-red on a raspi4. Prior to the upgrade all was well. Subsequent to the upgrade I'm seeing an issue that I believe I've narrowed down to serial port logic in node-red-contrib-zwave-js:
If I leave the zwave js controller node enabled when I do a "deploy" or "restart nodes", that port will subsequently become unavailable due to some problem with port locking. The controller node emits messages about being unable to lock the usb port.
ZWaveError: Failed to open the serial port: Error Resource temporarily unavailable Cannot lock port (ZW0100)
The only way I have found to recover from this is to restart node-red itself. Once I do that, the controller node works properly again.
I have managed to work around this by being sure to disable + deploy the disable before doing other work. If I do that I can reliably bring the controller back up by enabling the controller node + deploy.
I looked at a LOT of stuff tracking this down, so I'm pretty sure it's somewhere in your stuff. Briefly:
I'm just guessing, but it seems like the issue might be sort of in one of these ballparks:
Versions:
How to reproduce?
Version
9.0.3
Node-RED Version
3.1.3
What hardware are you seeing the problem on?
Raspberry Pi
Relevant Z-Wave-JS log as a text file
ZWaveError: Failed to open the serial port: Error Resource temporarily unavailable Cannot lock port (ZW0100)
The text was updated successfully, but these errors were encountered: