Deleted deconz groups remain visible in Devices list

Hi all,

Think it’s a bug, not really a deal-breaker but it triggers my ocd :grin:

Like the title says:

These three groups were deleted from Deconz, but are still visible under devices. Any way to get rid of them?

3 Likes

As per suggestion by @Robban in this thread:

I looked for remotes that stayed behind, and indeed I found one. However after deleting, deconz.device_refresh, reboot my HA, still no avail…

EDIT:

Since deconz is running in a container, I can’t really install the full deconz app, short of installing a second Rpi. So I decided to query the Rest api… I can’t start postman either so curl had to do…

~ $ curl  "http://172.30.33.0:40850/api/xxxxxxxxxxxxx/groups" | jq '.' | grep name
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2841  100  2841    0     0   396k      0 --:--:-- --:--:-- --:--:--  396k
    "name": "Kamer Kurt SP120",
    "name": "Kurt Zetel",
    "name": "Kurt Bed",
        "name": "Kurt Wake Up",
    "name": "RWL021 16",
    "name": "ICZB-RM11S 6",
    "name": "ICZB-RM11S 6",
    "name": "ICZB-RM11S 6",
    "name": "ICZB-RM11S 6",
    "name": "Kamer xxxxxxxxx",

Yep, some more groups remained behind, ‘ICZB-RM11S 6’ is an Icasa remote I’m using, but is not visible in deconz, I use deconz_event for that.

Decided to delete those:

$ curl -X DELETE "http://172.30.33.0:40850/api/xxxxxxxxxxx/groups/42756"
[{"success":{"id":"42756"}}]
$ curl -X DELETE "http://172.30.33.0:40850/api/xxxxxxxxxxx/groups/42755"
[{"success":{"id":"42755"}}]
$ curl -X DELETE "http://172.30.33.0:40850/api/xxxxxxxxxxx/groups/42754"
[{"success":{"id":"42754"}}]
$ curl -X DELETE "http://172.30.33.0:40850/api/xxxxxxxxxxx/groups/42753"
[{"success":{"id":"42753"}}]
curl  "http://172.30.33.0:40850/api/xxxxxxxxxxx/groups" | jq '.' | grep id
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1604  100  1604    0     0   174k      0 --:--:-- --:--:-- --:--:--  174k
    "id": "10",
    "id": "11",
    "id": "12",
        "id": "1",
    "id": "25558",
    "id": "7",

Icasa remote still seems to work…

but groups are not gone from device list :face_with_symbols_over_mouth:

Even better, after reboot, when I press the remote the groups are brought back from the dead :rofl:

04:27:13:920 button 2002 On
04:27:13:930 reanimate group 42753 for sensor ICZB-RM11S 3
04:27:13:930 Attached sensor 3 to group ICZB-RM11S 6
04:27:14:528 button 4002 On
04:27:14:537 reanimate group 42754 for sensor ICZB-RM11S 4
04:27:14:537 Attached sensor 4 to group ICZB-RM11S 6
04:27:15:493 button 3002 Off

still not convinced these are the groups to blame though: they were still present in device list when I deleted them, plus the amount does not match.

Ah enough time spent on this for tonight…

I also have duplicate Deconz groups.
I just updated to 1.04 and several all of my groups were duplicated in hassio. I’ve had to delete the old group and change the name of the new group to the previous name. The old group is still there though despite deleting it in hassio and restarting.

Thanks for the reply!

Recently I had to re-install > my DB blew up and my SD card just gave up.

After that, without reset of my Conbee II, no more duplicate groups. So yeah imho the issue is in the HA DB…

Plan for this weekend is to install on a NUC, to get rid of the SD card dependency. I’m still on my first steps into HA so the number of lights/switches/outlets is still doable (16 lights, 3 outlets, 3 switches)

I deleted the group in deconz also, still in HA visible
Then I deleted the group that hidden registry file… afterwards it’s also gone from HA

Hi Fabio,

Could you be more specific? What hidden file are you referring to?

I don’t have this issue anymore, but I would like to know how exactly you got rid of the groups.

KR,
Kurt

removed it from this file : core.device_registry , located in that hidden folder .storage

That is great info for me, unfortunately I cannot test it since after reinstall my ‘ghost’ groups are no longer present.

But if someone else can verify/acknowledge? I will mark this answer as a solution for this issue

Tnx Fabio!

