Zigbee (migrate from ZHA to Zigbee2MQTT)

Hello!

I am trying to get Zigbee2MQTT working and struggling a bit.

Thank you all in advance for your help!

I have the Nabu_Casa_SkyConnect_v1.0 dongle. I am using both Zigbee and Matter via the that dongle. I have the following installed:

  • Matter Server add-on (version 5.4.1)
  • Mosquitto broker add-on (version 6.4.0).
  • Silicon Labs Multiprotocol add-on (version 2.4.4).
  • Zigbee Home Automation integration is installed and was working.
  • Zigbee2MQTT add on installed (version 1.36.0-1).

Here are the errors I am seeing when I try to start Zigbee2MQTT:

[13:11:27] INFO: Preparing to start...
[13:11:27] INFO: Socat not enabled
[13:11:28] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info 2024-03-09 13:11:29: Logging to console and directory: '/config/zigbee2mqtt/log/2024-03-09.13-11-29' filename: log.txt
Zigbee2MQTT:info 2024-03-09 13:11:29: Starting Zigbee2MQTT version 1.36.0 (commit #unknown)
Zigbee2MQTT:info 2024-03-09 13:11:29: Starting zigbee-herdsman (0.35.1)
Zigbee2MQTT:error 2024-03-09 13:11:29: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-03-09 13:11:29: Failed to start zigbee
Zigbee2MQTT:error 2024-03-09 13:11:29: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-03-09 13:11:29: Exiting...
Zigbee2MQTT:error 2024-03-09 13:11:29: Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/serialPort.ts:28:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22)
at /app/node_modules/@serialport/stream/dist/index.js:118:18

Here the settings I have to 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

user: mqtt
password: mqtt

serial

/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_b0076cd6c596ed118649c098a7669f5d-if00-port0

Have you disabled ZHA? You can’t have both running at the same time unless you have two dongles. That might be a good idea in any case, as Matter is still experimental. There’s a good post here about the best coordinatopr for Z2M:

Would this work?

https://a.co/d/gdvrhmT

SONOFF Zigbee 3.0 USB Dongle Plus-E Gateway, Universal Zigbee USB Gateway with Antenna for Home Assistant, Open HAB, Zigbee2MQTT etc, Wireless Zigbee 3.0 USB Adapter

Zigbee2MQTT has experimental support for it so it works but is not recommend, so do read → Zigbee buyer's guide

for Zigbee2MQTT, buy this one

https://www.amazon.com/SONOFF-Gateway-Universal-Assistant-Wireless-dp-B09KXTCMSC/dp/B09KXTCMSC/ref=dp_ob_title_def?th=1

Should uninstall the Multiprotocol add on as well? Will I still be able to use Matter?

If you have 2 dongles, you can use the SkyConnect for ZHA and Thread/Matter, and the other one for Zigbee2MQTT. No need to uninstall multiprotocol in that case.