Items cannot be recovered

Hi, I am using OH2 with file based sitemaps and items.
By mistake, part of the items file was deleted. Once deleted, the linkage from the channels to these items has disappeared as well.
When I added these items again in the items file, and tried to re-establish the links between the channels and the items, HABMIN wouldn’t let me perform the linkage.
Only when I renamed the items to new names, I was able to perform the linkage.
It seems that OH keeps these items although they were removed from the items file. Now I have some zombie items that I cannot use, and other items are not named as I want.
Is there a way this problem can be solved?

Just to be clear, you have Items in .items file but you are linking the Items to Channels in PaperUI? I didn’t think that would work and I’m almost certain it is not the way anyone thought it would be done.

When you define an Item in a .items file EVERYTHING should be done in the .items file. To link that Item to a channel use

{channel="channel ID" }

I suspect what happened is that when you deleted the Items from your file it was unable to completely delete the remnants because of the links still hanging around.

First I would stop OH and delete the contents of /var/lib/openhab2/cache and /var/lib/openhab2/tmp. Start OH and see if that fixes the problem.

If not, look through the /var/lib/openhab2/jsondb files and see if there are parts of your old Item names hanging around in there. If so, stop OH and remove those references.

If that doesn’t work I’m out of ideas.

1 Like

1 Like


Thanks for the answers.
It seems that the zombie items appear in the file /var/lib/openhab2/jsondb/ Once I removed them from the file the zombie items disappeared.

I suggest that the situation will be prevented by OH. Either disallow to perform linkage between file based items and auto discovered things in PaperUI, or display the linkage in HABMIN even if the item does not exist anymore, or erase the linkage if the item does not exist.

Anyway, thanks a lot

All good ideas. Would you be willing to file an issue on the Eclipse Smarthome Github?


Is it Eclipse Smarthome issue or OH issue? I am not sure I am aware of the boundaries between the two of them.

Oh issue. Designer is just used to edit oh config files. It cannot cause these problems.