Openhab3 confusing using Model etc?

Hello,
I’m jusing openhab 2.x since a couple of years with many many items and sometimes more or less complicated rules. Everything was text based which helped me to organize e.g. items in a beatiful manner. With one click I got an overview over all items and how they are organized in groups etc including comments // behind several items to explain what that means. And in case something was not comprensible or wrong I was able to edit the text file and easily change associations from things to items, groups etc.

The usage of different item files helped a lot to keep the overview.

Now with OH3 and the attempt to use the model, everything appears to be rather complicated. There appears to be no way to add explanatory comments anywhere? Once something is added into the model, keep it or delete it. There is no way to change the name of an item. I can generate a group similar to Group:Switch:OR(ON, OFF) gWallplugs and use that to address all items in the group gWallplugs one after the other. But as long as I don’t remember that this group is existing somehwere amoung hundreds of items, there is no indication that one of my wallplugs is actually associated with said group. In the OH2.x items file this was clear:

Group:Switch:OR(ON, OFF) gWallplugs  // here is a nice comment

Switch plug1 (gWallplugs) { channel="xyz:h123:E63742:switch" }
Switch plug2 (gWallplugs) { channel="xyz:h123:E63743:switch" }

What am I missing here? Did I misunderstand the whole concept of the semantic model? Where is my benefit? The model is nice to have. But once I have created all things and items I have a sitemap to control appliances in my house.

Thanks for your help!
Meschmesch

If you are happy with your old why, why change? You don’t have to use the Model if you find it to be a problem. All your .items files still work as they were written in OH 2.5. Just keep using those.

True. You could probably add Item metadata to the Items but that won’t really be visible. If the ability to add comments to your Items is important, stick with .items files.

Technically that is true for Items defined in .items files as well. It only appears that you can change the name of an Item because what is really happening is when a .items file is unloaded, all the Items defined in that file are deleted. When the .items file is loaded all the Items defined in that file are created anew. When you manage your Items internal to openHAB, the Items always exist until you delete them manually. Therefore, to change the name of an Item you have to delete the old one and create a new one, just like it works in .items files (or you can cheat and stop openHAB and edit the JSONDB by hand).

This is still possible. But such a Group wouldn’t be a part of the model. The model strictly models the physical layout of your home automation. There will be a lot of Groups like that which represent a functional Grouping. Those functional Groups don’t go into the model.

Yes there is. Select the Item from the model and then click on the Item on the right hand side where it shows the details. Alternatively browse or search for the Item in the Items settings page. That will take you to the Item’s page where everything there is to know about that Item is available and configurable.

In that list of Groups this Light Item belongs to, the only one that is part of the mode is “FamilyRoom_Lamps”. The rest are functional Groups.

You’ve probably made the erroneous assumption that the Model settings is intended to include all your Items. That is not the case.

Perhaps. The model is intended to only model the physical hierarchy of your home automation. Given that and given that a Point can’t physically be a part of more than one Equipment and given that a Point or Equipment can’t physically be in two different locations at the same time, no semantically tagged Item can be a direct member of more than one semantically tagged Group.

Once you create the model you have a nice set of Pages to see and control the appliances of your house. And because of the model you have way more control over the appearance and organization of that automatically created pages.

These are somewhat customized but almost all that you see here is controlled by the model.

But if you don’t want to use Pages, you don’t have to. Again, you can keep doing things just as you always have. However, if you do want to use Pages you will do well to spend some time setting up the model.

And while I don’t recommend it it’s absolutetly possible to configure the model in your .items files as well. A Location is just a Group with a Location tag. An Equipment is just a Group with an Equipment tag. A Point is just an Item with a Point tag and an optional Property tag.

2 Likes

Hello, this explanation helps me a lot, thank you very much!! I really appreciate your help and quick replies in this forum. Thank you Rich.

1 Like