-
-
Notifications
You must be signed in to change notification settings - Fork 4
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] Docker entities duplicating on HA restart #60
Comments
@Pacoboyd That's a strange bug. If you enable debug logging on integration and reload it does any errors show up in logs? Anything else in the logs that's showing this strange behaviour? |
home-assistant_unraid_2025-01-15T21-24-46.374Z.log Was able to duplicate by just restarted the integration as well. Looks like it keeps trying to migrate existing sensors to a new unique_id sensor. Not sure why |
Have you tried to remove the integration completely, clear cache, clear Unraid entries from Developer Tools -> Statistics and re-installing it?
This would give you a clean slate with proper entity IDs from the start, avoiding any migration issues completely. From release 2024.12.28 code was refactored and proper entity names and unique IDs was introduced but to migrate old entities to new ones is a hit and miss. |
From the logs, I see Entity ID Collisions and I see multiple instances where entities are being removed and recreated with similar patterns. So its a bug in the migrations.py file |
OK, took steps below, still having an issue unfortunately. After reinstalling, it has the proper entities, but restarting the integration still creates a bunch of unavailable entries.
|
I am actually having this issue as well |
@Pacoboyd did you rename your "device" brought in by the Unraid integration and change all entity IDs to match? I believe that is what's triggering the issue. It tries to recreate the entities from the original device name and then I end up with a bunch of duplicates and name conflicts. FYI, the default name my Unraid integration loads with is "Unraid Server (Server)" so I get entity names like "Unraid Server (Server) Server Docker Service" and the ID as "binary_sensor.unraid_server_server_server_vm_service". I attempted to change these manually to clean up the redundancies in the names created but then is when I ran into this bug mentioned here. EDIT: Actually, this does still occur on restart as well. I get new entities created with _2 at the end and all the original entities go offline. |
Anyone having any luck fixing this? Ended up just uninstalling the integration for now until it can get fixed since I kept getting duplicates. |
Same issue here every restart duplicates everything. |
@Pacoboyd @The-Croz @blair287 @19jm81 I had some free time and made updates to the migration code. When you get time can you please test it and see if it fixes the duplicate entity issue you are experiencing? You will need to download the source code as a zip file from the bug/migrations-fix branch https://github.com/domalab/ha-unraid/tree/bug/migrations-fix Or copy the code files from bug/migrations-fix branch and replace yours then restart home assistant.
|
Tried it out i got a migration error on first start but deleted and readded integration now its all good not creating duplicates I've reloaded integration and restarted HA no more issues. Thanks great work! |
Got a bug happening on my instance that basically every time I restart HA I get a brand new set of docker entities and the old ones all go unavailable. If I do multiple restarts, I get multiple sets of stale entities.
My cards still continue to work because I'm using auto-entities and filtering out unavailable, but it's getting a little tiresome to do cleanup every reboot.
Love the plugin and I have a workaround, just informing of the issue.
Also, would love it if it would remember renamed entities. At first I thought it was an issue with renaming the docker entities, but then even if I didn't rename them, they were still creating new entries on reboot.
The text was updated successfully, but these errors were encountered: