Zigbee2MQTT back to ZHA

Hi everyone,

I recently moved (well, still moving!) from Samsung SmartThings (ST) to Home Assistant using the HA Green as my platform with a SkyConnect dongle.

(See TL;DR below to skip my self-pitying life story!)

My first ever post was asking how I can get the “decoupled” setting exposed and working for Zigbee switches (Aqara Smart Wall Switch H1 for example). Was advised that ZHA doesn’t support it, but Zigbee2MQTT (Z2M) does. After a bit of tinkering as noob got Z2M working and voila - I had decoupled mode exposed and working - very happy customer!

Then I did my first ever upgrade at the start of December 2013. I brought my HA Green in November 2013, and was excited to see what was new in the 2013.12.1 release so I upgraded…

And now decoupled mode just doesn’t work at all…! :frowning:

From what I’ve read this isn’t just me, have been told that a formal bug report has been submitted and it’s some issue between HA 2013.12.x and Z2M. Nothing I can do other than wait.

When I moved from ZHA to Z2M I upgrade the firmware on my SkyConnect too and disabled the Multiprotocol support for it as recommended by the guides I read about adopting Z2M.

I’ve basically given up on decoupled mode, at least for now, but I do have a genuine requirement for getting Matter/Thread working as I have a number of Aqara P2 door/window sensors. These are currently working with SmartThings but I’d like to move them over to HA.
When trying to enable multiprotocol support on the SkyConnect it totally bricked my Z2M install - could not get the add-on to start up at all until I disabled support for multiprotocol / Thread/Matter. (Yes, I tried ensuring they were both on the same channel…).

So in summary, I’m kind of done with Z2M. The overheads and complexities just don’t seem worth it. Only thing I wanted it for was decoupled mode which no longer works, and on top of that I can’t seem to get multiprotocol support to work when using Z2M so right now I actually have less usable / required functionality that if I just stuck with ZHA! :angry:

TL:DR
How can I rip out Z2M from my HA install and revert to ZHA? ZHA has little to no existing config on it, but I do have a good 12 or so Zigbee devices in Z2M. Would love it if there was a way to move back to ZHA without having to reconfigure every Zigbee device I have which if needed I assume will also mean I’ll have to update every automation and cards on my dashboards too…? :unamused:

Anyone point me in the right direction to go from Z2M to ZHA or do I just have to hack around removing it and re-add everything by hand?

Thanks for your help,

Steve

Nothing to do with 2023.12, it is strictly an issue with the z2m December 1.34 release. It is fixed in the dev branch, so will be in the next z2m release on or around January 1st.

Or switch to the z2m edge addon and it should work.

It works for many of us. Did you change the z2m port appropriately? Point to:

serial:
  port: tcp://core-silabs-multiprotocol:9999
  adapter: ezsp

Stop the z2m addon and uninstall it. Re-add ZHA and choose the options to migrate the stick. It’s been a while, so I don’t remember the exact steps/prompts, but it did work in my testing. It may take an hour or two for all devices to be discovered. Battery devices won’t be seen until they check in.

But for only 12 devices, I’d probably just start from scratch. Devices come back using ZHA’s default naming scheme, so you have to rename them anyway.

1 Like

Do you have a link to the issue?

I’m wondering why I was not affected. Possibly because I’m using serial over IP to communicate with my coordinator?

There were several for the various aqara switches, and some other devices that all had the same underlying cause in 1.34 when changing some settings.

I had an aqara switch in for testing this month. I can confirn for the US version 1.33 worked, 1.34 introduced the error, 1.34-dev fixed it. I’ve since returned the switch I was testing, so can’t confirm 100% today’s version of dev.

If you have an existing switch that kept working, it may be simply that you haven’t attempted to change the mode in 1.34, IIRC.

One of the threads:

1 Like

Thanks for the comprehensive answer.

If it’s something due to be fixed very soon I have no issue with Z2M other than complexity… For example everything was working fine, but I’ve been using the serial port without issues.

Note that I’m using SkyConnect for Zigbee and I have a seperate Aeotec 700 series Z-Wave stick also connected by USB.

My config was:

port: >-
/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_e46d9a70e091ed11871dbfd13b20a988-if00-port0
adapter: ezsp

I’ve now changed it to:

port: tcp://core-silabs-multiprotocol:9999
adapter: ezsp

But I get an error:

[15:34:04] INFO: Preparing to start…
[15:34:05] INFO: Socat not enabled
[15:34:06] INFO: Zigbee Herdsman debug logging enabled
[15:34:10] INFO: Starting Zigbee2MQTT…
Zigbee2MQTT:info 2023-12-25 15:34:20: Logging to console and directory: ‘/config/zigbee2mqtt/log/2023-12-25.15-34-20’ filename: log.txt
Zigbee2MQTT:info 2023-12-25 15:34:20: Starting Zigbee2MQTT version 1.34.0 (commit #unknown)
Zigbee2MQTT:info 2023-12-25 15:34:20: Starting zigbee-herdsman (0.25.0)
2023-12-25T15:34:20.894Z zigbee-herdsman:adapter:ezsp:debg Adapter concurrent: 8
2023-12-25T15:34:20.899Z zigbee-herdsman:controller:log Starting with options ‘{“network”:{“networkKeyDistribute”:false,“networkKey”:[170,12,252,100,219,156,242,163,160,211,12,43,65,168,84,231],“panID”:12092,“extendedPanID”:[233,146,139,212,174,218,75,173],“channelList”:[11]},“serialPort”:{“path”:“tcp://core-silabs-multiprotocol:9999”,“adapter”:“ezsp”},“databasePath”:“/config/zigbee2mqtt/database.db”,“databaseBackupPath”:“/config/zigbee2mqtt/database.db.backup”,“backupPath”:“/config/zigbee2mqtt/coordinator_backup.json”,“adapter”:{“disableLED”:false,“concurrent”:null,“delay”:null}}’
2023-12-25T15:34:20.905Z zigbee-herdsman:adapter:ezsp:uart Opening TCP socket with core-silabs-multiprotocol:9999
2023-12-25T15:34:24.311Z zigbee-herdsman:adapter:ezsp:uart Socket error
2023-12-25T15:34:24.413Z zigbee-herdsman:adapter:ezsp:erro Connection attempt 1 error: Error: Error while opening socket
at Socket. (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:147:24)
at Socket.emit (node:events:525:35)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
2023-12-25T15:34:24.416Z zigbee-herdsman:adapter:ezsp:uart Port closed
2023-12-25T15:34:24.417Z zigbee-herdsman:adapter:ezsp:ezsp Close ezsp
2023-12-25T15:34:24.418Z zigbee-herdsman:adapter:ezsp:driv Close driver

I’ve reverted back to my serial connection to restore service. Will await for a fix in the coming couple of weeks, if not will revert back to ZHA.

Thanks,

Steve

Knowing how to use the edge addon is worthwhile, and not very difficult.

Steps to test your current config with edge:

• Stop the Release add-on

• Disable Start on boot for the Release add-on

• Install the Edge add-on

• Duplicate the HA add-on Configuration tab from Release add-on into the Edge add-on. I generally choose the edit in yaml option, and just cut/paste everything in one block. Be sure to save the changes.

• Enable Edge Start on boot

• Enable Edge Show in sidebar

• Start the edge addon

1 Like