Zigbee2mqtt adapter discovery problem after openhabian update

  1. I’ve made a fresh installation using etcher as described on OH page
  2. Yes, system and all packages are in their latest versions
  3. Can’t check right now, however in by-path there was one entry of my zigbee stick and by-id returned error ’ No such file or directory’

I’ll go with your suggestion of changing /opt/openhabian/functions/nodejs-apps.bash

Will keep you posted

This one worked, thank you, however looks that in other place the same issue persists.

openhabian@openhabian:~ $ sudo service zigbee2mqtt restart && sudo journalctl -u zigbee2mqtt.service -f
-- Journal begins at Thu 2023-08-24 12:01:26 CEST. --
Aug 24 12:25:43 openhabian npm[3536]:                     ^
Aug 24 12:25:43 openhabian npm[3536]: TypeError: Cannot read properties of undefined (reading 'end')
Aug 24 12:25:43 openhabian npm[3536]:     at MQTT.disconnect (/opt/zigbee2mqtt/lib/mqtt.ts:129:21)
Aug 24 12:25:43 openhabian npm[3536]:     at Controller.stop (/opt/zigbee2mqtt/lib/controller.ts:198:9)
Aug 24 12:25:43 openhabian npm[3536]:     at stop (/opt/zigbee2mqtt/index.js:111:5)
Aug 24 12:25:43 openhabian npm[3536]:     at process.handleQuit (/opt/zigbee2mqtt/index.js:117:9)
Aug 24 12:25:43 openhabian systemd[1]: zigbee2mqtt.service: Succeeded.
Aug 24 12:25:43 openhabian systemd[1]: Stopped Zigbee2MQTT.
Aug 24 12:25:43 openhabian systemd[1]: zigbee2mqtt.service: Consumed 6.436s CPU time.
Aug 24 12:25:43 openhabian systemd[1]: Started Zigbee2MQTT.
Aug 24 12:25:44 openhabian npm[3560]: > zigbee2mqtt@1.32.2 start
Aug 24 12:25:44 openhabian npm[3560]: > node index.js
Aug 24 12:25:49 openhabian npm[3574]: Zigbee2MQTT:error 2023-08-24 12:25:49: Error while starting zigbee-herdsman
Aug 24 12:25:49 openhabian npm[3574]: Zigbee2MQTT:error 2023-08-24 12:25:49: Failed to start zigbee
Aug 24 12:25:49 openhabian npm[3574]: Zigbee2MQTT:error 2023-08-24 12:25:49: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Aug 24 12:25:49 openhabian npm[3574]: Zigbee2MQTT:error 2023-08-24 12:25:49: Exiting...
Aug 24 12:25:49 openhabian npm[3574]: Zigbee2MQTT:error 2023-08-24 12:25:49: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/platform-fd50                                                                                  0000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0'
Aug 24 12:25:49 openhabian npm[3574]:     at SerialPort.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
Aug 24 12:25:49 openhabian npm[3574]:     at SerialPort._error (/opt/zigbee2mqtt/node_modules/@serialport/stream/dist/index.js:75:22)
Aug 24 12:25:49 openhabian npm[3574]:     at /opt/zigbee2mqtt/node_modules/@serialport/stream/dist/index.js:111:18
Aug 24 12:25:49 openhabian systemd[1]: zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 12:25:49 openhabian systemd[1]: zigbee2mqtt.service: Failed with result 'exit-code'.

This is result of mine by-id and by-path

openhabian@openhabian:~ $ ls -l /dev/serial/by-id
ls: cannot access '/dev/serial/by-id': No such file or directory
openhabian@openhabian:~ $ ls -l /dev/serial/by-path
total 0
lrwxrwxrwx 1 root root 13 Aug 24 12:20 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0 -> ../../ttyUSB0

You should go to

nano /opt/zigbee2mqtt/data/configuration.yaml

and modify “port section” by doing replacement by-id with by-path

1 Like

The workaround was for installing zigbee2mqtt via openhabian-config despite the annoying debian udev-bug.
openhabian configures the zigbee2mqtt-log in zram and creates a start-configuration (configuration.yaml) with the working path.
Of course you can always install zigbee2mqtt manually but openhabian tries to make things a bit user friendlier.

Thanks a lot

Update: the workaround is now merged into the current openhabian.

What do you mean by merged?
I tried installation new from scratch and nothing changed - while trying to install Z2M through openhabian still see empty box to choose zigbee dongle

merged means merged into branch latest.
you have to select “latest” under “select branch”.