From Z2M to ZHA

I am having too many issues with Z2M and I want to switch back to ZHA. So I unload Z2M and install ZHA.

Anything else I have to do? How do I reset the stick? The devices from Z2M don’t show up, but I guess they are still stored on the stick, right?

I don’t think the devices will show up automatically, Zwave stores the device database in the stick but I don’t think this is the case with Zigbee.

You can either repair your devices manually with ZHA (which will be a pain if you have many devices) or maybe you can migrate the database as covered in the following video but you will need to check whether the method can be used for moving from Z2M to ZHA.

When I migrated to a new Zigbee stick recently I had a look at this video but decided it was simpler to repair my 28 devices.

1 Like

Thanks, I reset all devices and connected them to ZHA. Wasn’t too much work.

Btw. does this mean I can replace the stick without any problems?

You can change sticks but you’d need to migrate the devices over again.

Note, good practice to delete the old zigbee.db file when transferring over to a new stick. It more than likely won’t matter but you can run into some issues such as ghost devices showing up. I’ve switched multiple times and started running into odd issues - turned out I had 7 old zigbee.db files built up bc of all the switching.

But why do you think zha would solve your issues you are having with z2m?

I am desperate… but also less things to break make it easier.

Not really. You will need to re-pair the devices to get things working.

Under ZHA I replaced a Nortek HUSBZB-1 with a Sonoff Z3+ stick using the backup/restore techniques in video posted above without having to re-pair anything.

A good bit of work has been done with zha/zha-tools since then, so I think it should be even easier now.

The video is NOT going to do you any good migrating from z2m to zha. That process is a ground-up rebuild of the network.

Besides being desperate, which a bad zigbee network can easily lead to. What are the problems?

Be aware that ZHA or Z2M are not handling the actual zigbee network. They are only communicating with it. Hence, if you have a bad network with devices dropping in Z2M, unfortunately this will probably continue in ZHA (or the other way round)

When moving, I would suggest to get one more coordinator and have Z2M and ZHA running at the same time, will make your move much easier as all automations etc will not have to be changed at the same time.

I feel like having a separate system (add-on) responsible managing physical devices and home assistant as acting as a gateway for this system safer :slight_smile:

So, home assistant updates cannot break z2m system itself, but i might break zha. I am not saying zha is more prone to error but separation of concerns is my preference