Zigbee USB Dongle issue with Zigbee2mqtt

Hello everyone. I am pretty new to the whole home assistant thing.
I want to connect my Zigbee devices to the HA via the Zigbee2mqtt Add-on.

However, I do not know how to find the usb dongle address. (I have a usb dongle with cc2531.)
Some says that in the system panel, at the bottom of my supervisor log i should find, but nothing.
Some says that in the hardware list, but my hardware list is kind of strange.

When I try to start my Zigbee2mqtt the og file says this:

npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-01-11T19_17_10_594Z-debug.log
[21:17:10] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start /app
> node index.js
Zigbee2MQTT:error 2022-01-11 21:17:15: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-01-11 21:17:15: Failed to start zigbee
Zigbee2MQTT:error 2022-01-11 21:17:15: Exiting...
Zigbee2MQTT:error 2022-01-11 21:17:15: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB7'
    at Znp.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1

I watched a lot of videos and read a lot of topics here and there, but i cant find any useful solution. Or it is too chaotic for me.

When I plug in the usb dongle its green fleshlight is on, but after a while it goes off.
It is possible that the usb dongle is not working?
It is supposed to use the mini switches on it?

THank you for your kind help.

inside hardware information window, use search textbox with usb keyword. I have one item listed there as ttyUSB0 and my port address in z2mqtt is /dev/ttyUSB0

Well, we can be pretty confident that your stick won’t be found at ttyUSB7… try /dev/ttyUSB0 if you don’t have ANY other USB devices plugged in.

You have a very old version of zigbee2mqtt.

But if you look at the output of dmesg after plugging the usb device in you should see the device name.

As I said, I am quite a newbie to this whole thing. Can you give some explanation where and how to use this “dmesg” command?

If you have the ‘Terminal & SSH’ or ‘SSH & Web Terminal’ add-on, open it, and enter

dmesg | grep tty

But before you search for serial ports: if your CC2531 is not flashed with the firmware from the Zigbee2mqtt project, it will not show a serial port.

And what nickrout said: you are using the deprecated daniel welch add-on. Use the official one:

1 Like

Thank for now guys, it was a real help for me the advices and tips you gave me.

Probably my dongle has some issues. So to make sure that the dongle is good, I ordered a New one, a Sonoff Zigbee 3.0 Dongle Plus.

When it is arrived and I tried with it, I will have a comeback reply about it.
Until Than…

Have a nice day.

Is your dongle flashed with firmware?

Dear all, I am also experiencing the same situation. I am using home assistant running as a virtual machine on a Dell Optiplex 3050 with Ubuntu 22/04.

I flashed my first Sonos USB 3 dongle plus with relevant firmware using Flash Programmer and received the SUCCESS message. As per all videos on youtube I plugged the dongle to the Dell machine running the HA virtual machine on Ubuntu. But I cannot see any notification


I have watched many vedios and read lot of text, but I was unable to find a way to detect the dongle.
Then I suspected that the dongle was faulty and ordered another. Done the flashing and connected, again no luck. Then I followed python method to flash one of the dongles I had, but again without any luck. I am totally lost with that now. Do I have to run MQTT Broker and Zigbee2MQTT prior plug in the dongle after flashing the firmware? When I check the Hardware list, I cannot see the USB port with the dongle plugged in. Kindly assist.

The USB needs to first be recognized and working properly on the host Ubuntu OS, then the VM needs to be configured to pass it through to Home Assistant. I would start with the host first - Is the host ubuntu os even recognizing the dongle? What is the outcome of dmesg right after you plug it in?

I run zigbee2mqtt in docker instead of through an addon in VM, but it’s also on Ubuntu. I recall having to install a driver before the usb was recognized by ubuntu. dmesg should show something like below when you plug it in. I use the zzh stick, but the output should be similar. What version of the sonoff are you using? The ZBDongle-P" (based on CC2652P), or the Dongle Plus V2 “ZBDongle-E”?

usb 3-4.2: new full-speed USB device number 9 using xhci_hcd
usb 3-4.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
usb 3-4.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 3-4.2: Product: USB Serial
ch341 3-4.2:1.0: ch341-uart converter detected
usb 3-4.2: ch341-uart converter now attached to ttyUSB0

I would see what dmesg sends and then post the model, and that should determine if a driver or something else needs to be done on the host - if it says “now attached to ttyUSB0”, or similar (might be ttyUSB1, ttyUSB2, etc), the USB should be working on the host. You can double check if it is recognized by typing “ls /dev/ttyUSB0” (or replace number yours is on). If working, it should just echo that back in yellow text. If not, it would say "ls: cannot access ‘/dev/ttyUSB0’: No such file or directory
"

If the USB is recognized by the host OS, then you would need to dig further into the USB pass through settings in the VM.

Hi Tim, thanks for assisting. I followed your instructions and results were as follows:

  1. When I plugged a standard USB drive (Scandisk Cruserblade) to the first USB port on host (Dell Optiplex 3050 running Ubuntu 2204) result was as follows:

  2. Then I plugged newly purchased ZBDongle-E to the same USB port:

  3. Then I run "ls /dev/ttyUSB0 with the ZBDongle-E attached
    Result of lsdevttyUSB0

Kindly advise further.

Looks like it is being assigned ttyACM0

What does ls /dev/ttyACM0 say? If it shows this then your zigbee stick should be working on ttyACM0

Screenshot from 2023-03-20 16-10-28

What VM program are you using? If the USB is on ttyACM0 you will need to map this through to the VM, then that port ttyACM0 should be used by the zigbee2mqtt addon as the port name.

Follow the zigbee2mqtt addon installation notes linked below, and replace ttyUSB0 with the port your device is on which is ttyACM0

Hi Tim, thanks a ton for directing me to the right path. All done now. I have assigned ttyACM0 to VM, and now the Zigbee dongle is visible in the All Hardware list under ttyACM0. I will now proceed to installing Zigbee2MQTT. Have a great day.