Finding an undefined item but how?

Hello,

I get every 6h the following entry in my log

[WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined

is there a way to find out which item name it try to update? I searched in my rule but haven’t found a rule which is triggerd every 6 hours…

Any advice is appreciated

The error comes from one of your widgets.
You have defined a widget, which points to an undefined item.

What probably happens is the widget needs you to define an item for its widget property, but you haven’t specified / defined one. So when the widget looks up the property, e.g.

prop[temperature_item_or_something] this resulted in (evaluated to) undefined, and this gets requested to openhab, thus triggering the warning message.

@florian-h05 is there something we can do on the webui to detect this situation and somehow warn the user to make it easier to pinpoint the source of the problem, ie the problematic widget?

1 Like

With reasonable effort not really … I had a look into the expression parsing some time ago and hoped that I could change its behaviour, so that for undefined Item names no state tracking is tried, however I only managed to get this working for the aliases @ and @@.

When using @ and @@ aliases instead of the items.itemname.state syntax, no request will be send to the server if the item name is undefined.

See Widget expressions: (Partly) Fix handling of Item name being `undefined` by florian-h05 · Pull Request #2301 · openhab/openhab-webui · GitHub.

1 Like

Thank you for the help :slight_smile:

1 Like

BTW here are the docs: https://next.openhab.org/docs/ui/widget-expressions-variables.html#item-expression-shortcuts

(I have linked the latest docs as I’ve restructured them and don’t really find the same content over at the stable docs, but works the same)

1 Like