Zigbee2MQTT installation fails / ConBee II adapter not found

  • Platform information:
    • Hardware: Raspberry Pi 4B / 4GB
    • OS: openHABian 4.1.0
    • Java Runtime Environment: Raspbian 17.0.9
    • openHAB version: 4.1.0
  • Issue of the topic:
    Hello,
    I’m new to openHAB and would like to setup Zigbee2MQTT using a ConBee II adapter.
    With openhabian-config I installed Mosquitto first. When I tried to install Zigbee2MQTT a box “Please select your zigbee adapter” opens but no adapter is listed. It does not matter if I select OK or cancel, installation does not start.
    I already checked, user openhabian has group dialout. How shall I proceed?

Is a Conbee stick supported to be used with Zigbee2MQTT?
With regard to OS - there is no openhabian 4.1. 4.1 is the version of openhab.
The version of openhabian can be found in the window header resp. in the about section.
There is at least one thread about the probkem you described but I think in the meantime thst should have been fixed at least a woraround is described in that thread ( working for sticks in general).

conbee-stick might work. You should at least see it in the selection menu.

tell me what your see when you do
ls -l /dev/serial/by-path and
ls -l /dev/serial/by-id

Yes, ConBee II is listed as supported by Zigbee2MQTT and I know of at least on working installation (but on a different hardware). But maybe I oversaw a compatibility list for the installation method by the skript.

With regards to OS, I did not find in the about section. The closest info I found appears when I open ssh:
Release = Raspbian GNU/Linux 11 (bullseye)

Kernel = Linux 6.1.21-v8+

Platform = Raspberry Pi 4 Model B Rev 1.5

If you remember another similar thread, what shall I look for?

The output is interesting:

openhabian@openhabian:~ $ ls -l /dev/serial/by-path
total 0
lrwxrwxrwx 1 root root 13 Dec 31 17:17 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 → …/…/ttyACM0
openhabian@openhabian:~ $ ls -l /dev/serial/by-id
ls: cannot access ‘/dev/serial/by-id’: No such file or directory

What can I learn from that?

  1. your adapter gets identified => good
  2. It’s not listed under IDs => you’ve got debian with by-id bug
  3. You’re probably not using latest openhabian version cause I added a workaround for this bug to get the adapters listed with the by-path name

=> Please switch to “latest” unter “01 select branch” and try again
Let’s see if conbee-stick works…

I changed to the latest branch and updated. I even started with writing the image again to the SD-card to be sure that it does not fail because I tried or changed too much.
This time installation skript was successful but Zigbee2MQTT is not running.

Log:

error 2024-01-01 19:04:37: Error while starting zigbee-herdsman
error 2024-01-01 19:04:37: Failed to start zigbee
error 2024-01-01 19:04:37: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
error 2024-01-01 19:04:37: Exiting…
error 2024-01-01 19:04:37: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
at Controller.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/opt/zigbee2mqtt/lib/zigbee.ts:60:27)
at Controller.start (/opt/zigbee2mqtt/lib/controller.ts:101:27)
at start (/opt/zigbee2mqtt/index.js:107:5)

I checked again:

openhabian@openhabian:~ $ ls -l /dev/serial/by-path
total 0
lrwxrwxrwx 1 root root 13 Jan 1 18:22 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0 → …/…/ttyACM0
openhabian@openhabian:~ $ ls -l /dev/serial/by-id
ls: cannot access ‘/dev/serial/by-id’: No such file or directory

On the Zigbee2MQTT I found the hint to set in the configuration.yaml

serial:
deconz

But this did not solve the issue either. I’m wondering if I shall install the deconz package now. But I thought Zigbee2MQTT and deconz are alternatives and not to be installed both?

On the rpi4 you need to have the Conbee on a powered USB 2 hub for trouble free operation…
This is true for the deconz sw so I Would guess for other sw too.

I just tried with a powered USB HUB but nothing changed. I addition, I checked with dmesg but I did not see the device connecting and disconnecting.

But good to know for later.

Playing with the configuration.yaml I got a change. Instead of

port: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0

I put

port: /dev/ttyACM0

and it is working, e.g. Zigbee2MQTT startet and I can access the website on port 8081. But as far as I understand this is not the best solution because as soon as I add another adapter I will have the next issue.
How can I fix this?

you can add a rule to /etc/udev/rules.d/ to always have the same link to access the device. Just like the links under /dev/serial/by-id or by-path. No idea why that’s not working for you. Maybe something in the path that’s not accepted by zigbee2mqtt.

But I would like to find the root-cause why openhabian fails: Did you do an upgrade of the system with “02 upgrade system”. Background is that i thought the by-id-bug was fixed in the latest bullseye image.

Interesting to learn that there would be a workaround using /etc/udev/rules.d/. I will try this if I will add a second device.
But I would like to understand the root-cause of the issue, too. I did the upgrade of the system with “02 upgrade system” after setting “latest” under “01 select branch”. And an improvement was visible as the install script for Zigbee2MQTT worked.

That is not a workaround; that is the Linux way to make a fix relation between a hardware device and its name.

It is a bug in the bullseye OS described e.g. here:

Good explanation, thank you!

For the moment I’m a bit too careful to install the solution and hope it will be included in one of the next upgrades with “02 upgrade system”. I know my luck in such cases when I do a change I only partially understand and then touch it the next time…

I recently made a fresh install of openhab with the raspberry imager:
Raspi4 with OH 64bit: No udev-bug, dev/serial/by-id was correctly created.
How did you write the image and what version (32 bit or 64 bit)?

A fresh and working install would be nice. I went the easy way: I looked in download and selected Raspberry Pi, stable and then the 32 bit image. I had read that the 32 bit version would be better for systems with not much memory. Then I opened it with Laufwerke on a Fedora Linux (gnome-disk-utility 43.0 UDisks 2.9.4 (gebaut gegen 2.9.4)) and wrote it on the SD-card.

a Pi4 with 4GB is not really low memory. I would definitely recommend the 64bit version. There is a nasty delay (about 12sec) that it takes for each rule (JavaScript, blockly) to load in the 32 bit version.
You can read the background here:

Besides that there should be no udev-bug in the 64bit-system, so the whole problem should be gone

Good arguments to install the 64bit version! Did you install the stable or the latest version of the image when you tested?

I installed via Raspberry Imager. It always uses the latest official release in GitHub openhab/openhabian, which is currently 1.8b

I tested the 64bit openhabian version (stable).

The good news:
ls -l /dev/serial/by-id is working fine. So, even the stable version does not have the bug. The scripts to install Zigbee2MQTT showed the device and did the installation.
The bad news:
Zigbee2MQTT did not work until I change the port entry in configuration.yaml to /dev/ttyACM0 as before.

But at least it is running even if I’m still wondering why the entry with the id does not work.