What is the correct battery replacement process for Zigbee ZHA devices

I keep on having this problem when it comes to my Zigbee battery powered devices when their battery runs out.
I have an automation that checks each day and when batteries are low or ran out I replace them. However the replacement correct process isn’t clear and often the sensors don’t recover and start working again without a lot of messing around.

So what is the correct/definitive process?
After changing the battery do you press and hold the reset on the zigbee device so it goes back into pairing? (Doesn’t work, seems to then never be found again)
Do you trigger it multiple times? (Doesn’t work, nothing updates)
Do you “Start reconfiguration” on the device in ZHA (Which never seems to work)

What am I missing here please?

I literally just change the batteries for my Hue devices and have never had a problem.

I have not changed an Aqara or IKEA battery yet.

Which devices don’t work for you with a simple battery swap out?

1 Like

Thanks, that in itself is good to know.
Mine are Sonoff and a mixture of temperature and motion sensors that all exhibit similar behaviour.

Their Zigbee identifier data is:

MS01
by eWeLink
IEEE: 00:12:4b:00:29:2c:7b:20
Nwk: 0xda0b
Device Type: EndDevice
LQI: 116
RSSI: Unknown
Last Seen: 2024-08-14T15:03:53
Power Source: Battery or Unknown

Agh, OK - I have no experience with those - sorry.

if you just leave them be for a while, do they eventually connect and get going?

I have a similar issue with my temp sensors but I just leave them alone and while later they are fine. Sometimes 30 minutes or so. I figure with these battery powered devices they may have long latency as part of their power management schemes

Most of mine either just come back or for the aqara ones I just push the activity button once.

I have had a few just fall off the network for unknown reasons even tho the battery is still good. In that instance all I need to do is start the ZHA discovery (configure->add device) then put the device in pairing mode. HA will find it again and add it back with exactly the same config as before since it’s based on the ieee number.

those steps haven’t ever failed me yet.

I had a few devices drop due to battery so I thought I’d put a few things to the test to try and work this out.

  1. just replace the battery and wait.
    I’ve now waited more than 48hrs and they are still unavailable in HA. When they detect movement I see the red led light so they are definitely there and I’d assume broadcasting their announcement. This leads me to believe their ID/IEEE has changed.

  2. replace batteries and press their pair/reset button briefly.
    Nothing happens (probably expected since the pair/reset expects a few seconds held in)

  3. hold in pair/reset so led blinks 3 times.
    I didn’t do anything in HA this time, just left it. Device didn’t reappear or start working. I left it around 10 minutes and again checked when movement seen, red light flashes.
    I’m assuming it’s IEEE has now changed?

  4. hold on pair/reset and press reconfigure in HA on existing item.

This process never seems to do anything, I get some random green ticks beside pairing, reporting which makes no sense as in the lower tabular area I get orange crosses. It enevtually says device reconfiguration failed.
Device still doesn’t react and sensors are unavailable.

  1. do nothing to existing object. Put device into pairing again and go to add as new devices in ZHA.
    Search comes back with no results. The led on device does flash a couple of times as though it’s completed pairing.
    Existing object still unavailable and no new devices appears.

  2. Delete old object. Put device into pairing and go to add as new devices in ZHA.
    This tends to be hit or miss if the device appears as a new device in the search. Often I’ll need to repeat this process a few times (9 or 10 sometimes) before it’ll appear and pair.
    When it does appear I rename it to match the deleted item and it returns to normal functions.
    The IEEE has changed.

I do suspect this is the individual device not responding correctly, or acting wrongly or something but I’m struggling to figure it out.
I do have other ZigBee devices wired and battery powered that seem to work correctly so it further suggests it’s these Sonoff devices acting up.

I can’t provide any solution, but I do seem to have a Sonoff door sensor in the same situation. Battery was saying 100% (though it has been since installing it about 4 months ago) but I replaced it anyway. Red LED lights up when door is opened or closed, but no luck getting ZigBee/HA to see it again.

I would be very interested to hear any other thoughts on this as I’ve had similar with several Sonoff motion sensors, which seem to have died on me. I Replacing the batteries has got them flashing red when they detect movement but they never reappear in HA and trying to reset them and add them again has failed too so they’re essentially dead.

Just to add that I’m still having a few problems with these, BUT I think there is a wider problem with some of these devices not re-pairing especially with updated Zigbee/ZHA firmware and/or HA versions.

I found the ‘correct’ process when you change batteries is to put the device back into pairing mode, then in ZHA go to “Add Device”. The device will appear as though just found BUT it will already have it’s name, ID, etc, filled in so don’t change anything, just hit back. All automations, etc will remain.

The problem, seems to be with Sonoff and Aqara devices falling off the network quite often now and is in a few open issues over at ZHA: Multiple Issues with ZHA and Aqara Devices after update to 2024.8.x · Issue #124588 · home-assistant/core · GitHub