Problem with custom semantic tag

Dear @Lolodomo

I tried to add semantic tags using your great addon from here: OH 4.0: Tutorial to manage custom semantic tags

First of all thanks for that. :pray:

I followed your instruction and add all details but I still cannot see the new tag.

I am running my OH4.0.4 on rPi4 8BG

this is my yaml:

#
# Configuration file containing a list of custom semantic tags
#

version: 1

# For each semantic tag:
#  - uid and label are required
#  - description and synonyms are optional
#

tags:

  # Example of a new equipment
  - uid: Equipment_SmartSwitch
    label: SmartSwitch
    description: Smart Switches connects non-smart items.
    synonyms:
      - Smart Switch
      - TV room
      - Movie room

saved the jar file to here:

It is a fresh installation so I created an empty .items file too:

Any idea where I failed?

Thanks

Hello

Your YAML file looks good to me. Did you create the new “tags” folder and put this file inside ?

You can use this console command to check if the new bundle is installed and active:

bundle:list -s | grep yaml

You can enable DEBUG logs and restart your OH server and check if your file is handled.

log;set DEBUG org.openhab.core.model.yaml

And do not forget that after a change you have to close MainUI in your browser and reopen it.

I have a good hope that my proposal will be part of OH 4.1 and 4.1 will be available in two weeks, so maybe the easiest for you is to wait the version 4.1 and try again.

Have a good day.

Testing with the most recent version of my code in 4.1 snapshot, I discovered that after a restart of the server, my groups with custom semantic class are no more appearing in location and equipment tabs of Main UI. Is it also your problem ?
It looks like a bug in Main UI…

Don’t loose your time, there is a problem with what I provided, the link between items and semantic class can be lost after a server restart. I will have to find a way to fix that.

Edit: For your information, the problem is now fixed. All this should normally be available by default in coming 4.1.

Edit2: now merged. This will be available in next 4.1 snapshot tomorrow.

1 Like

@Lolodomo Thnaks a lot, so far I was busy with other issues but now it is working! Great job.