You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to have gotten my database into a bad state somehow when I deleted an existing group with Group ID 1, then created a new group with the same name (got assigned Group ID 1 again), and now I can't add any devices to that group. The error that I get whenever I try to add any of my devices to this new group is
[2025-01-05 17:27:27] error: z2m: Failed to add from group (DatabaseEntry with ID '161' does not exist)
And sure enough, ID 161 is skipped/absent in my database.db. The normal device before it got ID 160, and the new group got ID 162, so I don't know what it's looking for with ID 161. Weirdly, if I add another group, which gets Group ID 28, it gets assigned to ID 163 and I can add devices to it just fine (including the same devices that I couldn't add to the first group).
Weirdly, after a while, the devices that I had tried to add earlier showed up in the UI, but now any attempt to remove them or add more result in the same (DatabaseEntry with ID '161' does not exist) error. I'm attaching a log where you can see debug logging for the last several minutes.
What did you expect to happen?
I expected to be able to add a group and populate it with devices.
How to reproduce it (minimal and precise)
Hard to say if this is reproducible outside of my specific setup, but I did what I described above.
Had a group with group ID 1 that was working
Deleted it
Created a group with the same name (got group ID 1)
Tried to add devices to it, which all fail with z2m: Failed to add from group (DatabaseEntry with ID '161' does not exist)
Create another group
Added devices to it without any problem.
I'm currently doing this through the web frontend, so I don't know if it's a side effect of that or a problem in the backend. I do get the same error if I sent the following command through MQTT:
I could cause the problem by adding devices to reused group IDs (happens automatically). If I create a group with an ID that has never existed before, I have no problems.
What happened?
I seem to have gotten my database into a bad state somehow when I deleted an existing group with Group ID 1, then created a new group with the same name (got assigned Group ID 1 again), and now I can't add any devices to that group. The error that I get whenever I try to add any of my devices to this new group is
[2025-01-05 17:27:27] error: z2m: Failed to add from group (DatabaseEntry with ID '161' does not exist)
And sure enough, ID 161 is skipped/absent in my
database.db
. The normal device before it got ID 160, and the new group got ID 162, so I don't know what it's looking for with ID 161. Weirdly, if I add another group, which gets Group ID 28, it gets assigned to ID 163 and I can add devices to it just fine (including the same devices that I couldn't add to the first group).Here's the database.db snippet:
Weirdly, after a while, the devices that I had tried to add earlier showed up in the UI, but now any attempt to remove them or add more result in the same
(DatabaseEntry with ID '161' does not exist)
error. I'm attaching a log where you can see debug logging for the last several minutes.What did you expect to happen?
I expected to be able to add a group and populate it with devices.
How to reproduce it (minimal and precise)
Hard to say if this is reproducible outside of my specific setup, but I did what I described above.
z2m: Failed to add from group (DatabaseEntry with ID '161' does not exist)
I'm currently doing this through the web frontend, so I don't know if it's a side effect of that or a problem in the backend. I do get the same error if I sent the following command through MQTT:
Zigbee2MQTT version
2.0.0
Adapter firmware version
ZStack 20240710
Adapter
Tubesz POE 2023 (2652P7)
Setup
Container on an Intel N100
Debug log
log.log
The text was updated successfully, but these errors were encountered: