Zigbee2MQTT Timeout

Hi
I am new to Home Assistant and the forum and have been asking this question in the wrong place. Hopefully this is the correct place.
Thanks to danielull and frenck for their help.
I have started with a fresh install.
I am running windows10/VirtaualBox/Home Assistant. Everyhing is at the latest releases.
The hardware is a Lenovo M900 with a Sonoff Zigbee 3.0 USB Dongle Plus.
The Dongle has been flashed and is being seen by everything including Home Assistant.
I have set up a user mqtt-user, installed MQTT and Zigbee2mqtt.
The settings are:

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

server: mqtt://core-mosquitto:1883
user: mqtt-user
password: ***********

port: >-
  /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0
adapter: ezsp

On starting the Zigbee2MQtt I get an error

[09:49:19] INFO: Preparing to start...
[09:49:20] INFO: Socat not enabled
[09:49:20] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2023-03-22 09:49:22: Logging to console and directory: '/config/zigbee2mqtt/log/2023-03-22.09-49-22' filename: log.txt
Zigbee2MQTT:info  2023-03-22 09:49:22: Starting Zigbee2MQTT version 1.30.2 (commit #unknown)
Zigbee2MQTT:info  2023-03-22 09:49:22: Starting zigbee-herdsman (0.14.96)
Error: Reset error: Error: {"sequence":-1} after 2000ms
    at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:298:23
    at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)

I have been advised by danielull that I need disable ZHA by doing the following:
in the “devices and services” section when you see the “ZHA” card you must to click the 3 dots and choose “deactivate”. That’s all…
That seems simple and I am sure I would have done this only…
Devices & services does not have a ZHA card. I does have a Sonoff card though. The sonoff card does not have a deactivate option. So where am I going wrong!!!
Thanks in advance

It seems several others are experiencing the same issues. There are a couple people that seemed to get it working and posted their configs- take a look at this post and see if any of their suggestions work.

With so many reporting an issue though, I wonder if it’s a bug- I didn’t see any issues open on Github. Not sure if its on the Home Assistant side with the addon or zigbee2mqtt, or even some firmware problem. All posting similar issues seem to have the same Sonoff though. Since it fails so early in the startup the log doesn’t seem to give a good indication as to what exactly is going wrong though.

Thanks for responding.
I have tried the config from JosITX but get the same results.
I do not understand the tsa3000 solution as I do not have sections named frontend: or advanced: in the config options.
I have looked for a file /config/zigbee2mqtt as its mentioned as data_path: . It does not exist as a file but as a directory. In the directory is a configuration.yaml file but all its got is a line saying true. Presumably the config items mentioned by tsa3000 can be entered manually somewhere but I do not know where.
I still haven’t and don’t know how to disable ZHA .

I don’t think this is the issue - if ZHA were enabled it would show up right on your integrations page. Its alphabetical so would be either the last or one of the last entries.

The log shows the issue is with zigbee-herdsman - on Github there are several open issues, some simlar to yours. Some mention using the latest developer branch of zigbee2mqtt fixed the problem.

Ultimately you might have to wait until the next release of zigbee2mqtt to fix this. There are also several versions of the Sonoff adapter - which one do you have? The -p version based on the cc2652 chip works very well with zigbee2mqtt. The -e version base on the EFR32MG21 chip is experimental and does not work well with zigbee2mqtt. Additional details on the supported adapter page - including latest firmwares

Also, did you configure the USB passthrough settings of the VM properly?

This is all very new to me, so please forgive me if I am missing the obvious!
So ZHA first… I have this
image_2023-03-22_151500584

I do not know if this is ZHA, just the dongle or both?
I was advised to Deactivate ZHA but the options on this do not include that. It does have the 3-dots and disable. Which I have tried but it still times out.
I have an IKEA switch which the dongle picks up if I try and pair it, using ZHA I think. It appears as a device under the Sonoff dongle card.
However I am trying to pair a Samotech SM323 which ZHA does not recognise and Z2M does. (apparently)

The Dongle has a label on it of “Sonoff Zigbee 3.0 USB Dongle Plus”. I assume the Plus means its the P version. I flashed it as the C2652 and it didn’t object.

Configuring the USB. I plugged it in - Windows did very little with it but set it as a Com port. - no extra drivers were required.
I went in to VirtualBox and selected the Home assistant VM and attached the dongle under USB devices. That’s all I did. It then appeared under the HASS Hardware panel as shown in my config above.
Was there more to do?

I will install the newer version of Zigbee2MQTT and see what happens.

Thanks

Yes that is ZHA and it is definitely there, so that is at least part of your problem, if not the problem. You need to remove it. When you click the 3 dots, is “delete” an option in that menu? If so delete it instead of disabling it. If it still won’t delete try unplugging the sonoff from the machine and then try deleting it again.

