Zigbee2MQTT not starting?

I am new to HA and am failing to get Zigbee2MQTT to start.

Running HA Core V2023.11.1 on a Raspberry Pi 4. the image was taken from the Raspberry Pi repository.

I followed a guide by “Smart Home Junkie” from YouTube and specifically his written instuctions on his blog.

It all seemed to go fine until I tried to start the Add on. Then I get the message “The add-on seems to not be ready, it might still be starting. Do you want to try again?”

I have tried “Retry” and also rebooted the RPi - all to no avail.

Any suggestions on how to get past this blockage?
Thanks in advance
Bruce

I dont have a pi and never used, never read that blog, but you could check if mqtt is up. If it is up than maybe you misconfigured username or password for mqtt in z2m.

I have looked at the MQTT Add on and it’s log shows various attempts at connections.
I have an extensive MQTT set up already running other devices (ESP8266s Raspberry Pis etc) can I generate a message from the MQTT add on and I can check if it is sent OK??

Another piece of configuration information, I am using a Sonoff Zigbee 3.0 Dongle Plus.

In Zigbee2MQTT I also get an error “502: Bad Gateway” and in the log I get and error “Error while starting zigbee-herdsman”

Does that help?

Not to me. Are you sure you configured and started mqtt addon. I don’t use addons but as I remember you have to create user mqtt and password for it in ha. In addon config you should add that user and password, port 1883. The same credentials you should use for staring z2m. if your mqtt broker is not running or you have wrong credentials and port in z2m for mqtt it will not start.

There is a program you can install on your comp, not the one running ha, and connect to your mqtt broker if it is up and running.

Thanks Daniel, I already have MQTT Dash on my phone (I use it to monitor my existing MQTT stuff) and it seems to let me log on to the MQTT server in HA. So hopefully that verifies that it is running and the user credentials are OK.

Then check did you add correct credentials in z2m addon config for mqtt. If all checks then I don’t know.

Was Z2M running before or is this it’s inital startup? I’m asking because I’ve had it running for 6 months and then after the most recent core update it stopped running and is doing exactly as you’re describing. User and password are added and are correct. MQTT is running. I’m also baffled. Just wondering of this is a more common issue.

Check the add-on logs to see what Z2M reports as the problem.

Thanks for your help.
Scar - it was running but I had to rebuild the server (backup failed - don’t ask!) so I have rebuilt it with the latest versions.

I am now trying to re-create the stuff I had running, but can’t get Zigbee2MQTT to start. I get the warning about “The add-on seems to not be ready, it might still be starting. Do you want to try again?”. I also get “502: Bad Gateway” and the log reports “Error while starting zigbee-herdsman”

I have found some other discussions on the forum but conducted by people who know a LOT more about HA and I get the impression that this “feature” came in with one of the recent upgrades to the core.

Checked the MQTT credentials, can access MQTT from an external monitor, tried uninstalling and re installing, rebooted several times.

Is HA meant to be this hard :frowning:

Check the add-on logs - 502 means it’s not running.

@BruceEmsworth any luck solving this issue? If yes, could you please share what worked for you?

Show the log of Zigbee2MQTT

Having the same problem out of the blue…

As said before:

[16:02:59] INFO: Preparing to start...
[16:02:59] INFO: Socat not enabled
[16:03:01] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-05 16:03:07] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-05 16:03:07] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-05 16:03:07] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-05 16:03:07] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_3ae56b71e1a5ed11bde0eba32981d5c7-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-08-05 16:03:07] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-05 16:03:07] error: 	z2m: Failed to start zigbee
[2024-08-05 16:03:07] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-05 16:03:07] error: 	z2m: Exiting...
[2024-08-05 16:03:07] error: 	z2m: Error: Error: Resource busy, cannot open /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_3ae56b71e1a5ed11bde0eba32981d5c7-if00-port0
[16:03:09] INFO: Preparing to start...
[16:03:10] INFO: Socat not enabled
[16:03:12] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-05 16:03:17] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-05 16:03:17] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-05 16:03:17] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-05 16:03:18] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_3ae56b71e1a5ed11bde0eba32981d5c7-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-08-05 16:03:18] info: 	zh:zstack:znp: Serialport opened

Thought my Sonoff Zigbee was the issue so I just bought a new one and I’m still getting errors. I can’t get Zigbee2MQTT to successfully start to save my life. Please help - thanks

