Unable to start zigbee2mqtt - Sonoff Zigbee 3.0 USB Dongle

I am trying to get zigbee with mqtt up and running on my Home Assistant for the first time, and have been having a lot of trouble with zigbee2mqtt for a week now.

I have Home Assistant OS installed on a rasperry pi.
I am using the Sonoff Zigbee 3.0 USB Dongle P (not the V2. I had the V2 by mistake, and assuming it was to blame for the issue, exchanged it for the recommended P version.)
Per the zigbee2mqtt guide on their site I have the latest z stack Launchpad Coordinator firmware installed from the official github

I have tried both USB 2 and USB 3 ports on the Rpi4

I confirmed the port with

ls -l /dev/serial/by-id

I have manually specified the port with

port: /dev/ttyUSB0

I have ran test -w /dev/ttyUSB0 && echo success || echo failure and gotten a success print out

No matter what I get a vague error:

[16:24:10] INFO: Preparing to start...
[16:24:10] INFO: Socat not enabled
[16:24:12] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-02-13 16:24:21: Logging to console and directory: '/config/zigbee2mqtt/log/2024-02-13.16-24-21' filename: log.txt
Zigbee2MQTT:info  2024-02-13 16:24:21: Starting Zigbee2MQTT version 1.35.3 (commit #unknown)
Zigbee2MQTT:info  2024-02-13 16:24:21: Starting zigbee-herdsman (0.33.8)
Zigbee2MQTT:error 2024-02-13 16:25:07: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-02-13 16:25:07: Failed to start zigbee
Zigbee2MQTT:error 2024-02-13 16:25:07: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-02-13 16:25:07: Exiting...
Zigbee2MQTT:error 2024-02-13 16:25:07: Error: Failure to connect
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:364:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:158:13)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:109:27)
    at start (/app/index.js:107:5)

I have been at this for days now, any help would be greatly appreciated!

Can you go to the Zigbee2MQTT add-on then go to configuration, click the three dots in the top right and choose edit in yaml. Post what it is showing there.

Also if you could go to Settings->System->Hardware choose all hardware and see if it sees your dongle and what it is listed as. Mine shows as /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231122165232-if00

Here is the config in yaml:

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt: {}
serial: {}

and at Settings >> System >> Hardware I do have:

/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d8e2472cba45ed11a2e4cf8f0a86e0b4-if00-port0

Try this, assuming that you run MQTT on Home assistant and not someplace else.

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  server: mqtt://core-mosquitto:1883
  version: 5
serial:
  port: >-
   /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d8e2472cba45ed11a2e4cf8f0a86e0b4-if00-port0
  adapter: ezsp
permit_join: true

I am getting a very similar if not identical error:

[17:11:53] INFO: Preparing to start...
[17:11:54] INFO: Socat not enabled
[17:11:56] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-02-13 17:12:09: Logging to console and directory: '/config/zigbee2mqtt/log/2024-02-13.17-12-08' filename: log.txt
Zigbee2MQTT:info  2024-02-13 17:12:09: Starting Zigbee2MQTT version 1.35.3 (commit #unknown)
Zigbee2MQTT:info  2024-02-13 17:12:09: Starting zigbee-herdsman (0.33.8)
Zigbee2MQTT:error 2024-02-13 17:13:20: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-02-13 17:13:20: Failed to start zigbee
Zigbee2MQTT:error 2024-02-13 17:13:20: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-02-13 17:13:20: Exiting...
Zigbee2MQTT:error 2024-02-13 17:13:20: Error: Failure to connect
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:364:19)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:158:13)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:109:27)
    at start (/app/index.js:107:5)

Does this line seem suspicious?

at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:364:19)

All my errors have it, and when researching other peoples error, I didn’t see a similar line on their error output.
It strikes my attention as I believe Ezsp was what the V2 dongle uses, when trying to set it up, I remember adding an ezsp option to the config

You have “ezsp” errors in the log, but the ZBDongle-P is not an ezsp adapter (the ZBDongle-E was).

You need to remove “adapter: ezsp” from the config since you have the ZBDongle-P.

could ezsp be configured somewhere else? I see no mention of it in my config file.

I have the V2 so I am not 100% what the -P dongle uses. Those errors are defiantly saying that it can’t start the dongle though. Also you may want to check your /homeassistant/zigbee2mqtt/configuration.yaml file. I have had it not get updated when making changes from the GUI

Doing a little digging it looks like the -P one uses znp. It should work with nothing in the adapter: section though so you should be able to remove that line.

Well I stopped and tried the classic turn it off and turn it back on again. Now I can’t access the GUI at all. It pings, but I have no access to it, even with the IP address. So I’ve not a new issue to solve first.
Once I can recover, I’ll try your config again without the adapter : section

Hi! Do you have solution for the issue? I have different, but similar. After updating HSSOS to 12.0 after starting Zigbee2MQTT i losing connection to HA. Only after stoppingg HA virtual machine and start again i have access, but after starting (trying to start) Zigbee2MQTT i loosing connection again. Maybe you have solution already?

I’ve spent about well over 10 hrs on this issue. And I’d say I’m now stuck. I get lots of good information which seems to eventually conflict. My Sonoff_Zigbee_3.0_USB_Dongle_Plus worked with ZHA, which is now switched off. Any ideas of what to look at next?

I have this set up on a Debian kvm (Alpine), with a 1.5m extension cable:

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  server: mqtt://ha:1883
serial:
  port: >-
    /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0
  rtscts: false
  disable_led: true
advanced:
  pan_id: GENERATE
  network_key: GENERATE
  channel: 25
  transmit_power: 15

And get this issue

Zigbee2MQTT:error 2024-03-22 21:20:56: Error: Failure to connect
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:373:19)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:163:13)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:62:27)
    at Controller.start (/app/lib/controller.ts:109:27)
    at start (/app/index.js:107:5)

Zigbee2MQTT seems to think you have a Dongle-E.

add adapter: zstack under serial, so

serial:
  port: >-
    /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0
  rtscts: false
  disable_led: true
  adapter: zstack

@francisp It worked, thank you very much.

Is there somewhere I should have been able to read about this. I want to check the rest of the config is good.

I could use some help as well? I had a P dongle that I borrowed working, but ordered the E since I wanted the possibillity of thread down the road. I deleted all of the old config files and re-installed zigbee2mqtt, but I cannot get things to start up with the new dongle.

I have tried a few different configs but so far none have worked.

This is what the SSH is showing.


âžś  ~ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx    1 root     root            13 Mar 31 11:03 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231219170914-if00 -> ../../ttyACM0

This is my current config

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  server: mqtt://core-mosquitto:1883
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231219170914-if00-port0
  rtscts: false
  disable_led: true
  adapter: zstack
permit_join: true

You have a Dongle E, so

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  server: mqtt://core-mosquitto:1883
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231219170914-if00-port0
  adapter: ezsp
permit_join: true

Tried that as well but no dice

Are you sure ZHA is not running ?

Yes, it is disabled, I tried it earlier just to make sure it could find the new dongle ok, but it is disabled now.