hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
553 stars 51 forks source link

homebridge-zigbee-nt: no conncetion to CC253X and no web interface "cannot lock port" #1719

Closed cybre-finn closed 2 years ago

cybre-finn commented 2 years ago

Description I have a fresh installation of HOOBS on Raspberry Pi. I inserted a CC253X stick that priviously worked fine with homebridge.

I installed homebridge-zigbee-nt. However the web interface on port 9000 is not exposed and I get the error Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port.

I tried to check which application locks access to /dev/ttyACM0. However sudo ls -l /proc/[0-9]/fd/ | grep /dev/ttyACM0 just returned a newline.

I didn't research the architecture of HOOBS vs homebridge and have no knowlede of the whole npm/node stack. Is there maybe some container stuff or other isolation going on here?

18/12/2021, 17.54.47hub is running on port 8018/12/2021, 17.54.49Zigbee Nt Bridge starting18/12/2021, 17.55.22Zigbee Nt BridgeLoaded plugin 'homebridge-zigbee-nt'18/12/2021, 17.55.22Zigbee Nt BridgeLoading 1 platforms...18/12/2021, 17.55.22Zigbee Nt BridgeZigBeeInitializing platform: ZigBee - v2.5.5 (API v2.7)18/12/2021, 17.55.22Zigbee Nt BridgeBridge is running on port 51826.18/12/2021, 17.55.23Zigbee Nt BridgeZigBeeConfigured port for ZigBee dongle is /dev/ttyACM018/12/2021, 17.55.23Zigbee Nt BridgeZigBeeInitializing ZigBee controller on port /dev/ttyACM0 and channels  (pan ID 6754)18/12/2021, 17.56.29Zigbee Nt BridgeZigBeeErrorError: AREQ - ZDO - stateChangeInd after 60000ms18/12/2021, 17.56.29Zigbee Nt BridgeZigBeeZigbee: disabling joining new devices.18/12/2021, 17.56.29Zigbee Nt BridgeZigBeeRetrying connect to hardware18/12/2021, 17.56.34Zigbee Nt BridgeZigBeeErrorError: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'18/12/2021, 17.56.34Zigbee Nt BridgeZigBeeZigbee: disabling joining new devices.18/12/2021, 17.56.34Zigbee Nt BridgeZigBeeRetrying connect to hardware
cybre-finn commented 2 years ago

When I monitor the serial traffic on /dev/ttyACM0 with cat -v < /dev/ttyACM0, I actually see some bytes when I restart the plugin. So probably no OS access problem.

BobbySlope commented 2 years ago

Try a different port

To change the default port, set httpPort: YOUR_PORT_NUMBER in the configuration.