Hi Forum,
in the past I used text file based item definitions in *.items
. After switching to openHAB 5.0, I will have to make changes to the text files. They now get flagged with warnings by the new model check in 5.0.
This will be a journey and I will add more findings on how I solved them in my installation. Lets start with the basics.
Group membership
In the past, there was no semantic check. And for me, persistence groups where kind of equipments, well, to store items.
Now that there is a semantic check in place, I got flagged for a lot of items that used the wrongly tagged persistence group.
Here is an example of my old definition of an item assigned to a tagged persistence group like that:
Number:Temperature gBathRoom_eqHeating_itTemperature "Temperatur [%.1f %unit%]" <oh:temperature> (gFunctions_eqPersistence_everyMinute, gBathRoom_eqHeating) [ Measurement, Temperature ] {
channel="knx:device:bridge:321a4393:48",
alexa="CurrentTemperature" [
name="Temperatur Badezimmer"
]
}
...
Group gFunctions_eqPersistence "Persistenz" (gFunctions) [ Equipment ]
Group gFunctions_eqPersistence_everyMinute (gFunctions_eqPersistence) [ Equipment ]
New version now references an untagged persistence group.
Number:Temperature gBathRoom_eqHeating_itTemperature "Temperatur [%.1f %unit%]" <oh:temperature> (gBathRoom_eqHeating) [ Measurement, Temperature ] {
channel="knx:device:bridge:321a4393:48",
alexa="CurrentTemperature" [
name="Temperatur Badezimmer"
]
}
...
Group gFunctions_eqPersistence "Persistenz" (gFunctions)
Group gFunctions_eqPersistence_everyMinute (gFunctions_eqPersistence)
So stay tuned for more content.
Faulty combinations of equipment, point and property tags
I was not really aware that the semantic model has a deeper meaning other than having just some tags. Now with the semantic rule checker in effect, I got schooled on what combinations of equipment, point and property are allowed and which are forbidden.
Nice to know, that you can get the current mismatches through the REST API, as @Mherwege pointed out in how to get all semantic model issues.
After fixing each reported issue, I’m now a proud owner of a clean semantic model
Switch point?
Currently only one slight problem remains. Referring to the ui of predefined semantic model tags, and thanks for having such a useful tool, it should be possible to tag an item as a Switch
point. See here:
But using it on an item like that:
Switch gOffice_eqLights_itDeckenleuchteLinks "Werkbank" <oh:light> (gOffice_eqLights) [ Switch ] {
channel="knx:device:bridge:fd123e9d:O",
alexa="Light" [
name="Werkbank BĂĽro"
]
}
Leads to the following error:
2025-08-01 00:07:44.624 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'etw-fs-model.items'
2025-08-01 00:07:44.630 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'etw-fs-model.items' has errors, therefore ignoring it: [152,97]: no viable alternative at input 'Switch'
[152,104]: mismatched input ']' expecting RULE_ID