OH4 - Semantic Model - Create equipment from thing adds "Equipment" tag

  • Platform information:
    • OS: Windows 10 Pro
  • Java Runtime Environment: openjdk version “17.0.8” 2023-07-18 LTS
    OpenJDK Runtime Environment Zulu17.44+15-CA (build 17.0.8+7-LTS)
    OpenJDK 64-Bit Server VM Zulu17.44+15-CA (build 17.0.8+7-LTS, mixed mode, sharing)
  • openHAB version: 4.0.1
  • Issue of the topic:

When creating equipment from thing (either via thing /channel page → add equipment to model or via model page → create equipment from thing) all new equipment groups will have an additional non-semantic “Equipment” tag, even the semantic class is different.
E.g. creating new equipment with class = Lightbulb, the new item will have an additional non-semantic tag “Equipment” in addition to the lightbulb class.

When using the default / auto-generated device page the equipment is therefore wrongly showing up within the generic “Equipment” card and not within the specific lightbulb card, even the semantic class is set correctly.
Only when manually editing the item & removing the additional equipment tag, the device page shows the lightbulb in the correct category.

  • If logs where generated please post these here using code fences: No specific (error) messages in the log files

True, I tested with 4.0.1 and have the same behaviour.

Also I saw that the general “Equipment” Class is missing in the Equipment category.
See here OH3.4.4 on the right and 4.0.1 on the left.

The missing “Equipment” tag is probably a bug in MainUI. The loading of tags was changed in MainUI in OH4 since the tags are now dynamic.
Please create an issue in this repo: GitHub - openhab/openhab-webui: Web UIs of openHAB
@florian-h05 for information

Are you only talking about the missing “Equipment” record in the pop-up while editing the item or also, that the change of loading tags would cause the additional equipment tag on the item, whats causing issues on the device page?

Don’t have a github account, therefore it would be great if someone else can create an issue.

I was only answering to @Tuny while he described something I understand and looks to me like a clear bug.
Sorry @Matze0211 , I can’t comment your message, I don’t use this feature myself with MainUI but it looks strange, I agree with you.

I created an issue for the “Equipment” problem:

The problem you described I can not reproduce any more.
In general I can not add any entry to the model page at the moment. For example when I add an simple equipment (as group) or location, it is not showing up in the model page.
Now I don’t know if this is a general problem or a problem of my system.
On 3.4.4 this works.

Can you try to add any entry on the model page on your system? Does it work?

@florian-h05
@Lolodomo

Hello,

I saw in githhub that this issue has been fixed in OH4.0.1. but I still see the same issue.
I started OH4.0.0. than jumped to OH4.0.2.

What I learned (I hope it helps you)

  1. when I generate an eq from a thing selecting the the semantic class (eg. Lightbulb) than I get a Group Item with semantic class Equipment however tads Equipment and Lightbulb also added.
  2. if I generate the eq in expert mode and in the definition of Group Item I replace the two [“Equipment”,“Lightbulb”] by [“Equipment_Lightbulb”] than I get the Item in the proper eq category. in the rest api I see the semantic class is Equipment_Lightbulb
  3. the trick in 2. does not work with some eq categories (eg Gate)
  4. I am not able to change the eq category in the semantic class of the group item through UI. it accpts but change only the tags
  5. I was not able to change the semantic class in the rest api (eg from “Equipment” to “Equipment_Lightbulb”

Can you please advise how to fix it. Many of my eq are under the Equipment block.

rgds
Andras

What’s happening if you manually edit the item after creation and remove the equipment tag? That’s working in my case and an easy workaround.

I think that issue is not fixed in OH4.0.2. You need to use a snapshot release to fix this.

It only got fixed after 4.0.2 was released but I see it was backported so the fix will be part of 4.0.3.

The issue is only about, that generic location/equipment records are not available.

The issue is not about, that two tags are added to an item, but expected is only one tag

I don’t think the fix is in any 4.0 release yet. It should be only available in 4.1 snapshot.

Thanks @Matze0211 , with ur help I could find the way to fix it. I write down for others:

This is what I saw in the model:
image

This was in the Item:

If I changed to Edit:

This how this item looked in rest api:

and my steps:

  1. delete the GarageDoor from semantic class
  2. delete the Equipment from the tags of the item >> in this moment the the group item disappears from the Model and its items move to the top level
  3. in the Items search for this Group Item than Edit and add the proper semantic class. Thann it looks like it should be:

I hope its fix can be included in the next release soon

For this one there is no github issue filed, correct?

Don’t know, but I have not created an issue.

I can not reproduce the problem with the OH4.1.0 Build 3608.

I haven’t tried the latest snapshot - but I am having the issue on the latest Milestone build for 4.1 - does anyone know when it’s precisely fixed?

I also noticed, on 4.0.3 you get an error in the Browser console about this.item.groupType is undefined this one is gone in the latest Milestone

Also tried latest Snapshot from 6 hours ago (docker container) - and still, after add, the equipment is not visible after I add it to the Location… it’s just a generic Equipment even, which used to work in Openhab 3

On my system with OH4.1.0 Build 3625 I still can not reproduce the problem.

What browser are you using? In the past I experienced problems like this (view is not refreshed) with Firefox.
When using Chrome or Egde everything is good.

For me, I normally use Firefox, but also tried Chrome and Edge - happens in all of them - even updates to existing items don’t get updated - you can see the updates in the items tab - but the model simply won’t refresh - the only place where it does refresh when changed is in the Mobile app for me - so yeah, it may be a browser issue, but affecting three browsers seems unlikely - I am also refering to the issue you mentioned of not seeing a new entry in the model page after add:

Gonna try a clean instance this weekend - just to check if it’s something I messed up with creating the model somehow

Check my post:

It’s cache issue.