Do you have ZHA running or installed ?

I have the same problem. Log file attached. Note that I have ZHA available and active on the same device, Raspberry Pi 4. Please help.
(2024-08-18 10:06:43] info: z2m: Logging to console, file (filename: log.log)
[2024-08-18 10:06:43] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 10:06:43] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 10:06:44] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525185435-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-08-18 10:06:44] info: zh:zstack:znp: Serialport opened
[2024-08-18 10:06:44] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-08-18 10:06:45] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-08-18 10:07:04] error: z2m: Error while starting zigbee-herdsman
[2024-08-18 10:07:04] error: z2m: Failed to start zigbee
[2024-08-18 10:07:04] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-18 10:07:04] error: z2m: Exiting…
[2024-08-18 10:07:04] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:119:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.ts:139:27)
at start (/app/index.js:154:5)
[10:07:06] INFO: Preparing to start…
[10:07:07] INFO: Socat not enabled
[10:07:08] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-08-18 10:07:14] info: z2m: Logging to console, file (filename: log.log)
[2024-08-18 10:07:14] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 10:07:14] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 10:07:15] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525185435-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-08-18 10:07:15] info: zh:zstack:znp: Serialport opened
[2024-08-18 10:07:15] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-08-18 10:07:16] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-08-18 10:07:35] error: z2m: Error while starting zigbee-herdsman
[2024-08-18 10:07:35] error: z2m: Failed to start zigbee
[2024-08-18 10:07:35] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-18 10:07:35] error: z2m: Exiting…
[2024-08-18 10:07:35] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:119:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.ts:139:27)
at start (/app/index.js:154:5)
[10:07:37] INFO: Preparing to start…
[10:07:38] INFO: Socat not enabled
[10:07:40] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-08-18 10:07:45] info: z2m: Logging to console, file (filename: log.log)
[2024-08-18 10:07:45] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 10:07:45] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 10:07:46] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525185435-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-08-18 10:07:46] info: zh:zstack:znp: Serialport opened
[2024-08-18 10:07:46] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-08-18 10:07:47] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-08-18 10:08:06] error: z2m: Error while starting zigbee-herdsman
[2024-08-18 10:08:06] error: z2m: Failed to start zigbee
[2024-08-18 10:08:06] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-18 10:08:06] error: z2m: Exiting…
[2024-08-18 10:08:06] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:119:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.ts:139:27)
at start (/app/index.js:154:5)
[10:08:08] INFO: Preparing to start…
[10:08:08] INFO: Socat not enabled
[10:08:10] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-08-18 10:08:16] info: z2m: Logging to console, file (filename: log.log)
[2024-08-18 10:08:16] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 10:08:16] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 10:08:16] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525185435-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-08-18 10:08:16] info: zh:zstack:znp: Serialport opened
[2024-08-18 10:08:17] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-08-18 10:08:18] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-08-18 10:08:36] error: z2m: Error while starting zigbee-herdsman
[2024-08-18 10:08:36] error: z2m: Failed to start zigbee
[2024-08-18 10:08:36] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-18 10:08:36] error: z2m: Exiting…
[2024-08-18 10:08:37] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:119:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.ts:139:27)
at start (/app/index.js:154:5)
[10:08:39] INFO: Preparing to start…
[10:08:39] INFO: Socat not enabled
[10:08:41] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-08-18 10:08:47] info: z2m: Logging to console, file (filename: log.log)
[2024-08-18 10:08:47] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 10:08:47] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 10:08:47] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525185435-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-08-18 10:08:47] info: zh:zstack:znp: Serialport opened
[2024-08-18 10:08:47] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-08-18 10:08:49] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-08-18 10:09:07] error: z2m: Error while starting zigbee-herdsman
[2024-08-18 10:09:07] error: z2m: Failed to start zigbee
[2024-08-18 10:09:07] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-18 10:09:07] error: z2m: Exiting…
[2024-08-18 10:09:07] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:119:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29)
at Zigbee.start (/app/lib/zigbee.ts:63:27)
at Controller.start (/app/lib/controller.ts:139:27)
at start (/app/index.js:154:5))

So you have two coordinators plugged into the Pi? Your logs state that it cannot connect to the coordinator.

Does this mean that I have to remove the ZHA? Because I tried to disabel the ZHA but it did not work either.