Removal paired device using zigbee2mqtt assistant to re-pair

Hi, I have zigbee2mqtt assistant installed and lately my one of my Xiaomi motion sensor stopped reporting to cc2531 stick. There is nothing reported in the zigbee2mqtt log for that sensor. Other sensors are working fine.

I’m thinking to re-pair the sensor again to see if it fixes the problem. However, I’m wondering what’s the right way to remove the device in zigbee2mqtt so that i can factory reset the sensor and re-pair.

There are options in zigbee2mqtt assistant that you can remove the device or force remove. I’m confused about these two options.

Can someone here please advise what should I do to re-pair a paired device to zigbee2mqtt?

Thanks in advance.

Hi,

I sometimes get the same issue and just hold the reset button until the blue light flashes. I then leave it for 30 seconds and it’s suddenly working again.

No re-pair needed.

Simon

Thanks for the advice. May i know are you doing a single short press or hold press until blue light flashes? Also, which sensor model you are using? Is it Xiaomi or Aqara? I’m using Xiaomi sensor, RTCGQ01LM model.

Hi,

Long hold until it flashes blue. I have both sensor types RTCGQ01LM & RTCGQ11LM and both sometimes need a button press.

It does not happen often and I usually think the battery is flat but it normally just a button hold that fixes it.

My Xiaomi buttons and cube have also had the same issue.

It only happens every 3 to 6 months.

Simon

Did you turn on the permit join of the zigbee2mqtt before long hold the button?

No I didn’t.

Single press or hold pressing don’t fix the problem. End up I’m getting Aqara sensor to replace it.

Before you buy another one, did you try with a new battery ?

Yeah, I will give it a try.

Does anyone know how is the force remove in zigbee2mqtt assistant addon works? Does it actually remove the entry in zigbee2mqtt + MQTT network?

zigbee2mqtt/bridge/config/remove #

Allows you to remove devices from the network. Payload should be the friendly_name , e.g. 0x00158d0001b79111 . On successful remove a device_removed message is sent.

Note that in Zigbee the coordinator can only request a device to remove itself from the network. Which means that in case a device refuses to respond to this request it is not removed from the network. This can happen for e.g. battery powered devices which are sleeping and thus not receiving this request. In this case you will see the following in the zigbee2mqtt log:

zigbee2mqtt:info  2019-11-03T13:39:30: Removing 'dimmer'
zigbee2mqtt:error 2019-11-03T13:39:40: Failed to remove dimmer (Error: AREQ - ZDO - mgmtLeaveRsp after 10000ms)

An alternative way to remove the device is by factory resetting it, this probably won’t work for all devices as it depends on the device itself. In case the device did remove itself from the network, you will see:

zigbee2mqtt:warn  2019-11-03T13:36:18: Device '0x00158d00024a5e57' left the network

In case all of the above fails, you can force remove a device. Note that a force remove will only remove the device from the database. Until this device is factory reset, it will still hold the network encryption key and thus is still able to communicate over the network!

To force remove a device use the following topic: zigbee2mqtt/bridge/config/force_remove

Thanks for the info. In my case, my Xiaomi notion sensor is not responding to my zigbee2mqtt anymore. So i believe i will have to do force remove then factory reset and re-pair the device.

Will post the result here

1 Like

Did you manage to repair them?

I just force-removed an Osram plug (because a normal remove gave an error), but I’m not able to re-pair it afterwards. When I factory-reset the plug, Zigbee2MQTT won’t see it anymore. So I’m not able to pair again.

Try to stop zigbee2mqtt, unplug your stick, plug it back in, restart zigbee2mqtt and pair again.

After a cold boot of my Rpi, I managed to re-pair!

I’ve been having the same problem - I had to shutdown zigbee2mqtt, unplug my CC2531 stick, plug it back in, restart zigbee2mqtt and then hold the button for ~5 seconds and it paired instantly.