Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Losing identity after re-pair #740

Open
1 task done
danielgindi opened this issue Sep 1, 2023 · 9 comments
Open
1 task done

[Bug] Losing identity after re-pair #740

danielgindi opened this issue Sep 1, 2023 · 9 comments
Labels
bug Something isn't working stale

Comments

@danielgindi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After re-pairing a zigbee device, the device shows up as a new set of accessories in homebridge (the old goes away only after a restart!), and they are practically identified as new accessories, although they do keep their old name!
This means that setup in Homekit needs to be redone.

This is especially annoying with smart lights. As kids push the buttons for a few seconds triggering a re-pair. Destroying existing automations.

Is there a setting to disable this behavior?

Related devices

Tuya light switches

Related Devices

No response

Steps To Reproduce

  1. Re-pair an existing device against zigbee2mqtt
  2. Go to homebridge, you'll see the devices duplicated. The old ones do not respond. After a restart only the new ones will show up.
  3. In Homekit - the devices also did reset as a new device.

Expected behavior

If the plugin knows how to assign the same names that I have assigned to the old ones, it should also use the same ids when registering with Homebridge.

Device entry

No response

Status update

No response

Messages from this plugin

No response

This plugin

1.10.0

Homebridge

1.6.1

Zigbee2MQTT

1.33.0

Homebridge Config UI X (if applicable)

4.50.5

@danielgindi danielgindi added the bug Something isn't working label Sep 1, 2023
@itavero
Copy link
Owner

itavero commented Sep 1, 2023

The plugin assigns an identifier to each device based on its IEEE address, so that doesn't change as far as I know.
I think this might actually be HomeKit itself messing something up.

Perhaps you can try the Controller for HomeKit app to create a backup and see if you can restore it when this happens.

@danielgindi
Copy link
Author

I think this might actually be HomeKit itself messing something up.

This cannot be Homekit's fault if the device appears twice in Homebridge itself, one offline and not responding and one new and responding.
This happens consistently after every re-pair, and happens only with Tuya smart lights. These lights are split to multiple accessories as the number of switches per device, so maybe that is the source if the issue?

@itavero
Copy link
Owner

itavero commented Sep 2, 2023

These lights are not split in to multiple accessories. No device actually is.
HomeKit/Homebridge might represent it as such, but this plugin creates one accessory for every device that Zigbee2MQTT reports.

It's interesting that this occurs.
Can you perhaps share the list of devices reported by Z2M via MQTT, before and after a repair?

@danielgindi
Copy link
Author

I'll do a re-pair tomorrow and list it here (need to be mentally ready to re-doing everything in Homekit again...)
Btw in zigbee2mqtt, when doing a repair it says that the device has left, marks it in red, and then activates it again - it looks as it does know it's the same one.
Where do you want the info from? logs?

@itavero
Copy link
Owner

itavero commented Sep 4, 2023

From MQTT. If you also have the logs from Homebridge and Zigbee2MQTT around the same time, feel free to also include them.

I've repaired device also, but I can't recall having to redo configurations in HomeKit.
If I have some time on my hands, I'll see if I can give that a go as well.

@danielgindi
Copy link
Author

I did a repair of a 1-gang switch (1 accessory), the same thing happened. In mqtt the topic is the same before and after.

Downloaded a backup of homebridge, before and after. All UUIDs are the same. Only network_address has changed. Is that used by Homekit to uniquely identify?

@stale
Copy link

stale bot commented Oct 15, 2023

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

@itavero
Copy link
Owner

itavero commented Jan 8, 2024

Only network_address has changed. Is that used by Homekit to uniquely identify?

I only use the IEEE address in the plug-in.

@stale stale bot removed the stale label Jan 8, 2024
Copy link

stale bot commented Mar 13, 2024

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

@stale stale bot added the stale label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants