#Can USB 3.0 interference cause a Zigbee dongle to fail completely?

1 messages · Page 1 of 1 (latest)

trim adder
#

Just got a SONOFF ZBDongle-P and I'm having a hell of a time getting it working. I think I am doing everything right but every time the software fails to connect, whether that's ZHA or Zigbee2MQTT, even though the USB device is visible to the Raspberry Pi host device.

So my two theories are:

  1. The Pi's USB 3.0 ports are causing massive interference, so much so that the dongle is made non-functional.
  2. The dongle is defective.

Could it be as simple as being caused by interference? Do I need to buy a USB 2.0 extension, or do I need to return my possibly defective device? Thanks in advance.

vale onyx
#

Is it connected with an extension cable?

trim adder
vale onyx
#

See linked video. Unless you mean the USB device isn't detected at all.

trim adder
vale onyx
#

What's it say exactly?

trim adder
vale onyx
#

That's quite vague. I don't use ZHA myself but there should be some logs somewhere that are more verbose.

trim adder
#

Well I also tried it with Zigbee2MQTT and got:
error: z2m: Error: USB adapter discovery error (No valid USB adapter found).

vale onyx
trim adder
#

I have in the config

vale onyx
#

I added a link above. Make sure not have have both running at the saem time though.

trim adder
#

My config just says:
serial:
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0

vale onyx
#

Try to add adapter: zstack as it mentions. The P model's chip uses that.

#

Make sure ZHA is disabled when testing Z2M.

trim adder
#

I'm getting:
[2025-05-28 02:07:59] error: z2m: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0
[2025-05-28 02:07:59] error: z2m: Failed to start zigbee-herdsman
[2025-05-28 02:07:59] error: z2m: Error while starting zigbee-herdsman

vale onyx
#

Remove the /dev/ttyACM0.

#

Try

