Is the “Location” attribute in the Thing details still used for anything? I know that in PaperUI it was used for the “Control” section, but with MainUI and the new “Model” area for structuring locations I don’t get why this still exists. Can someone enlighten me?
There are - as far as I can see - multiple locations:
Semantic Model (MainUI: “Model”):
Things (MainUI: “Things”):
The “Location” from the semantic model is technically a parameter on a Group Item (defined in .items file if you don’t use the MainUI).
The “Location” from the Things is a parameter on the Thing (defined in .things file if you don’t use MainUI).
So this is obviously not the same and there are multiple places to set a “Location” which is exactly why I’m confused.
I created my OH3 locations via the semantic modell, that way the location of things didn’t get set. Can’t say if a thing with a location is (together with its linked items) somehow automatically set in the semantic modell.
I’ve asked myself the same. I found no use of it in openHAB3 so far.
In openHAB2 it was used to bring some sort of structure in the control part of the PaperUI. All things in the same location were placed in the same tab there.
This feature is now provided by the semantic location but for items in the location cards.
So if you like: The first was meant as the physical location of a thing (e.g. a multi-channel actor installed in the basement providing channels linked to items for multiple locations) while the semantic location associates a linked item to a location in the model
Means: Beyond some “documentation” use, I don’t see any benefit from the “Location in Things Settings” and stopped maintaining it in my setup.
It has provided functionality - namely an reasonable option to organise your things in PaperUI’s control section:
And: I’m pretty sure Markus, you were fully aware of it
I should add:
“Location” is part of the “thing” data structure/class. Since the “things” have not changed between openHAB2 and openHAB3 it is still part of the data structure. As long as openHAB3 does not make more use of it, it just appears beeing a “leftover”.
But who knows?
Frankly, e.g. the looooong list of things may benefit from the physical location as third distinguisher/sort criteria in the UI (beside “Alphabetical” and “By Binding”)…
It was somehow a little bit useful in OH2 only for PaperUI
PaperUI is now gone and it’s not used for anything else in OH3
Since it is confusing (see this thread for examples) and has no apparent use, I will open a Github issue for further discussion what to do with it so that this doesn’t get lost in the depths of the forum.
I see quite some options here:
Add the text “(deprecated)” next to it in the UI
Add a description stating that this is not to be confused with the semantic model and should represent the physical location where the thing is installed
Only show it for old things in the UI where the field has a non-empty value
Hide it behind some “show advanced” button like it is done for the less used channels or metadata entries
Completely remove it from the UI
Keep it and use it in the thing overview as another thing the list can be filtered by (like @curlyel suggested)
Completely remove it from OH Core
Personally I would vote for a complete removal from OH or at least from the UI. That way the least confusion is caused and as I understand one goal of openHAB 3 is to be more attractive to novice users. Those can be confused most easily Since it’s not used for anything, backwards compatibility shouldn’t be a problem here. Though maybe it’s exposed through the API and some 3rd party app or addon uses it for… something. Then I’d probably go with the “show advanced” button in combination with a rename to “Physical Location” and a description that it has nothing to do with the semantic model.
But of cause that’s not my decision to make so I think a discussion in Github to get the maintainers take on this will be beneficial.
I think it’s an interesting idea to use this as a default source, but I also see some drawbacks:
it adds another layer / concept that new users have to get used to
There are some difficulties with the details of this:
For the Thing>Location we have one string field. But the semantic model location is technically a group and has at least a Name and a Label (together with some more attributes). Which should this be linked against? You could also have multiple Locations with the same Label, e.g.
Main floor > “Bathroom”
Second floor > “Bathroom”
So that leaves the Name. But that might be more cryptic, e.g. it would be r_House_EG_Bad for me in the example and thus more prone to input errors. We’d need an autocomplete for that at least.