Koenkk / zigbee2mqtt

Zigbee šŸ to MQTT bridge šŸŒ‰, get rid of your proprietary Zigbee bridges šŸ”Ø
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.8k stars 1.64k forks source link

zigbee2mqtt UI in home assistant displays group that is out of sync with its underlying database #23929

Open adamawolf opened 1 week ago

adamawolf commented 1 week ago

What happened?

I was working on renaming some of my zigbee devices and groups to have a more consistent naming scheme.

I renamed a group but found that after renaming that group it wasn't getting picked up by the HomeKit Bridge integration (not getting sent to Home.app). So I created another group that included the same zigbee devices, and this group was successful in sending to Home.app via the HomeKit integration.

So far, mostly ok. The real problem started when I went to rename the next set of devices/groups. I renamed the devices, then this time decided I would delete the existing group and create a fresh one (to avoid the possible failure to sync to HomeKit bug I experienced the first time). I created the new group, but then when I attempted to add a device to that group I got the error message: z2m: Failed to add from group (DatabaseEntry with ID '31' does not exist)

I tried to delete that group, thinking that something might be wrong with that particular group. I got a similar error (Failed to remove group 'stairway_chandelier' (force: false) (Error: DatabaseEntry with ID '31' does not exist)

Ditto if a create a new group.

What did you expect to happen?

Adding devices, or removing the broken group would be successful.

How to reproduce it (minimal and precise)

Please see my What Happened? answer for the closest I have to repro steps.

Zigbee2MQTT version

1.40.1

Adapter firmware version

20240710

Adapter

SLZB-06

Setup

Add-on on HAAS, running on a minix 0db

Debug log

z2m_err.log

adamawolf commented 1 week ago

Could someone point me towards where I can poke around the internal database z2m add-on uses to track the state shown in the Frontend? It seems like for whatever reason z2m has an ID cursor that's out of sync with reality (where "reality" is defined by the actual zigbee protocol groups).

This is a new Home Assistant install I'm setting up in a new home (just moved). Unfortunately I didn't have my NAS set up yet so don't have any backups to rollback too. Hoping I can fix forward šŸ˜¬