readlink -f /dev/serial/by-id/*

via the SSH addon to check the path again.

trim adder
vale onyx
#

ls -l /dev/serial/by-id/ then. It's a symlink to there and I wasn't sure it would resolve it. I can't test the command since I use a ethernet coordinator 😄

trim adder
#

The response says:

#

total 0
lrwxrwxrwx 1 root root 13 May 28 00:39 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0 -> ../../ttyUSB0

#

Thanks for all your help with this, I appreciate I'm taking up a lot of your time.

vale onyx
#

Try adding this in the serial section

adapter: zstack
port: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0

Don't worry, we're here to help.

trim adder
#

I'm still getting very similar errors:

[2025-05-28 02:16:20] error: z2m: Error while starting zigbee-herdsman
[2025-05-28 02:16:20] error: z2m: Failed to start zigbee-herdsman
[2025-05-28 02:16:20] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-28 02:16:20] error: z2m: Exiting...
[2025-05-28 02:16:20] error: z2m: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0

vale onyx
#

Strange. Did you unplug or re-plug the stick while HAOS was already running? I've seen it have issues with hot plugging things.
See if it works after a reboot.

trim adder
#

This is all in Docker containers on RPi OS. Rebooting now.

vale onyx
#

Wait a minute then.

#

I need to see your docker compose file for Z2M.

trim adder
#

I have a single file for my whole home automation stack

#

version: "3.8"

services:
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
restart: unless-stopped
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./config:/mosquitto/config
- ./data:/mosquitto/data
- ./log:/mosquitto/log

homeassistant:
container_name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
restart: unless-stopped
privileged: true
network_mode: host
volumes:
- /home/mj/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
environment:
- TZ=Europe/London
devices:
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0

esphome:
image: ghcr.io/esphome/esphome
container_name: esphome
restart: unless-stopped
volumes:
- ./esphome/config:/config
- /etc/localtime:/etc/localtime:ro
ports:
- "6052:6052" # ESPHome dashboard accessible at http://<host>:6052
privileged: true # Required for USB flashing
environment:
- TZ=Europe/London

zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- /home/pi/docker/zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
ports:
- "8081:8080"
devices:
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0
environment:
- TZ=Europe/London

vale onyx
#

I only need the Z2m section but please use code blockks so I can read that properly.

sick shoreBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

vale onyx
#

My bad. HAOS is so common that it's just always assumed to be used unless mentioned otherwise: https://analytics.home-assistant.io/
If you use docker containers you need to give it the device first. In your case you mapped your USB device to /dev/ttyACM0 so use that path instead.
Note that devices is not needed if you have privileged.

trim adder
#
zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt
    restart: unless-stopped
    volumes:
      - /home/pi/docker/zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - "8081:8080"
    devices:
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0
    environment:
      - TZ=Europe/London
vale onyx
#

Try this then in configuration.yaml

serial:
    # /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0
    port: /dev/ttyACM0
    adapter: zstack
trim adder
#

Seems like progress! I'm now getting. ```
[2025-05-28 02:28:31] info: z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-28 02:28:31] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-05-28 02:28:31] info: zh:zstack:znp: Serialport opened
[2025-05-28 02:28:31] info: z2m: zigbee-herdsman started (resumed)
[2025-05-28 02:28:31] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20240710,"transportrev":2},"type":"ZStack3x0"}'
[2025-05-28 02:28:31] info: z2m: Currently 0 devices are joined.

It's failing to connect to my MQTT broker but that's fine, I can sort that on my own.
vale onyx
#

Yay. You should be able to use

mqtt:
    server: 'mqtt://mosquitto:1883'
trim adder
#

Hmm yeah I'm still getting

[2025-05-28 02:32:04] error:     z2m: MQTT failed to connect, exiting... (getaddrinfo ENOTFOUND mosquitto)

even when I update the port in my config

vale onyx
#

Can you share the compose file in full?

sick shoreBOT
#

Please use a code share site to share code or logs, for example:

Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.

vale onyx
#

Usually containers in a compose file can communicate with each other by their name. Seems like mosquitto cannot be resolved in your case.

trim adder
#
version: "3.8"

services:
  mosquitto:
    image: eclipse-mosquitto:latest
    container_name: mosquitto
    restart: unless-stopped
    ports:
      - "1883:1883"
      - "9001:9001"
    volumes:
      - ./config:/mosquitto/config
      - ./data:/mosquitto/data
      - ./log:/mosquitto/log
      
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - /home/mj/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    environment:
      - TZ=Europe/London
    devices:
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0

  esphome:
    image: ghcr.io/esphome/esphome
    container_name: esphome
    restart: unless-stopped
    volumes:
      - ./esphome/config:/config
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "6052:6052"  # ESPHome dashboard accessible at http://<host>:6052
    privileged: true  # Required for USB flashing
    environment:
      - TZ=Europe/London

  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt
    restart: unless-stopped
    volumes:
      - /home/pi/docker/zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - "8081:8080"
    devices:
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_b0a87974ac6bef118046a1adc169b110-if00-port0:/dev/ttyACM0
    environment:
      - TZ=Europe/London
vale onyx
#

Perhaps network_mode: host of HA interferes here in some way. Not sure. Otherwise compose creates a network between all containers.
I guess you can also just use the ip of the pi instead of mosquitto.

trim adder
#

I'm now getting these errors:

[2025-05-28 02:42:56] error:     z2m: Error while starting zigbee-herdsman
[2025-05-28 02:42:56] error:     z2m: Failed to start zigbee-herdsman
[2025-05-28 02:42:56] error:     z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-28 02:42:56] error:     z2m: Exiting...
[2025-05-28 02:42:56] error:     z2m: Error: SRSP - SYS - getExtAddr after 6000ms
    at Object.start (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/utils/waitress.ts:67:23)
    at /app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:256:45
    at Queue.execute (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/utils/queue.ts:36:26)
    at Znp.request (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:249:27)
    at Znp.requestWithReply (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:228:34)
    at ZnpAdapterManager.parseConfigNetworkOptions (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:526:63)
    at ZnpAdapterManager.start (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:58:38)
    at ZStackAdapter.start (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:142:49)
    at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
#

Is there a chance this would be easier if I try restoring my HA setup from a backup within a fresh install of HAOS?

#

I didn't realise I was making such an error by using Docker

vale onyx
#

Hard to say. I use docker myself in production and prefer it.

#

I'm not familiar with that specific getExtAddr error.
Are you sure the ZHA integration is disabled?

trim adder
#

100%, it was never enabled because it could never complete setup

#

I'm just about at my wit's end with this. If I can't get Zigbee working then HA is useless for me.

vale onyx
#

Just to make sure, can you try to stop the homeassistant container for now?

#

If that still does not work I'd recommend you stop both and flash the coordinator with the newest coordinator firmware.

trim adder
#

Just tried that and it seems to have resolved the adapter errors but now I'm back to

[2025-05-28 02:52:14] error:     z2m: MQTT failed to connect, exiting... (connect ECONNREFUSED 192.168.1.42:1883)
vale onyx
#

It's possible you didn't configure mosquitto for listening properly.

trim adder
#

I think the issue is with Mosquitto, I will troubleshoot this myself as I have already taken up far too much of your time. Thank you for your help, I do believe you've solved my adapter issue which has made things so much easier.

vale onyx
#

I have a mosquitto.conf that looks like this

listener 1883
log_timestamp_format %Y-%m-%dT%H:%M:%S
allow_anonymous true

The compose like this

services:
    eclipse-mosquitto:
        container_name: mosquitto
        restart: always
        ports:
            - '1883:1883'
            - '9001:9001'
        image: eclipse-mosquitto
        volumes:
            - './mosquitto.conf:/mosquitto/config/mosquitto.conf'
            - './data:/mosquitto/data'
            - './log:/mosquitto/log'
        healthcheck:
            test: ["CMD-SHELL", "netstat -ltn | grep -c 1883 || exit 1"]
#

Not very secure but that should work.

trim adder
#

Thanks, that should help. I might need to sleep before finishing this off so apologies if I don't let you know tonight how it goes.

trim adder
# vale onyx Not very secure but that should work.

It's finally working, thank you for all your help.

I don't suppose you would know how to get my SONOFF SNZB-02D temp/humidity sensor appearing correctly in HA? By default, all the atrributes are showing but with no data.

#

lol scratch that, it's working now

#

thanks again for all your help, do you have a fav charity I can chuck £10 at as thanks?

vale onyx
#

No. Just pay it forward and help someone else.