How to add items to Category and Semantic Class lists?

Hello everyone,

Thanks for all the hard work put into developing OH3. I have been following OH over the last years but have been hesitant to switch from Indigo (Mac only home automation app) as every time I looked into it, there seem to be something missing. Well, it seems that OH3 has reached a point in which I’m confident I can switch to it without losing anything I already have in Indigo.

I was able to successfully deploy Openhasbian 1.6 on a Raspberry Pi 4 and to switch to OH3M2 without any problem. I have followed the WIP posts regarding the new documentation and was able to import all of my Hue and z-wave devices also without any problem. There is a lot of different things still to be migrated (several other types of bindings), but I’m sure it will be just a matter of taking the time to do it, step by step…

When I was defining my model, I noticed that the current lists for Category and Semantic Class seemed to miss a few itens I would like to define (e.g. Den, Dining Room, Entrance, Veranda, etc.). How can I add to those lists, so my location model better reflect my dwellings?

Also, can one of you gentle souls advice on the relation between Category and Semantic Class, if any?
They seem to point towards the same idea, so why do we have two different fields for the same idea?

TIA
Cesar/Brazil
Screen Shot 2020-11-18 at 17.49.48

I think Category is mainly used for Icons.

Simple answer, you can‘t.
The semantic modell is hardcoded in the sources.
So only chance is to file an issue on github with a feature request for your additions.
But reading what you think is missing, there is not much chance to get this accepted, e.g. Dining Room, this is just a room, unlike a Kitchen, which was build to be a Kitchen. So there is a difference between „simple“ rooms and „special purpose“ rooms.
Similar to Veranda, isn‘t this just another name for a Terrace ?

Regarding Semantic class, there is a PR in progress. It should cover your needs. We all hope it will be merged soon.

I added “Entry”, maybe " Entrance" Is more appropriate?

1 Like

Sorry, did not see that Dining Room and Veranda got accepted.

Name the Group Item “Den” and tag it with “Room” or “Livingroom”.

You can also define synonyms if necessary, but I think only HABot uses them.

There isn’t. Category is a hold over from OH 2 and is used to define the icon that gets used by default on a sitemap. It appears to also be used as the icon used in the list of Items. It has nothing to do with the semantic model.

1 Like

Many thanks to @rlkoshak, @hmerkm @Bruce_Osborne and @Lolodomo for answering my questions.
I see it more clearly now.

1 Like

Does it make sense to rename it in the UI? I’m also rather confused by it.
How can we set the category from the *.item files? or is it set from the *.thing files?

or is this all handled with the tags and depending on if a tag is matching a Semantic Class the semantic class will be set?

I do not remember but know it is documented in the OH2 Items documentation because I use it. I just looked and, in fact, the refer to it as Icons.

It’s the icon field. Items | openHAB

1 Like

FWIW…
whatever you put as ‘category’ in you .items Files will be used in the new influxdb persistence

Switch someswitch_ping "someswitch ping" <network> (gWhatever,) ["NetworkAppliance"]	{ channel="network:pingdevice:12345678:online" }
  • will show up as Network Appliance in the Equipment tab of OH3
  • will be persisted with the tag key ‘category’ and tag value ‘network’ in influxDB

Regards
Thorsten

3 Likes