USB passthrough and firmware appear to not be the issue based on what you posted - if the stick is recognized by ZHA the VM pass through is working, and if a device connects to it through ZHA you likely have the correct firmware and the -p version.

Delete (don’t just disable) the ZHA integration and then see if you can configure zigbee2mqtt.

I deleted the ZHA (3-dots/Delete). Started the original Zigbee2MQTT and got:

[08:25:46] INFO: Preparing to start...
[08:25:47] INFO: Socat not enabled
[08:25:47] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2023-03-23 08:25:49: Logging to console and directory: '/config/zigbee2mqtt/log/2023-03-23.08-25-49' filename: log.txt
Zigbee2MQTT:info  2023-03-23 08:25:49: Starting Zigbee2MQTT version 1.30.2 (commit #unknown)
Zigbee2MQTT:info  2023-03-23 08:25:49: Starting zigbee-herdsman (0.14.96)
Zigbee2MQTT:error 2023-03-23 08:26:09: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-03-23 08:26:09: Failed to start zigbee
Zigbee2MQTT:error 2023-03-23 08:26:09: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-03-23 08:26:09: Exiting...
Zigbee2MQTT:error 2023-03-23 08:26:09: Error: Connection not initialized
    at Ezsp.execCommand (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:540:19)
    at Ezsp.version (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:338:35)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:141:25)
    at EZSPAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:165:16)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:107:5)

Removed Z2M and installed the edge version. I think this is the dev release?
Got:

[08:52:53] INFO: Preparing to start...
[08:52:53] INFO: Socat not enabled
[08:52:54] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2023-03-23 08:52:55: Logging to console and directory: '/config/zigbee2mqtt/log/2023-03-23.08-52-55' filename: log.txt
Zigbee2MQTT:info  2023-03-23 08:52:55: Starting Zigbee2MQTT version 1.30.2-dev (commit #2e593e3)
Zigbee2MQTT:info  2023-03-23 08:52:55: Starting zigbee-herdsman (0.14.100)
Zigbee2MQTT:error 2023-03-23 08:52:55: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-03-23 08:52:55: Failed to start zigbee
Zigbee2MQTT:error 2023-03-23 08:52:55: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-03-23 08:52:55: Exiting...
Zigbee2MQTT:error 2023-03-23 08:52:55: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Trried restarting. Same results

If you have the -p version of the sonoff get rid of this line from your config. That is for the -e version only.

Also double check you have the device path still correct and that the mqtt broker is set up and configured properly.

ARRGH!!!
The HASS interface started hanging with an initialising message. So I started again.
Re-installed Virtual Box but then deleted the old VM and created a new one from the backup clone copy. No changes in Windows or the dongle flash but when connecting the USB to the HAS VM it says its a

Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light [0100]`

Windows Device Manager still thinks its a:

Silicon Labs CP210x USB to UART Bridge (COM4).`

Any ideas?
I am thinking of binning the dongle. What`s the next best?

Steve

The dongle isn’t the problem. Running a vm on windows is not an ideal way to run home assistant. You will always be fighting the bloat of the windows os (windows requires way more processing overhead and space then linux) , network and fire wall issues, and hardware driver and pass through issues between a Linux virtual environment in a windows environment . You could finally get everything working, then windows installs an updates and reboots, then things break.

I would either fully dedicate the device to run home assistant, get rid of windows, install haos as the os running the machine directly, following the x86 install instructions.

Or if you have to run other software on the machine besides home assistant consider proxmox or a vm running on a Linux based os.

I have given it one last go. Failed!
It seems the odd USB description for the dongle is only in Virtual Box. The vendor id is the same in Windows and VB so I don’t know where its getting the text from.
Once it gets in to Home Assistant (ZHA) it reverts back to Sonoff!!!

The reason for the VM solution is that I want to run Blue Iris for my security cameras and Home Assistant on the same box. I assumed that Blue Iris would be heavier on resources than HA and therefore would be better run natively.

I have just looked BI on Proxmox and it seems that people are doing it so may be that is the way to go.
It could be that I am just swapping one set of problems for another. I don’t really want to buy another box.

I don’t understand why there are people saying this all works yet there are others saying it doesn’t. Something must have changed.

Thanks for all your help

Steve

had the same Problem when i changed my Coordinator Stick to a Sonoff ZBDongle-P/ZBDongle-E (same issue with both variants).
Solution was:

  • uninstall zigbee2mqtt
  • uninstall Mosquitto
  • disable ZHA
  • delete folder /usr/share/hassio/homeassistant/zigbee2mqtt
  • delete file /usr/share/hassio/homeassistant/zigbee.db
  • delete folder /usr/share/hassio/addons/core/mosquitto
  • reinstall mosquitto and zigbee2mqtt

Every settings are lost but i spent so much time trying to fix this issue that it was worth it…
Your file/folder pathes can be different according to your HA installation.

2 Likes