#Deleted Zigbee devices keep coming back (ZHA)

1 messages · Page 1 of 1 (latest)

mint iron
#

I'm currently decommissioning some Zigbee devices. After deleting them via the device screen and then selecting "Remove", at which point you even get the warning "This device will be permanently removed from the Zigbee network", they come back. Just a few hours later they're back in HA (and thus obviously also in the Zigbee network) as if I never clicked that delete button. I'm pretty sure that this is not the intended behavior.

What is going on here? Is this a malfunction in my network which does not send the "go away" trigger to the device (if this is how it works if it's not just deleted from (Z)HA)? Is it a bug in ZHA which rediscovers the device without being told to do so?

I did not click "Add device" in the ZHA page and did not use the pairing trigger on the physical device. The devices were just kept on as I still have to unmount and disassemble them to access the battery.

frosty gyro
mint iron
mint iron
#

And now both are back

bright river
#

Is it mains powered or battery? If battery you may need to wake it up to get the leave network command

mint iron
#

It's battery powered. Ah, so ZHA is just sending a Zigbee command, which might or might not reach the device and "hides" it somehow from HA? I'm still trying to understand how that removed device is coming back with all its properties later on if it was removed.

bright river
#

What kind of device is it? If it has a button on it spam it to keep it awake while sending the remove and see if it changes things.

mint iron
#

Temperature sensors, buttons and a motion sensor. Aqara, Ikea and Sonoff. Last test was with the motion sensor, which was sending the presence state during removal. It again came back after some time.

calm hull
#

If a Zigbee device has your Zigbee network credentials, it's "always" part of your network. You cannot force the device to forget those credentials.
However, you can try to ask it nicely to factory-reset from ZHA, so the device decides to remove credentials.
But it needs to hear the command in order to do that. Most battery-powered sensors sleep the whole time, unless they send data, so they likely won't hear your command.

If you press buttons on the sensors whilst removing it from ZHA, it might hear the removal command. Factory-resetting using the manufacturer's provided reset pattern generally works.

#

You could try to create an automation that listens for any zha_event from the device and then call zha.remove for that IEEE. The trigger would look something like this:

triggers:
  - trigger: event
    event_type: zha_event
    event_data:
      device_ieee: IEEE_here

The device might hear the removal command then, as it's already awake due to sending data, but not guaranteed.

#

We can also looking at adding a blocklist that tries this automatically, but we also can't guarantee that the device is properly removed from your network then.