Should it be possible to define part of the semantic model in gui and part in files?
I have some things/items defined in the gui and some in files so I created the basics of the semantic model in the gui and tried to add the relevant tags to the item files. This seemed to work at first but after a restart of openhab everything from the files is at the root level but still connected. So a equipment with subequipment with points is still grouped together but at root level instead of in the specified room.
“Direct Parent Group” and “Direct Group Members” still show the connections, but the semantic model does not recognize the connection.
This is a snippet from my .item file:
Group Kuehlschrank "KĂĽhlschrank" <whitegood> (Kueche) ["WhiteGood"]
Group Kuehlfach "KĂĽhlfach" <whitegood> (Kuehlschrank) ["Refrigerator"]
Number Temperatur_Kuehlschrank "Kühlschrank [%.1f °C]" <temperature> (Temperaturen,Temp_sonder,Kuehlfach) ["Measurement", "Temperature"] {channel="jeelink:lacrosse:Kuehlschrank:temperature"}
I think this should work - at least, it does for me. However:
You cannot modify Items using the UI if they were first defined in configuration files. The UI sometimes lets you modify stuff, but the modifications will disappear.
You cannot modify Items using configuration files if they were first defined in the UI.
I should probably say must not rather than cannot in the above, because it is possible to try both of those things in reality, but results will be less than desirable!
Sorry, I don’t get what you are trying to say.
Should I provide more information? If yes, what would be needed?
Or is Openhab 3 too new and this is untested? Then maybe I should file a bugreport.
I think you need to look in the logs and try to figure out when things like the loading of the .items files occurs relative to the Items being loaded from JSONDB. From there you can try to determine whether one of the timing issues from above is what is happening. From there that may reveal if there is a bug and if so, where the bug might reside.
My model also got mixed up. I first created it in the UI, but then started importing my *.items files from OH2, that’s when things went wrong.
Main problem was, that I used the same group names in the semantic model for the floors and rooms that were already used in the item files. So after a restart, the gEG (for ground floor) in the semantic model was gone, because it was overwritten with the one in the item files that didn’t have any tags.
I ended up renaming these groups in the item files which solved it for me.
Group is created when you define a location in the model
You add an item, it gets assigned to the group
When you restart OH3, it first loads your item files. Somehow, it sees a group called “test” and creates it (even though you didn’t specify it?).
The group created through the model is not loaded properly as location, thus the model is mixed up.
In my case, the group / location created in the model wasn’t even displayed anymore after a restart.
Not sure if that’s the right interpretation. Anyway: I guess it’s safe to say that you really shouldn’t define the same groups in the item files and in your model
I just retried it in OH3.2.0 and the behavior remains the same.
I have +350 items in item files that are generated from my Vantage Qlink configuration.
I prefer to enter the Semantic model by GUI (as otherwise, theyse items are Read-Only in the GUI)
If JSONDB is loaded first and I put the .item files later => everything is ok.
If both are present at boot => Nok, the .item files are processed first.
Is there in OH 3.2 a method to define the order of loading at boot?