rfxcom / node-rfxcom

Node.js client for talking to an RFXtrx433 device
MIT License
62 stars 45 forks source link

No devices found while /dev/ttyUSB0 is mounted - udevadm info provided #97

Closed piejanssens closed 3 years ago

piejanssens commented 3 years ago
/homebridge/test/node_modules/rfxcom # npm run find-rfxcom

> rfxcom@2.3.1 find-rfxcom /homebridge/test/node_modules/rfxcom
> bin/find-rfxcom.js

Scanning for RFXCOM devices...
Scan failed - spawn udevadm ENOENT

/dev # ls -al /dev/tty*
crw-rw-rw- 1 root root   5, 0 Dec  8 10:48 /dev/tty
crwxrwxrwx 1 root root 188, 0 Dec  8 11:15 /dev/ttyUSB0

rfxcom 2.3.1 node v12.18.4 os Alpine Linux (3.12.0) (Homebridge docker)

piejanssens commented 3 years ago

installed udev package using apk add udev

After that the output is now:

/homebridge/test/node_modules/rfxcom # npm run find-rfxcom 

> rfxcom@2.3.1 find-rfxcom /homebridge/test/node_modules/rfxcom
> bin/find-rfxcom.js

Scanning for RFXCOM devices...
  None found
piejanssens commented 3 years ago
/homebridge/test/node_modules/rfxcom # udevadm info -n /dev/ttyUSB0
P: /devices/pci0000:00/0000:00:04.0/0000:04:00.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0
N: ttyUSB0
E: DEVNAME=/dev/ttyUSB0
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/0000:04:00.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0
E: MAJOR=188
E: MINOR=0
E: PHYSDEVBUS=usb-serial
E: PHYSDEVDRIVER=ftdi_sio
E: PHYSDEVPATH=/devices/pci0000:00/0000:00:04.0/0000:04:00.0/usb2/2-1/2-1:1.0/ttyUSB0
E: SUBSYSTEM=tty
piejanssens commented 3 years ago

Seems to be caused by simultaneous usage from openhab. Didn't know that was not possible.

maxwellhadley commented 3 years ago

Serial ports are generally only accessible by one process at a time