@kurtj - I had the same problem (groups deleted from deConz but not HA) and was able to use @pergola.fabio’s solution.

  1. Install the File editor add-on, go to the add-on configuration, and remove .storage from the filter
dirsfirst: false
enforce_basepath: true
ignore_pattern:
  - __pycache__
  - .cloud
  - .storage  <--------delete this
  - deps
ssh_keys: []
  1. In the file editor, navigate to .storage/core.device_registry, then delete the two JSON entries (mine looked like this), then save
            {
                "config_entries": [
                    "d83c56d69aac4a64936d2ff80818aac7"
                ],
                "connections": [],
                "identifiers": [
                    [
                        "deconz",
                        "00212EFFFF04FBBC-/groups/2"
                    ]
                ],
                "manufacturer": "Dresden Elektronik",
                "model": "deCONZ group",
                "name": "Attic",
                "sw_version": null,
                "entry_type": null,
                "id": "2f35f41bff9111ea91cdd916a8cc16eb",
                "via_device_id": "d370dfc287ec471a94df24d6ee469124",
                "area_id": null,
                "name_by_user": null
            },
            {
                "config_entries": [
                    "d83c56d69aac4a64936d2ff80818aac7"
                ],
                "connections": [],
                "identifiers": [
                    [
                        "deconz",
                        "00212EFFFF04FBBC-/groups/3"
                    ]
                ],
                "manufacturer": "Dresden Elektronik",
                "model": "deCONZ group",
                "name": "Master Bedroom",
                "sw_version": null,
                "entry_type": null,
                "id": "2f36733aff9111ea862d23881acd2b9a",
                "via_device_id": "d370dfc287ec471a94df24d6ee469124",
                "area_id": null,
                "name_by_user": null
            },
  1. Restart HA
1 Like

Hi @lmm7425

Thanks for the info, to be honest it has been a while since I visited. After a while you stop playing and just expect these things to work (almost like housemates)

Thing is one of my sensors battery got empty and I had to replace them. Of course after adding it again in deconz I’m stuck with 'entity ID already exists so I got on the forums again and as such I just saw your post :grinning:

I haven’t tried your suggestion yet, but I found some documentation of a ‘new’ service in deconz called deconz.remove_orphaned_entries https://www.home-assistant.io/integrations/deconz

I cannot find it in my services, but like I said it must be 6 months since I updated. So I’m going to give that one a try this weekend… The sensor works since I configured deconz to do the dimming, not HA but the sensor is no longer visible in HA.

I’m hoping by removing orphanded entries, this unused entry would be gone as well but if it does not I’m going to look into the device registry.

I’m hoping the new service will make it a lot easier for people re-adding devices as I see a lot of questions from people when I googled ‘entity id already exists’ It is a similar problem then the groups one as in having same cause.

3 Likes

Thx @kurtj the service call deconz.remove_orphaned_entries saved me. I was also stuck with a deconz device in HA that I had already removed from deconz and this caused my symfonisk controller to be not recognized properly (zigbee pairing failed). Removing the device from HA with the service call deconz.remove_orphaned_entries and re-doing the pairing process in deconz solved my issue. Another great tip that I came across (don’t remember where) is to disable as much as possible zigbee router nodes that are nearby. In my case I have quite some Hue lights close to my Conbee II stick. The first few attempts resulted in my lights flashing in the whole house to signal the wrong kind of zigbee pairing. Switching off those nearby lights resulted in a successful zigbee pairing.

Hi @SarumaN

Great to hear this works fine for you, I haven’t found the time to get my setup updated yet so confirmation from you is very helpful indeed

Hi @SarumaN,
Can you please explain me where and how I can use the service ’ deconz.remove_orphaned_entries; ?
Thank you.

Welcome to the HA forums.
In the developer_tools menu there is a tab called service_calls. Enter deconz.remove_orphaned_entries and click call_service. I added a screenshot to make it even more clear.

6 Likes

Hi @SarumaN, That service does not show up in my list - do you need to install anything special?

1 Like

Are you using deconz? Are you on a new enough home assistant?

Running all newest versions:
deCONZ - : 6.7.2
HA core-2021.2.3 & supervisor-2021.02.11

are you sure you are on the services tab and not the states tab? by typing deconz on the services tab it should immediately show several deconz services.

Wasn’t in the services tab - However, after a restart it’s there now - wired :slight_smile:

Good to hear you were able to find it.

1 Like