Best of both worlds - ZHA and Zigbee2MQTT

I’m glad it seemed to work for you! Unfortunately I cannot seem to make it work :frowning:
I feel like I have tried everything. Everything you noted I’ve tried and my current configuration looks like this:


(also doesn’t work when keeping mqtt empty)

[21:31:04] INFO: Preparing to start...
[21:31:04] INFO: Socat not enabled
[21:31:04] INFO: Zigbee Herdsman debug logging enabled
[21:31:05] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2024-02-13 21:31:06: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2024-02-13 21:31:06: Logging to console and directory: '/config/zigbee2mqtt/log/2024-02-13.21-31-06' filename: log.txt
Zigbee2MQTT:debug 2024-02-13 21:31:06: Removing old log directory '/config/zigbee2mqtt/log/2024-02-13.20-32-15'
Zigbee2MQTT:info  2024-02-13 21:31:06: Starting Zigbee2MQTT version 1.35.3 (commit #unknown)
Zigbee2MQTT:info  2024-02-13 21:31:06: Starting zigbee-herdsman (0.33.8)
Zigbee2MQTT:debug 2024-02-13 21:31:06: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[26],"extendedPanID":[59,141,204,150,41,194,170,223],"networkKey":"HIDDEN","panID":35917},"serialPort":{"baudRate":115200,"path":"/dev/serial/by-id/usb-dresden_elektronik_ConBee_III_DE03190138-if00-port0"}}'
2024-02-13T20:31:06.544Z zigbee-herdsman:adapter Failed to validate path: 'Error: spawn udevadm ENOENT'
2024-02-13T20:31:06.545Z zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[110,250,235,213,123,13,114,154,180,76,110,20,254,50,49,226],"panID":35917,"extendedPanID":[59,141,204,150,41,194,170,223],"channelList":[26]},"serialPort":{"baudRate":115200,"path":"/dev/serial/by-id/usb-dresden_elektronik_ConBee_III_DE03190138-if00-port0"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","adapter":{"disableLED":false,"concurrent":null,"delay":null}}'
2024-02-13T20:31:06.545Z zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with {"path":"/dev/serial/by-id/usb-dresden_elektronik_ConBee_III_DE03190138-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
2024-02-13T20:31:06.549Z zigbee-herdsman:adapter:zStack:znp:log Serialport opened
2024-02-13T20:31:06.550Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1}
2024-02-13T20:31:06.551Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32]
2024-02-13T20:31:06.803Z zigbee-herdsman:adapter:zStack:znp:log Writing CC2530/CC2531 skip bootloader payload
2024-02-13T20:31:06.804Z zigbee-herdsman:adapter:zStack:unpi:writer --> buffer [239]
2024-02-13T20:31:07.805Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1}
2024-02-13T20:31:07.806Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32]
2024-02-13T20:31:08.057Z zigbee-herdsman:adapter:zStack:znp:log Skip bootloader for CC2652/CC1352
2024-02-13T20:31:08.513Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1}
2024-02-13T20:31:08.513Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32]
2024-02-13T20:31:14.515Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1}
2024-02-13T20:31:14.515Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32]
2024-02-13T20:31:20.522Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1}
2024-02-13T20:31:20.523Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32]
Zigbee2MQTT:error 2024-02-13 21:31:26: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-02-13 21:31:26: Failed to start zigbee
Zigbee2MQTT:error 2024-02-13 21:31:26: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-02-13 21:31:26: Exiting...
Zigbee2MQTT:error 2024-02-13 21:31:26: 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:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:109:27)
    at start (/app/index.js:107:5)

I’ve also tried starting Zigbee2MQTT with my ZHA disabled, without luck.

UPDATE: adaper typo fixed to adapter :sweat_smile: Works now!

1 Like

Glad i could help… sort of :sweat_smile:

I also try to run zha and z2m in parallel, but without luck.

I am using one Sonoff Zigbee 3.0 USB Dongle Plus V2 with MultiPAN RCP firmware and add-on Silicon Labs Multiprotocol.

I’am first started zha + add-on Silicon Labs Multiprotocol and added some devices in it, all work ok, then I instaled and configured z2m and try to start addon. z2m won’t start until I disable zha. z2m now starts ok, but when I try to start zha and I get error: failed to set up: network settings do not match most recent backup. the same error apears if I stop z2m. I can not get zha to work any more.

Any idea why is not working?

It’s not working because you cannot run ZHA and Z2MQTT on the same coordinator. As you just found out, they will overwrite each other’s settings each time you stop one and start the other.

The rule is pretty simple: one coordinator per integration. You either permanently switch off 1 of the ZigBee integrations or you buy another coordinator.

PS: Don’t run multiprotocol either. The Devs have made it pretty clear that it’s not recommended since it caused instability.
In case this isn’t clear enough, it means you need yet another coordinator to run thread on its own.

1 Like

It’s indeed easier to migrate ZHA to Z2M using 2 ZigBee coordinators, the advantage is you get the time to do it progressively which allows to compare the features and behaviors too.

I did it successfully and finally cleared my ZHA network, I repaired them one by one and it was easier than I though as it can be done remotely or easily for most devices. Many devices just need to be removed for them to search and present themselves to any new opened network.
image image
Integrations

As you can see, you can visually identify both brokers, and you can involve devices of both networks in automations, dashboards etc. transparently.
image
Devices view

Once I understood Z2M enough, it seemed more powerful than ZHA (at least until now November 2024). For example I found very useful the reporting & binding params (maybe we can do it also with ZHA but it seems pretty straight forward on Z2M)


In this example I’ve bound a button to a light so they communicate directly without passing by the coordinator, which does not prevent me to control them and see their states from HomeAssistant

Here I’ve changed the frequency at which the temperature is reported to improve the precision (since I’m using this one to control my heating boiler)

The representation of the devices with their photos in Z2M is also very cool to identify them quickly.
image

Devices can also be updated pretty simply with the OTA.