502 Error while starting zigbee-herdsman

I’m trying to integrate my Aqara door sensor. It looks like I need to install zigbee2MQTT, and Mosquitto broker.

I already have a Nortek Zigbee/Z Wave usb dongle controlling my Yale smart lock via Z wave.

When I follow this guide to install everything, I get the following error in the log:

[19:49:08] INFO: Socat not enabled
[19:49:09] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-07-15 19:49:10] info: 	z2m: Logging to console, file (filename: log.log)
[2024-07-15 19:49:10] info: 	z2m: Starting Zigbee2MQTT version 1.39.0 (commit #unknown)
[2024-07-15 19:49:10] info: 	z2m: Starting zigbee-herdsman (0.50.1)
[2024-07-15 19:49:10] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_51600EA7-if01-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-07-15 19:49:11] info: 	zh:zstack:znp: Serialport opened
[2024-07-15 19:49:11] info: 	zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-07-15 19:49:12] info: 	zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-07-15 19:49:30] error: 	z2m: Error while starting zigbee-herdsman
[2024-07-15 19:49:30] error: 	z2m: Failed to start zigbee
[2024-07-15 19:49:30] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-07-15 19:49:30] error: 	z2m: Exiting...
[2024-07-15 19:49:31] 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:101:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:129: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)

When attempting to open the Zigbee2MQTT webUI, i get a “502: Bad gateway” error.

Can someone help me get this set up correctly?

Thanks!

1 Like

Your Zigbee2mqtt configuration is wrong. You need to add

  adapter: ezsp

under serial:

Thank you for the response.

When adding adapter: ezsp to the serial field, and attempting to start the add-on, this is what the logs say:

[14:41:03] INFO: Preparing to start...
[14:41:03] INFO: Socat not enabled
[14:41:03] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-07-16 14:41:05] info: 	z2m: Logging to console, file (filename: log.log)
[2024-07-16 14:41:05] info: 	z2m: Starting Zigbee2MQTT version 1.39.0 (commit #unknown)
[2024-07-16 14:41:05] info: 	z2m: Starting zigbee-herdsman (0.50.1)
[2024-07-16 14:41:05] warning: 	zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see https://github.com/Koenkk/zigbee2mqtt/discussions/21462
[2024-07-16 14:41:15] error: 	zh:ezsp:uart: --> Error: Error: {"sequence":-1} after 10000ms
[2024-07-16 14:41:15] error: 	zh:ezsp:ezsp: Connection attempt 1 error: Error: Failure to connect
    at SerialDriver.resetForReconnect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:347:19)
    at SerialDriver.emit (node:events:517:28)
    at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:348:22
    at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20)
    at SerialDriver.openSerialPort (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:108:13)
    at SerialDriver.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:63:13)
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:353:17)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:164:13)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:129:29)
    at Zigbee.start (/app/lib/zigbee.ts:63:27)
[2024-07-16 14:41:30] error: 	zh:ezsp:uart: --> Error: Error: {"sequence":-1} after 10000ms
[2024-07-16 14:41:30] error: 	zh:ezsp:ezsp: Connection attempt 2 error: Error: Failure to connect
    at SerialDriver.resetForReconnect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:347:19)
    at SerialDriver.emit (node:events:517:28)
    at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:348:22
    at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20)
    at SerialDriver.openSerialPort (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:108:13)
    at SerialDriver.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:63:13)
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:353:17)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:164:13)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:129:29)
    at Zigbee.start (/app/lib/zigbee.ts:63:27)

Seems your USB port is not correct. There is one for Z-Wave, and one for Zigbee. Maybe choose the other one ?