OH3: rename items in UI

I’m running OH3.1 release and I’d like to batch rename a couple items to fit my “newly found” formatting way.
As I’m only using UI, I don’t have any items-files anymore, so renaming them “the old way” is not possible.
I’m well aware, that I have to be cautious with it and must check for cross-references to my things and rules, but is there a way to do this - except clicking through all 180+ items and 25+ things just for my KNX-items?

Yes, I know, item names don’t matter much anymore in OH3, but if you’re in the logfiles, the somewhat cryptic item names from the UI are scary.

The trouble is, the name of the Item is the most important part internally. It’s the unique key for each Item. That means that technically you cannot rename an Item, you have to destroy the old one and make a new one.
So, after that there will be cross-references in rules, links to channels, metadata, sitemaps, MainUI widgets and pages, all to be checked and edited. Then there’s any old persistence data (also keyed by name), what to do about that?
I don’t know of any tool to help with that.

2 Likes

sigh - Ok, then on it *rollsup-sleeves

Just to add to @rossko57’s excellent explanation, in this case you really were not renaming the Items even with the old way. When OH unloaded that .items file it destroyed all the Items that were defined in that file. When it loads a .items file it creates all those Items anew. It appears at first look that you’ve renamed the Item but in fact you deleted the old and created new ones.

There is a hackish trick you can use if you have more than one or two of these Items. See OH 3 Tips and Tricks, in particular the “Editing JSONDB , a last resort”.