Zigbee2MQTT 2.0.0-1 Lost Connection To ZBT-1

Hi folks,

All was working fine till I just updated to the latest Zigbee2MQTT and the HA core update and now I get this:

Starting Zigbee2MQTT without watchdog.
[2025-01-03 23:00:06] info: 	z2m: Logging to console, file (filename: log.log)
[2025-01-03 23:00:06] info: 	z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-03 23:00:06] info: 	z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-03 23:00:07] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Silicon Labs","serialNumber":"b8923cbbfb7ced118098dff3fdf7b791","pnpId":"usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_b8923cbbfb7ced118098dff3fdf7b791-if00-port0","vendorId":"10c4","productId":"ea60"} => zstack: path=/dev/ttyUSB0, score=2
[2025-01-03 23:00:07] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-01-03 23:00:07] error: 	z2m: Error while starting zigbee-herdsman
[2025-01-03 23:00:07] error: 	z2m: Failed to start zigbee-herdsman
[2025-01-03 23:00:07] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-03 23:00:07] error: 	z2m: Exiting...
[2025-01-03 23:00:07] error: 	z2m: Error: Error Resource temporarily unavailable Cannot lock port

I canā€™t work out whatā€™s bust, Iā€™ve tried restarting everything several times, unplugged the adaptor physically and so on but all to no avail, I canā€™t get MQTT to restart for some reason I canā€™t fathom.

See if this helps:

1 Like

Do you have this error?:
[2025-01-03 18:10:26] error: z2m: Error: Cannot discover TCP adapters at this time. Specify valid ā€˜adapterā€™ and ā€˜portā€™ in your configuration.

If you do add
adapter: zstack
after port: tcp://xxx.xxx.x.xxx:6638
Save and restart addon

1 Like

Thanks, I read through the changes but to be honest most of it I didnā€™t get, Iā€™m a plug ā€˜nā€™ play type though pointed in the right direction I can usually get by.

What I get is the following:

Starting Zigbee2MQTT without watchdog.
[2025-01-03 23:45:13] info: 	z2m: Logging to console, file (filename: log.log)
[2025-01-03 23:45:14] info: 	z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-03 23:45:14] info: 	z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-03 23:45:14] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Silicon Labs","serialNumber":"b8923cbbfb7ced118098dff3fdf7b791","pnpId":"usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_b8923cbbfb7ced118098dff3fdf7b791-if00-port0","vendorId":"10c4","productId":"ea60"} => zstack: path=/dev/ttyUSB0, score=2
[2025-01-03 23:45:14] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-01-03 23:45:14] error: 	z2m: Error while starting zigbee-herdsman
[2025-01-03 23:45:14] error: 	z2m: Failed to start zigbee-herdsman
[2025-01-03 23:45:14] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-03 23:45:14] error: 	z2m: Exiting...
[2025-01-03 23:45:14] error: 	z2m: Error: Error Resource temporarily unavailable Cannot lock port

Based on this from the YAML in Zigbee2MQTT:

data_path: /config/zigbee2mqtt
socat:
  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
mqtt: {}
serial:
  adapter: zstack

Sorry, I should have said, this is on an HA Green using the ZBT-1 that are both fresh, new about two or three months ago so I didnā€™t expect there to be any issues.

As well as making sure your config/zigbee2mqtt/configuration.yaml file is correct as per the instructions there was also a link to this: Z2M 2.0.0: `USB adapter discovery error (No valid USB adapter found)` Ā· Koenkk/zigbee2mqtt Ā· Discussion #24364 Ā· GitHub

