Accidentally created Thing twice

Hello,

I ran into some strange behavior. I added a shelly1 device with a particular serial number as the identifier. half an hour later I forgot I did this and added it again. I did not get a error message that the Identifier was already in use. I think I now have 2 things with the same identifier. one of them appears in the list of Things when I try to create an Item from Thing. however it does not list a description:

Selecting the blank node from the list results in a never ending attempt to load Thing properties:

as this "blank Thing does not appear in the Things list. I’m not sure how I can undo my mistake. also: is the behavior of creating 2 Things with the same Identifier reproducible and if so, shouldn’t there be a validation rule to prevent this from ever happening?

There are such validations for item creation. There’s so little reason to customize the UID of a thing that I’ve never run into the problem with thing creation, so I don’t know. You are right, however, if there aren’t such checks you should probably file a issue on github about it.

Things added via the ui are stored in the userdata/jsondb folder in your root openhab folder. The file is called org.openhab.core.thing.Thing.json. The good news is that in that same jsondb folder there is a backups folder as well and the system autoamtically saves backup of these important files every time one changes. So STOP openhab (never manually work with these json files while it is running). Look in the backups folder for a copy of the things file created before you made this breaking change and copy that version back into the main jsondb folder. Restart openhab and that should eliminate the duplicate thing problem.

thx for your reply @JustinG. I will try both of your suggestions. I conclude from your statement that this is not related to the binding itself then.

Indeed there is very little reason to customize the UID of a thing. I encountered one though: 3 out of 10 of my Shelly1 devices refuse to get auto discovered and therefor I cannot create Things from the inbox for them. As naming convention for the auto discovery is their serial number, I decided to override the number assigned by openhab. Unfortunately I made a mistake and I ended up using one of these serial numbers twice.