Strange references to items in log file for items not existing anymore

Running Openhab V3.4.1 on Raspi 4B.
In the OpenHab log I see the references to items which I do not have anymore and which are not used in any rules. They are not visible through the GUI.

2023-01-27 18:59:04.249 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode021FGMS001MotionSensor_Batterieladung
2023-01-27 18:59:04.250 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: KucheBewegung_Batterieladung
2023-01-27 18:59:04.250 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: WZBewegung_Batterieladung
2023-01-27 18:59:04.251 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode017FGMS001MotionSensor_Batterieladung
2023-01-27 18:59:08.898 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode021FGMS001MotionSensor_Batterieladung
2023-01-27 18:59:08.900 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: KucheBewegung_Batterieladung
2023-01-27 18:59:08.901 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: WZBewegung_Batterieladung
2023-01-27 18:59:08.903 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode017FGMS001MotionSensor_Batterieladung
2023-01-27 18:59:19.945 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode021FGMS001MotionSensor_Batterieladung
2023-01-27 18:59:19.946 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: KucheBewegung_Batterieladung
2023-01-27 18:59:19.947 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: WZBewegung_Batterieladung
2023-01-27 18:59:19.947 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: ZWaveNode017FGMS001MotionSensor_Batterieladung

However, I could identify for instance a reference in the files stored in /var/lib/openhab/jsondb/

fgrep WZBewegung_Batterieladung *.json
org.openhab.core.thing.link.ItemChannelLink.json:  "WZBewegung_Batterieladung -\u003e zwave:device:1e289b8b85:node13:battery-level": {
org.openhab.core.thing.link.ItemChannelLink.json:      "itemName": "WZBewegung_Batterieladung"
uicomponents_ui_page.json:                                      "item": "WZBewegung_Batterieladung",

Where could those references come from and how can I clean up?

The references in ItemChannelLink are orphaned links. You deleted the Item without first unlinking the Item so now you have Links to Items that do not exist. The Thing doesn’t know the Item doesn’t exist so it’s still trying to update them which is likely the source of the warnings.

I think this is available in OH 3.4.1 (if not there is also a karaf console command). Go to the API Explorer in MainUI, scroll down to “links” and the “/links/purge” endpoint. “Try it out” and it will remove all the orphaned links.

The uicomponents_ui_page.json file is where your custom widgets are stored. You have a widget that is referencing that Item by name. You can open the file to see the full widget record to find which one it is.

2 Likes

You can also do it on the console:

openhab> openhab:links 
Usage: openhab:links list - lists all links
Usage: openhab:links link <itemName> <channelUID> - links an item with a channel
Usage: openhab:links unlink <itemName> <thingUID> - unlinks an item with a channel
Usage: openhab:links clear - removes all managed links
Usage: openhab:links orphan - <list|purge> lists/purges all links with one missing element
2 Likes