OH3: Meaning of Locations and Groups

Dear all,

two questions on modeling in the new UI?

First, I am confused by the model semantics in the OH3 tutorial: I have several devices (“equipment”) that are distributed over some rooms.
Intuitively, I created rooms as “locations”, but that did not work. After reading the docs, I learned that my rooms need to be created as “groups”. So what is the purpose of a “location” if it is not rooms?

Second, I want to summarize some lights in a group to switch them simultaneously. I created a group with semantics of a “lightbulb”. Is this the correct approach? I had some issues here, see OH3 MainUI: How to register (and exclude) items for Google Assistant and Amazon Alexa?

Thanks a lot!

2 Likes

Ah sorry i have seen your thread but wasn’t able to provide a real proper answer yet.
(Maybe i am still not since i have just started with aproper semantic tagging too.)

First of all i have recognized that the docs page has cut of the screenshot of the first posting in this thread.

If you have a look here it maybe gets

You can always use additional Group items on top of your modelling.
So your approach for the light should be valid. You just have to add this group as adfditional parent group to the wanted lights.

Difference between group and location:

I will try to explain that on how i have understand it.

A location is a group item with a semantic “meaning”.
This is needed for tools like habot to have the ability of choosing and gourping lights based on their location like “Turn off all the living room lights”.

With your custom group you could turn of lights over different locations lice stairs, corridor and living room at once.

@Confectrician Thanks for help. Merry Xmas :slight_smile:

So does this mean I should have a group called “Office” and I should add a “location” therein also called “Office” to let OH know?

For my understanding, the image is also not true: You cannot add equipment to a location. Only to a group…

True, equipments are groups, the points are items. Example: equipment Colour lamp livingroom (=group), points Dimmer and Colour (=items linked to channels)

Yeah, but the image you mentioned looks like locations can be used to group equipment. Or am I wrong?

Correct, to group groups so to say

If you want to have special control of the office lights i would add a group Office_Lights.

Therotically you could edit the Location item too.

But in my view this would only make sense if the location only includes lights.
So therefore i would go for the second group approach.

To be honest, I still don’t really get it. If I try to repeat your example, I fail because first, I do not know if your screenshot has been realized by a location, group or point (or whatever combination). Second, if I try to create a group of points (say, for setpoints), I only get aggregation types such as avg, sum, min, max. This differs from your screenshot.

The documentation might be a good for people familiar with the concept to remember what has been defined, but looking from outside, one is missing simple example. I understand that this has been simpler in the past with textual examples, but also for GUI, this would be really helpful.

Maybe a specific, detailed tutorial on this would be good: Say, two lights which should be synchronized by a common group. Or say, two heatings that should receive the same setpoints.

Maybe i have something for the lights example for you.
(Hope it helps a bit.)

image

This is my “dumb/unsmart” ceiling light which i have “modified” with a microcontroller and some relays.
The model part is a hierarchie of equipments in this case (lets leave the location aside for now).

I can control each lightbulb of this ceiling light standalone theoretically.
In my model those are the lightning symbols, which are actually 4 switch channels of one thing.

I have added two equipments (in fact those are grou items under the hood),
to combine the standalone channels logically.
Each Equipment will control half of the available lightbulbs.
This is needed for my TV sceene to avoid dazzling from this light.

On top of this i have another equiment which combines the other equipments.
This will give me the ability to switch the complete light with all 4 bulbs.

So before i continue i would like to know if this would help you in general.
Just to avoid even more confusion with the information i would share.
If it will help you, i well tell some more about how all those equipments/groups are configured.

That’s exactly it. Thanks!

Now say you have heatings in all rooms as part of the room groups. Now you want to put the set points of all heatings in the house also in a common group to adjust them at once. How would that work in parallel to the rooms topology?

Ok then i will give some more information on how i have configured the model and semantic tags for them.

About the heating:
Sorry i have to pass here. My flat doesn’t give me the ability for a proper heating automation so i have left this part out of my own environment completely for now.
I could tell you something theoretically but i would like to avoid that since i have no own experiences here.

Ceiling Light

I will explain it “Top-Down” as this would be the solution how you would have to configure it in the Model.
I will also work with the original german terms, because that will fit to any screenshot.

First i have added one Equipment for the complete light Wohnzimmer Deckenleuchte standalone.

Ends in:

If you click on the item gCeleingLIght you will come to the item view where you can edit the item itself and its behavior.

I have clicked on edit and changed the *Group Settings area.

Then i went back to the Model page and did a Create Equipment from Thing for Wohnzimmer Fernsehbeleuchtung where i have choosen my light but only added the first 2 channels.

Again i will go the equipment group item and configure the Group Settings like done above for the first Equipment.

After this i will do the same

  • Create Equipment from Thing
  • Choose channel 3 and 4 this time
  • Save and add Group settings afterwards

again for Wohnzimmer Rückbeleuchtung.

Then i will end up with 3 lightbulds configured in 3 goups which will reflect their current states on ther behavior.

I am also able to switch all bulbs completely with the Wohnzimmer Deckenleuchte item or half of the lamp indipendent for Wohnzimmer Fernsehbeleuchtung or Wohnzimmer Rückbeleuchtung.

2 Likes

Awesome, thanks. Maybe that could support the official docs that @rlkoshak is developing with so much effort.

I should add that composed equipment such as color or dimmer lights still remain a bit unclear to me: The group functions e.g. of a dimmer only allow things like average, max or min, but I would like to have something like a “master dimmer” in the equipment group that rules them all :wink:
Same holds for color lights.

Is there anyone having a design template how to realize this in an elegant way (aside from writing rules)?

You are of course invited to contribute something yourself, if you find the information useful. :slight_smile:
I think @rlkoshak would appreciate some help too.

3 Likes

@Tobi77 : I realize I am a bit late to the party so to speak, but have you read this:

I think it does a good job of explaining the way locations, equipment, points, etc. are handled in terms of groups, items, tags, etc.

Hey @KjetilA thanks for joining the party. :slight_smile:
As far as i know @rlkoshak took this thread as blueprint for the docs article he contributed to the tutorial over there.

So i would be interested if there are bigger changes we have to transfer to the docs additionally.

To be honest, I have a hard time understanding what thread/wiki/doc that is the “correct” one and being actively worked on… There seems to be so many things going on, :slight_smile:

The wiki articles are meant as a strirting point where everyone can help iomproving those.
The long term goal is to move these wikis completely to the documentation so that they are available for everyone on our website. :slight_smile:

Right, thanks for clearing that up. As I understand it the wiki article in question (the one I linked to) has already been moved to documentation. I presume this means that suggestions should then no longer be made on the wiki article, but rather on the documentation in github. Correct?

1 Like