Change the Name of Items

I understand why normally it would be a bad idea to change an item name, but I’m about 4 months in to my first openhab setup and I have done some bad labelling. I would like to clean this up before I get any deeper.

Is it possible to change the names of items?
I’m aware that some rules and UI stuff might break, but I would go though it carefully one at a time. I think this would be faster and less frustrating than recreating hundreds of items from scratch.
Everything has been created with the Main UI in OpenHAB 3.

Nope.
The names is the “unique ID” of the Item, so to change is to destroy the old Item and create a new Item. (In practice, you’d probably create the new version first.)
But there’s no way to avoid create/delete in the UI.

Take care about leaving orphaned channel links when doing this, best to remove those first.

See OH 3 Tips and Tricks.

However, all things considered it is not really any more work to create new Items than changing the names. About all you will save by renaming is needing to set the category, label, tags and Group membership. That’s it. And if you use the model and create Equipment from Thing most of that gets filled in for you automatically anyway.

Everything else is stored elsewhere and will need to be carefully updated one at a time. That means you’ll have to update the following whether you edit the JSONDB to change the names or create new Items.

  • Item metadata
  • Item links
  • rules
  • sitemaps
  • UI widgets

And if you are doing things in the UI anyway, the name of the Item becomes almost of secondary importance compared to the label. So this might not even be a problem that needs to be solved.