#Zigbee2MQTT+TubesZB: "Error while starting zigbee-herdsman" and "Failed to connect to the adapter"

20 messages ยท Page 1 of 1 (latest)

thin egret
#

I updated Zigbee2MQTT to version 2.0.0-1 today and it will no longer start. It fails with this log series repaeating on every start attempt:

[18:58:29] INFO: Preparing to start...
[18:58:29] INFO: Socat not enabled
[18:58:29] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-01-03 18:58:31] error:     z2m: Error while starting zigbee-herdsman
[2025-01-03 18:58:31] error:     z2m: Failed to start zigbee-herdsman
[2025-01-03 18:58:31] error:     z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-03 18:58:31] error:     z2m: Exiting...
[2025-01-03 18:58:31] error:     z2m: Error: Cannot discover TCP adapters at this time. Specify valid 'adapter' and 'port' in your configuration.
    at findTCPAdapter (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapterDiscovery.ts:470:15)
    at discoverAdapter (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapterDiscovery.ts:496:26)
    at Function.create (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapter.ts:68:54)
    at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/controller/controller.ts:132:38)
    at Zigbee.start (/app/lib/zigbee.ts:69:47)
    at Controller.start (/app/lib/controller.ts:142:13)
    at start (/app/index.js:161:5)
#

I thought the configuration might be messed up so I went to "configuration" and noted that the serial section was not populated with the line port: tcp://192.168.xxx.xxx:6638 as denoted in the tutorials. I added back that line and included the IP address of the TubesZB.
Additional info:
TubesZB reports: Firmware 2021.9.3
Home Assistant is:

Core: 2025.1.0
Supervisor: 2024.12.3
Operating System: 14.1
Frontend: 20250103.0

Other than rolling zigbee2mqtt back to a previous (hopefully) working version, Can someone tell me what I can do to troubleshoot this?

sturdy mauve
#

the error message above tells you what to do:

[2025-01-03 18:58:31] error: z2m: Error: Cannot discover TCP adapters at this time. Specify valid 'adapter' and 'port' in your configuration.

thin egret
#

hmm. ok, I've added the section described in the breaking change here:

advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
  log_level: error
device_options:
  legacy: false

and then I went to my installation notes and verified the "serial" line was populated with my TubesZB adapter IP as shown here:

port: tcp://192.168.77.234:6638

but I get the exact same error on startup. ๐Ÿ˜ฆ

#

I also visited that IP and the TubesZB responds there with its web interface so i know its running..

#

wait a sec. does this:
z2m: Error: Cannot discover TCP adapters at this time
mean I cannot use TubesZB PoE coordinator with Zigbee2MQTT now?

sturdy mauve
#

no, that's not the part that I pointed to

#

Improved adapter discovery; when upgrading from Zigbee2MQTT 1.x.x, this might result in USB adapter discovery error (No valid USB adapter found), see Z2M 2.0.0: USB adapter discovery error (No valid USB adapter found) #24364 how to fix this.

#

where it says "Add this line"

thin egret
#

I am not using a USB adapter though

sturdy mauve
#

ignore that

#

the problem, as it tells you, is the adpater

thin egret
#

Cool! it started after I added that line. Since I saw the section:

serial:
  port: /dev/ttyACM0

I thought it was for folks that had the USB dongle type adapter! ๐Ÿคฆ

sturdy mauve
#

they went through the same journey as you

thin egret
#

So, in case anyone else stumbles over this, the solution was as follows:

  1. Open File editor
  2. Navigate to zigbee2mqtt folder
  3. Select the configuration.yaml file
  4. Locate the following section:
serial:
  port: tcp://192.168.1.198:6638
  adapter: zstack # <-- Add this line
  1. add the line indicated (details about this change are here https://github.com/Koenkk/zigbee2mqtt/discussions/24364 )
  2. Locate the "advanced" section and edit it to show:
advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
  log_level: error
  1. Save the file
  2. Start the add on & check the log
GitHub

TL;DR Add adapter (likely zstack, see docs for more info) to your Zigbee2MQTT configuration.yaml, example: serial: port: /dev/ttyACM0 adapter: zstack # <-- Add this line What changed? Koenkk/zig...

#

Thanks @sturdy mauve for your help! ๐Ÿ‘ ๐Ÿ˜„

#

since my door locks depend on zigbeee I really needed this working! ๐Ÿ˜›