Locations show NULL in overview


I just started setting up my overview, after having finished the semantic model. Now, when I add the locations (which in my case are different rooms), they all say NULL. I’ve tried turning the devices on and off (even from the overview) but it keeps saying NULL. I know that I could just write a label to prevent it from showing this, but if I want to make automations, I think I would need this to work.

I also have attached a photo.
Thank you!
Screen Shot 2021-04-06 at 15.41.34

We’re going to need to see some example of how you’ve configured these items in the model and whether there is any information in the log files before we can really start narrowing down this issue.

I haven’t configured them in any special ways. For example my hue bulbs: I installed the Hue binding and then approved the lamps before adding them into the semantic model. To acces them, I have them in this order: Floor1/Room1/Hue Lamp.

As for the logs, the following thing keeps repeating:

[WARN ] [ue.internal.handler.HueBridgeHandler] - An unexpected error occurred: null
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]
	at org.openhab.binding.hue.internal.HueBridge.getFullConfig(HueBridge.java:1045) ~[bundleFile:?]
	at org.openhab.binding.hue.internal.handler.HueBridgeHandler$PollingRunnable.run(HueBridgeHandler.java:121) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

(This is running on a Raspberry Pi 4 by the way)
I hope this helps. I’m not really familiar with the coding aspect of things.

In the semantic model, Group type Items are used as a uhh vehicle togather up a collection of stuff as e.g. a “room”.
Group Items have NULL state,unless you define an aggregation function for them.
That wouldn’t make sense if a “Room” might contain lamps, temperatures, motion etc.
So the complaint boils down to “I want to hide the display of Group state automatically”.

Can you show us a screen shot of one the item pages for one of these items. For example:

I don’t use the Hue binding so I can’t help with what is causing this error, but it does seem likely that the problem is that either your items or your binding is configured incorrectly. What about the sonos speaker are you seeing any error in the logs about that item?

So this is how it looks from the model screen, I hope this is what you mean.

While there isn’t an error message in the logs, it is also saying NULL.

I see. Yes, as rossko57 said, Unless you have configured a group item (and an equipment item in the semantic model is just a group that contains the other items that actually control something), that group item will not have a value and will therefore display a value of NULL wherever a value is displayed.

If you want to see no value there, then you need to change the display state of the item. Click on the Add Metadata link that you see right there on the item and select State Description from the menu that appears. Then in the Pattern box:

Just put a space.

If you want to see a value there related to the items that the group contains that is a little more difficult but can be done.

Off topic - I’m thrilled by the idea of secret rooms with redacted names :slight_smile:

So I’m sorry to have to “re-open” this, but it has worked for a couple of my devices, but now everything is back to the NULL state. Like rossko said, I’m basically looking for a way to redact the display of a group state. It’s pretty annoying because it shows this NULL state in the app and in the “normal” home page. This is also not device specific, but any group device shows this. I understand why it’s the case, I’m just looking for a way to not show the state.

Thanks a lot.

I think you need to give it an ‘empty format’ for don’t-show-the-state. In the old days we’d put [ ] in the label, now try metadata pattern ’ '.

Yeah, thats what @JustinG had recommended - to add metadata and then create a state description in which you type " " in the pattern box. But that doesn’t seem to do it for me, it still says NULL…

Where are you looking exactly? Parts of MainUI are absolutely intended to perform an ‘adminstrators’ role, show you stuff without any rose coloured glasses or prettifying. The mechanics viewpoint. If the state is NULL,it shows you NULL.

The user-facing cards/widgets etc. are where you prettify with patterns, transforms, etc.

1 Like

I’ve been editing it from the semantic model, which is where I created the main “plan” of my house. There I go on the “equipment” of, for example, a sonos speaker. There I have the ability to “add metadata”. That’s where I do the State description metadata and write " " (without the quotation marks of course). After doing this, and saving it, I can check it via the app or the home overview and it will still say NULL… Could it be because I am logged in as administrator on those devices as well?

Edit: I’ve checked without being logged in as an admin, however it still says NULL…

I’ve fighting with the same problem. In the semantic model all locations and equipment have NULL in the first Row:

This is in all levels the same an I found no way in the state description to change it to a blank or a minus sign or something else.
I hope someone can help?

That is expected behavior. See my post a few up from here: groups will not have a state (i.e., will have a NULL state) by default unless you configure them with an aggregation function. The best solution here is to ignore it. The model window is mainly for administrative purposes not everyday user interaction so seeing the NULL states there does no harm.

The solution of these problem can be found in the openHAB Virtual MeetUp 2020:

Position 1:31:47
For example in my system: