Removing Things created with UI

Platform information:

  • Hardware: PI5
  • OS: Openhabian
  • openHAB version: 5.2.0M2

Issue:

In my setup, I have several duplicate Things because I was unable to delete existing Things using Remove Thing. So far, I have only been using the UI-based configuration.

In the last case, I lost the connection to my Eve Matter device after updating to 5.2.0.M2. For this reason, I decided to create a new Eve Matter device by:

  1. I set the existing device to “Disabled”
  2. Then I executed “Remove Things.” However, this process was never successfully completed. The Thing status was hanging at Removing Thing
  3. I created a new EVE Matter device by scanning.

So I ended up with to Things of my Eve Matter Device. The actual one enabled and the old (unused one) disabled.

How can I remove a device from my installation that no longer exists?

Best regards
Raphael

If you go back to the Thing details while it is stuck in the “Removing” status, and press Remove Thing again, that will run the removal with the Force option and the Thing will get completely removed even if the Binding does not properly report the removal.

Sometimes the Things then don’t open, and it all remains ‘spinning’.

But the console offers a solution. openhab:things remove [UID] or something similar. See openhab:things --help.

1 Like

@JustinG Thanks for your support. Your approach solved the issue.

@ErikDB Thanks for your hint.

In hindsight I should have also tried to do some digging to find out why the page wouldn’t load…

I never understood the reason why it wouldn’t just forcibly remove it. What we have now is a weird and frustrating UX.

1 Like

I think this is still true:

If all links are deleted first, the Thing can be removed with the first click on “Remove Thing”.
If there are links left, one need to click twice to force the deletion.
But you end up with orphaned links …

I don’t think the inability to remove has anything to do with orphaned links. It happens on Things without any links.

In any case:

  • it can warn / prompt for confirmation before letting you remove
  • If it’s removed, health checks can clean up the orphans

What I noticed is:

  • it happens when the thing is offline / disabled
  • it happens when the binding / handler is missing
2 Likes

I have never made that experience.
Actually I have never needed to force remove Things, because I delete/comment out all linked Items before.

I’ve never looked into in detail, but my unscientific impression has always been that it is binding dependent. Sometimes I remove things because I am just getting rid of them and in these cases I have unlinked all channels, and sometimes I am just re-initializing a thing so I have left all the channel links. Some bindings, regardless of linked channels or not, exhibit this behavior every time I try to remove a thing.

I’ve got the same experience.

Agreed.