OH3: update of an item which doesn't exist?

  • openHABian 3.3.0 on rPi4 with 4GB
2023-03-05 09:46:55.995 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined

How can I find out where it wants to send it to, so that I can either create the item or delete the command that wants to update it?

There are others I came across, but can’t remember.

The message above could say: Attempting to send a state update of item <name> which doesn't exist:


There was a response elsewhere, but I could not make sens of it :frowning:

I did not make the request. Something (the thing I want to find out) tried to update and created this openhab.log entry.

Well “someone” made that request, probably an UI. Usually you can enable something like “developer tools”, “web information”, or similar in your web browser’s settings when accessing the UI. The is a tab which is labelled “network requests” (or similar) and you can see all requests. Somewhere inside of that should be a request for the item “undefined”.

This has been an ongoing question for many of us. One of the threads is:

I also recall Yannick saying somewhere that this is a WARNING, and nothing to be concerned about - so since then I have just ignored it. I get where the WARNING comes from, based on the above, but wish there was a may to prevent it too.

Not an expert on this, but I do get these messages from time to time. They usually occur (usually only once) when I have deleted an item that is used in a label card or put an item in a label card footer that doesn’t exist. I can usually find the issue by going to one of my pages and look for the message in the log. (to narrow it down to a page) then check the widgets.

I hear you all…
This occurs occasionally.
I have no idea why.

I must be thick as a brick to understand as to why I need to look at a webpage’s dev tools to see who made the request.
A) which page do I need to open to then check?
B) no web page was called
C) I have one HABpanel page which shows values for all items on it.

Writing this, it dawned on my, that I might have had the UI items page open; this is a web page (after all). I used the back button to go through recent pages, then refreshed these. The error did not occur.

I tend to fix errors in my programming, to the point that I even fix libraries that come up with compiler warnings. Similar to when I was a system engineer, where a machine could not go into production if it showed an error in its log.


Understood, I wasn’t in editor mode… but will keep an eye out.

Ok. Another option is a custom widget wih multiple items where the item names are generated by composing their names.

I’ve had many of those log messages because my custom widgets had active elements even when the Item was not set up. Making these elements hide if the Item is not set avoids these issues.
This message is logged if the stage of an Item called undefined is requested which happens if the Item of a widget is undefined (not set).

Just to summarize.

This warning (as @Mark_VG points out) occurs when there is a screen open in MainUI which has a widget which is requesting the current state of an Item that doesn’t exist. In this specific case, the name of the Item it’s attempting to request is undefined which points to:

  • a property is not set on a custom widget
  • an Item’s name is calculated in an expression and the expression is failing, resulting in undefined
  • something got out of sync between the screen and OH itself (e.g. maybe deleting an Item from a different screen while the Items screen is open in another tab)

If the name of the Item isn’t undefined, you’ll get the name of the Item instead of undefined which can help with the search.

If the warning persists after refreshing all your open MainUI pages you can usually find the problem by watching the logs and correlating the error with a page you’ve refreshed. From there you can open the log in the browser and possibly get a little more information about what widget is causing the problem. If you have the Item name, a quick search of the custom ui widgets JSONDB file will tell you which widget the Item appears (or from the Developer Sidebar in OH 4 soon thanks to @florian-h05 ). Though often the Item name will be enough to tell you where to look.

Unfortunately, I can’t imagine how the above error can be made more specific because the root of the problem is in the browser, not in the server. All the server knows is that something requested the state of an Item that doesn’t exist.

2 Likes

A possible other cause is when the items name is calculated from a variable, which currently cannot have a default value configured.