Unable to remove item

Hi.
I’ve got problems with an item which I previously defined using an .items file that I’ve later removed, but the item is still lurking. No matter what I do I can’t seem to get rid of it. Things I’ve tried:

  • Just commenting out that row in the file using //
  • Renaming the entire file
  • Deleting it using Paper UI and HABmin
  • Deleting it using Karaf (smarthome:items remove)
  • smarthome:links clear (not good idea, should’ve read the docs first)
  • Restarting openhab entirely

I guess the first step here ought to have fixed it, right? Any ideas? Do openhab cache this information elsewhere? I tried a recursive grep through entire /var/lib/openhab2 for the item name without result. It’s nowhere in the jsondb.

Nobody? This one is really driving me mad. I’ve completely wiped out the items directory now just to be sure.

When I try to remove the item using Paper UI I get a little popup saying “Error: 404 - Not Found” and the following line is added to the log:

14:13:09.556 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP DELETE request at ‘items/DanielsMobil’ for the unknown item ‘DanielsMobil’.

Trying to remove it from Karaf using smarthome:items remove just tells me the item was successfully removed but it isn’t. I guess there must be some place I’ve missed checking. Is there any cache of .item files that I could empty?

Take a look in the jsondb files (in the userdata/jsondb folder). There will be a file called items and you might find it in there… Not sure why it wouldn’t be deleted though.

Should there be a file named simply “items”? There isn’t…

root@cube:/var/lib/openhab2/jsondb# ls -al
totalt 176
drwxrwxr-x 3 openhab openhab 4096 jan 31 14:23 .
drwxr-xr-x 15 openhab openhab 4096 jan 29 09:52 …
drwxrwxr-x 2 openhab openhab 12288 jan 31 14:23 backup
-rw-rw-r-- 1 openhab openhab 7625 jan 30 20:23 org.eclipse.smarthome.config.discovery.DiscoveryResult.json
-rw-rw-r-- 1 openhab openhab 1728 jan 31 14:23 org.eclipse.smarthome.core.items.Item.json
-rw-rw-r-- 1 openhab openhab 1670 jan 31 14:02 org.eclipse.smarthome.core.thing.link.ItemChannelLink.json
-rw-rw-r-- 1 openhab openhab 2 jan 30 15:51 org.eclipse.smarthome.core.thing.link.ItemThingLink.json
-rw-rw-r-- 1 openhab openhab 138206 jan 31 14:02 org.eclipse.smarthome.core.thing.Thing.json
root@cube:/var/lib/openhab2/jsondb# grep -i DanielsMobil *
grep: backup: is a directory
root@cube:/var/lib/openhab2/jsondb#

edit: Just for the record, org.eclipse.smarthome.core.items.Item.json contains only other items, went through it to double check.

No - it’s org.eclipse.smarthome.core.items.Item.json - I couldn’t remember the full name off the top of my head - sorry…

If it’s not stored there, and it’s really not in any of your items files, then I’m not sure where it’s coming from.

Weird. Recursive case insensitive greps of the item name in entire /var/lib/openhab2 and /etc/openhab2 both come up empty. Even searched through /usr/share/openhab2…

I can see the item in both habmin, Paper UI and with smarthome:items in Karaf console, but it’s not present in basicui.

It shouldn’t be in basicui unless you also add it to a sitemap.

I have never touched any sitemap at all :wink:

Beginning to think I should file an issue for this, something is obviously wrong somewhere. Am I correct thinking that I should file it as an ESH issue?

After another restart of complete openhab it looks like it finally disappeared. Guess that means we’ll never know what was wrong :slight_smile: