Paper UI Can't remove Item

So i just started playing around with OpenHAB2 i added a few things and a few items via Paper UI.

But now i have a item i can’t delete, when i press the trashcan and the Remove button i get HTTP 404?

I have tried to restart OpenHAB and its still there, i even tried to remove all other items and things, except the RFXCom bridge.
Is there some file i can edit on disk to remove it?

I’ve also encountered this one time during my “playing around with OH2” time. Maybe it was a little bit too much playing… :wink:

If it’s a quite recent version you are using, the items are stored in a JSON DB, which can be edited. See here:

Another solution might be to try HABmin to edit/remove your items. HABmin uses slighty different methods, so maybe you have more luck with this UI.

I tried to use HABmin but nothing happened when i pressed Delete, but ill look at the json database when i get home, Thanks!

Well, you are not alone, my friend. The amount of grey hair on my head has increased because of this problem. I’ve never exactly established what I’ve done to solve it, but it has always included both manual editing of the jsondb database files and multiple restarts of entire openhab.

Use Caution

Try this:
Log into Karaf console.

pi@OpenHAB:~ $ ssh openhab@localhost -p 8101

The default password is: habopen

pi@OpenHAB:~ $ ssh openhab@localhost -p 8101
Password authentication
Password:

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.1.0-SNAPSHOT
                               Build #789

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab>smarthome things list|more
openhab> logout

Connection to localhost closed.
pi@OpenHAB:~ $

Then try the appropriate command depending on what you need to delete. List results can be piped to More or Grepped as needed.

smarthome things list - lists all things
smarthome things clear - removes all managed things
smarthome things remove <thingUID> - removes a thing
smarthome items list [<pattern>] - lists names and types of all items (matching the pattern, if given)
smarthome items clear - removes all items
smarthome items remove <itemName> - removes the given item
smarthome links list - lists all links
smarthome links addChannelLink <itemName> <channelUID> - links an item with a channel
smarthome links removeChannelLink <itemName> <thingUID> - unlinks an item with a channel
smarthome links clear - removes all managed links
2 Likes

editing the json files solved the problem.

Thanks Peter for the tip! had to do the same.

Find it with grep:

root@raspberrypi:/var/lib/openhab2/jsonb# grep -R <item_name> *

Can this be used to solve the issue with not being able to edit things in Paper UI? I’m not able to change names or add location to certain things and they remain listed under “other” in the Paper UI control panel. Or do you have a different solution? Thanks

@tobiasselin

You certainly can add/edit/remove things from the JSON notation of the saved-state when openHAB is not running. It’s not the easiest format to handle in a text editor, but it can be done. You do need to make sure that if you change the ID of a thing or item, that you change it consistently throughout the entire configuration, including rules and scripts.

Personally, I gave up on the management UIs and configure everything in flat-file format as it’s easier for me to manage in a text editor and to see diffs between versions. (Note that I do not have Z-Wave or other self-configuring components with lengthy device addressing,)

Thanks for this. Unfortunately I’m hopelessly bad at these things. The new UIs in openHAB2 were the only way I could get things running in the first place.

I seem to have the same issue with the PaperUI.
I have cleared the cache in the browser and checked in Karaf that the jsondb only contains the things I want to see. Still the PaperUI shows the things that should not be there anymore and klicking on the wastebox generates 404.
I even cold-started the RPi.

Same here … I am not able do delete items anymore … at least they are back after reboot.
Issue occurred after I was using the experimental rule editor in the first place.
Maybe I edited to much … in beginning it all worked fine. Now I am thinking about new clean installation of openhab2.2
I am afraid editing the json db exceeds my skills. :frowning:

same here … but the hint with the rule editor helped. after uninstalling the rule editor the entities are reflected correctly in paper ui

so i figured out i was unable to delete anything that i had shared in the cloud config. so i unshared in cloud config, then unlinked in Things tab, then i was finally able to remove the Items that I wanted to.

1 Like

I have experienced the same thing, that I was not able to remove an item on PaperUI. After reading many topics in this forum I found out the reason. The item is still linked with a Thing and remains in the Item list until the link has been removed in the Thing section.