So:

  1. Check your config is correct and contains the correct xxx_legacy: false options.

  2. Make sure you add a valid adapter: option (last option under serial here: zigbee2mqtt.io/docs/guide/configuration/adapter-settings.md at 7cd6444db68c875630de4fdfa814a6d8d77c6974 Ā· Koenkk/zigbee2mqtt.io Ā· GitHub

serial:
    port: /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00
    # Adapter type, allowed values: `zstack`, `ember`, `deconz`, `zigate` or `zboss`
    adapter: zstack

To the /homeassistant/configuration.yaml file I added, as I thnk was intended:

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

And in the Zigbee2MQTT config for serial it is:

serial:
  port: >-
    /dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_6aca14c4533aef11a3352b1455516304-if00-port0
  adapter: zstack

With the path for the port copied from the connect in hardware config where the docs said to find that.

It still faikls to start with the same error being given, I think Iā€™ve missed something or done something incorrectly but I canā€™t work out what that is.

Update, put the info into the zigbee2mqtt config, this:

serial:
    port: /dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_6aca14c4533aef11a3352b1455516304-if00-port0
    adapter: zstack 

And now it connects but I get:

Starting Zigbee2MQTT without watchdog.
[2025-01-04 00:34:57] info: 	z2m: Logging to console, file (filename: log.log)
[2025-01-04 00:34:57] info: 	z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-04 00:34:57] info: 	z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-04 00:34:58] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_6aca14c4533aef11a3352b1455516304-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-01-04 00:34:58] info: 	zh:zstack:znp: Serialport opened
[2025-01-04 00:34:58] info: 	zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2025-01-04 00:34:59] info: 	zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2025-01-04 00:35:18] error: 	z2m: Error while starting zigbee-herdsman
[2025-01-04 00:35:18] error: 	z2m: Failed to start zigbee-herdsman
[2025-01-04 00:35:18] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-04 00:35:18] error: 	z2m: Exiting...
[2025-01-04 00:35:18] error: 	z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:113:27)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:142:13)
    at start (/app/index.js:161:5)

Argh, this is driving me nuts, I can now get it to open and connect to the serial port but it fails to see the adaptor for some reason and I tried it as ā€œemberā€ but that fails as well, different error from using the ā€œstackā€ but it still fails.

Iā€™m at a loss as to what to try now. :frowning:

Try a full host reboot rather than just a Home Assistant restart.

its config/zigbee2mqtt/configuration.yaml not home assistantā€¦

2 Likes

So I just updated to z2m 2.01 - and I also had issues.

First of all I misspelled adapter: zstack as adaptor: zstack once I fixed that z2m connected to my adaptor.

I could then see all my devices in the z2m web interface but they were all missing in Home Assistant. A home assistant restart (not host reboot) seems to have fixed that.

2 Likes

I had the same issue after the upgrade but adding ā€œadapter: zstackā€ to the zigbee2mqtt\configuration.yaml under the ā€œport:ā€ in the ā€œserialā€ config did the trick.

Thank you! I missed that notice in the changelog and it has been a couple of very scary minutes!

Everything is back in order after adding the suggested line to the configuration file: thanks for describing the path and the change to made so clearly that even with a few minutes of spare time I could find the answer quickly enough.

All devices are readily available in HA after restarting the Z2M component, without needing an additional restart.

Thanks guys, I still cant get it to work, in the Z2M config yaml I have this on the end of it, I checked the yaml code and itā€™s supposed to be valid as shown here:

homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
legacy: false
serial:
  port: >-
    #Your adaptor port details found in the hardware details
  adaptor: zstack

In the Z2M config UI it is:

serial:
  adaptor: zstack
  port: >-
    /dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_6aca14c4533aef11a3352b1455516304-if00-port0

Yet I persistently get this eror despite trying the same thing with the different apaptor spelling etc:

[12:41:12] INFO: Preparing to start...
[12:41:12] INFO: Socat not enabled
[12:41:13] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-01-04 12:41:21] info: 	z2m: Logging to console, file (filename: log.log)
[2025-01-04 12:41:21] info: 	z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-04 12:41:21] info: 	z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-04 12:41:21] error: 	z2m: Error while starting zigbee-herdsman
[2025-01-04 12:41:21] error: 	z2m: Failed to start zigbee-herdsman
[2025-01-04 12:41:21] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-01-04 12:41:21] error: 	z2m: Exiting...
[2025-01-04 12:41:21] error: 	z2m: Error: USB adapter discovery error (No valid USB adapter found). Specify valid 'adapter' and 'port' in your configuration.
    at discoverAdapter (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/adapterDiscovery.ts:523:15)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Function.create (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/adapter.ts:68:33)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:132:24)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:142:13)
    at start (/app/index.js:161:5)
[2025-01-04 12:41:21] error: 	z2m: If this happens after updating to Zigbee2MQTT 2.0.0, see https://github.com/Koenkk/zigbee2mqtt/discussions/24364

You still have error about adapter.
add
adapter: zstack
after port:
in configuration
Save and restart addon

1 Like

In the Z2M config yaml I have, under ā€œadvancedā€:

homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
legacy: false
serial:
  port: >-
    /dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_6aca14c4533aef11a3352b1455516304-if00-port0
  adapter: zstack

adapt E r ! :grimacing:

Iā€™m having the same issue with a network slzb06 deviceā€¦

Determine what adapter you are using by going
Possible adapters are zstack, ember, deconz, zigate or zboss.