Closed normanth closed 1 year ago
Hi @normanth.
This is certainly always a problem with the serial port package in Alpine Linux (Docker)
Please see this comment. https://github.com/zwave-js/node-red-contrib-zwave-js/discussions/246#discussioncomment-4023531
In essence, you need to ensure all build tools are installed in your Docker image and run
npm rebuild --build-from-source
INSIDE the docker image environment and within your .node-red
directory - not outside.
I cant tell you where your .node-red
directory is when using docker.
Basically, the prebuilt serilaport package binary for Alpine just doesnt work, and you need to build it your self.
and again make sure npm rebuild --build-from-source
is run inside your docker environment and from within the .node-red
directory or what ever directory it is for docker
Hi @normanth, my two cents are to run node-red outside of docker for this. I was all in using docker, and finally gave up trying to get it to work. I've been very happy with my decision.
Hi,
unfortunately, the rebuild in .node-red in the docker container (folder with node_modules inside) did not solve the problem.
Now I've installed node-red on the Raspberry without docker and it works. It's a pity that it doesn't work with docker - that brings decisive advantages.
Now I can switch from node-red-contrib-openzwave to node-red-contrib-zwave-js.
Many thanks for the support!
Norman
How can we help?
Raspberry Pi 4 (Raspberry Pi OS Lite (64-bit) Debian Bullseye) Docker version: 23.0.1 Node-RED image from nodered/node-red:latest - version v3.0.2 Linux Alpine 3.16.1 Node.js version v16.16.0 ZWave-JS version 8.0.0
Docker run with USB device:
docker run -it --net=host --user root --device=/dev/ttyACM0 --restart=unless-stopped -v /node-red/data-1:/data -e TZ=Europe/Berlin --name node-red-3-0-2 ft/node-red:3-0-2
Installation protocol of ZWave-JS:
After selection of serial port "/dev/ttyACM0" in ZWave-JS "ZWave Controller" Node-RED crashes and doesn't start anymore.
Log-File:
I have found this: https://github.com/serialport/node-serialport/issues/2438 mlooise commented on Aug 27, 2022
But installation of "npm install node-red-node-serialport@0.15.0" in the Docker Container doesn't work.
Version
8.0.0
Node-RED Version
3.0.2
What hardware are you using?
Raspberry Pi
Any code to add?