Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion on ontology improvement #1791

Closed
52 of 65 tasks
lolodomo opened this issue Nov 3, 2020 · 185 comments
Closed
52 of 65 tasks

Discussion on ontology improvement #1791

lolodomo opened this issue Nov 3, 2020 · 185 comments

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Nov 3, 2020

I open this topic to help improving the current ontology.
Of course, the ontology cannot cover all cases but at least it should cover what most of users will need.

Here are the changes proposed in the next messages.

New location entries:

New location synonyms:

New equiipment entries:

New property entries:

Properties removed:

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

Using synonym is I believe a way to extend the ontology. I already tested it with rooms,

Group Bureau "Bureau" <office> (Etage) [ "Room" ] { synonyms="Bureau,Bureaux" }

image

I imagine we can do it for equipments too. To be checked.

That would mean the user is not limited with locations and equipments. Problem is only for properties.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

Unfortunately, synomym is ignored by Main UI for equipment.

Group GNetatmoMeteoInt "Station Netatmo intérieure" <temperature> (GMeteo,SalleSejour) [ "Equipment" ] { synonyms="Capteur,Capteurs" }

Unfortunately, I find no card named "Capteur" in the Equipment tab in MainUI, only "Equipment".

I have no idea if this is a bug in MainUI or if simply synomyms are not allowed for an equipment ?
@ghys ?

If synonym was possible for an equipment like it is for a room, I have the feeling it will allow a user to define any equipment he would like.

@mhilbush
Copy link
Contributor

mhilbush commented Nov 3, 2020

A couple years ago I had proposed a few additions for consideration. I'll copy here from the original issue.

Locations

  • Second Floor (parent=Floor)
  • Third Floor (parent=Floor)
  • Dining Room (parent=Room)
  • Family Room (parent=Room)
  • Powder Room (synonym of Bath Room)
  • Hallway (synonym of Corridor)
  • Laundry Room (parent=Room)
  • Driveway (parent=Outside)
  • Patio (synonym of Terrace)
  • Porch (parent=Outside) (what about Front Porch, Back Porch, Side Porch, etc. too granular?)

Properties (a number of my Z-Wave sensors produce these)

  • Luminance
  • Lux (synonym of Luminance)
  • Ultraviolet
  • Seismic

Equipment

  • Doorbell
  • Fan
  • Ceiling Fan (parent=Fan)
  • Back Door (parent=Door)
  • Side Door (parent=Door)

Points

  • Heating Setpoint (parent=Setpoint) (is this too granular?)
  • Cooling Setpoint (parent=Setpoint) (is this too granular?)
  • Motion

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

After more testing, I understand that the synonyms are just not used by the UI.

In Main UI, in Locations tab, you have one card for each group tagged with a location tag. So if one room is missing in the ontology, tag your group simply with "Room" and it will appear in the Locations tab with the lable of your group.

In the equipment tab, there is not one card for each group tagged with a equipment tag, but one card for each kind of equipment defined in the ontology. So, if you have several groups tagged with "Equipment", they will be all grouped in the unique "Equipment" card. I don't find how you can create new cards. The list of cards is limited to the equipments defined in the ontology. So if you don't find what you need as equipment and choose just "Equipment", this will result in a lot of things in the "Equipment" card.
@ghys : could we imagine a setting in metadata to avoid this grouping when not wished ? Default will remain grouping.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

Locations

* Second Floor (parent=Floor)
* Third Floor (parent=Floor)

Third floor is really not something common. Second floor is just a little more. IMHO, second floor could be added.

* Dining Room (parent=Room)

Agreed.

* Family Room (parent=Room)

Isn't it the same thing as living room ?

* Powder Room (synonym of Bath Room)

As you mention, this is a synonym and similar to bathroom. IMHO, not to be added to avoid a big list.

* Hallway (synonym of Corridor)

As you mention, this is a synonym and similar to corridor. IMHO, not to be added to avoid a big list.

* Laundry Room (parent=Room)

Agreed.

* Driveway (parent=Outside)

What equipments do you like to put in this location ? Lights ?

* Patio (synonym of Terrace)

As you mention, this is a synonym and similar to terrace. IMHO, not to be added to avoid a big list.

* Porch (parent=Outside) (what about Front Porch, Back Porch, Side Porch, etc. too granular?)

Agreed for porch.

Properties (a number of my Z-Wave sensors produce these)

* Luminance
* Lux (synonym of Luminance)

Agreed for one of both.

* Ultraviolet
* Seismic

Looks like ultra specific.

Equipment

* Doorbell
* Fan
* Ceiling Fan (parent=Fan)

Agreed with these 3 ones.

* Back Door (parent=Door)
* Side Door (parent=Door)

Is Door not enough ?

Points

* Heating Setpoint (parent=Setpoint) (is this too granular?)
* Cooling Setpoint (parent=Setpoint) (is this too granular?)

IMHO, setpoint is sufficient.

* Motion

I thing we can use Status + Presence to represent motion ? This is at least what I did.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

On my side, for locations, I would propose to add:

  • Entry (not sure this is the correct name in English, I mean the first room when you enter in a house or appartment)
  • Office
  • Veranda

@mhilbush
Copy link
Contributor

mhilbush commented Nov 3, 2020

Thanks for looking over the list. I've commented only on the ones you questioned.

  • Second Floor (parent=Floor)
  • Third Floor (parent=Floor)

Third floor is really not something common. Second floor is just a little more. IMHO, second floor could be added.

Agree with dropping Third Floor. Second Floor is a must IMO (otherwise what's the point of having a First Floor 😉 ).

  • Family Room (parent=Room)

Isn't it the same thing as living room ?

These are typically 2 different rooms (at least in the US)

  • Powder Room (synonym of Bath Room)

As you mention, this is a synonym and similar to bathroom. IMHO, not to be added to avoid a big list.

Agree

  • Hallway (synonym of Corridor)

As you mention, this is a synonym and similar to corridor. IMHO, not to be added to avoid a big list.

Agree

  • Driveway (parent=Outside)

What equipments do you like to put in this location ? Lights ?

I have lights, motion sensor, and camera. Also possible are driveway sensor, gate, and intercom

  • Patio (synonym of Terrace)

As you mention, this is a synonym and similar to terrace. IMHO, not to be added to avoid a big list.

Agree

  • Ultraviolet
  • Seismic

Looks like ultra specific.

There are several Z-Wave sensors that report these, so I don't see the harm in adding them for completeness. Weather Stations also report UV.

  • Back Door (parent=Door)
  • Side Door (parent=Door)

Is Door not enough?

Probably. I added Back and Side because I thought there already was a Front Door.

  • Heating Setpoint (parent=Setpoint) (is this too granular?)
  • Cooling Setpoint (parent=Setpoint) (is this too granular?)

IMHO, setpoint is sufficient.

Agree

  • Motion

I thing we can use Status + Presence to represent motion ? This is at least what I did.

Agree

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

For equipments, I would propose these very common equipments for which I found no matching:

  • Alarm System
  • Sensor
  • Temperature Sensor (parent: Sensor)
  • TV
  • Washing Machine
  • Weather Service (parent: WebService)
  • Boiler

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

  • Second Floor (parent=Floor)
  • Third Floor (parent=Floor)

Third floor is really not something common. Second floor is just a little more. IMHO, second floor could be added.

Agree with dropping Third Floor. Second Floor is a must IMO (otherwise what's the point of having a First Floor 😉 ).

Agreed for a second floor.

  • Family Room (parent=Room)

Isn't it the same thing as living room ?

These are typically 2 different rooms (at least in the US)

Interesting, we don't have this distinction in France. And if you check with Google Tradcution, you will see that it leads to the same translation ;)

  • Driveway (parent=Outside)

What equipments do you like to put in this location ? Lights ?

I have lights, motion sensor, and camera. Also possible are driveway sensor, gate, and intercom

Ok, agreed.

  • Ultraviolet
  • Seismic

Looks like ultra specific.

There are several Z-Wave sensors that report these, so I don't see the harm in adding them for completeness. Weather Stations also report UV.

Ok, why not. Agreed.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

For TV, maybe Screen is intented ?

@TBail
Copy link

TBail commented Nov 3, 2020

I see some reasons to extend the ontology:

1.) There are shortcommings. Things that are realy missing. Example: Battery Level/State Point = Status Property = ? maybe Energy
2.) It help new users to get used to openhab more easy. Example: There is no room Office. An experienced user will select Room, for a new user it it easier to select Office. Second Example: a TV could be selected as Screen, but TV is more natural

Question: Is the intention to extend the Onthology or to change it where suitable?

And we should find a format to document our discussion in an easy format.

@bwosborne2
Copy link

  • Driveway (parent=Outside)

What equipments do you like to put in this location ? Lights ?

Some people put their OH monitored Car there. ;)

@mstroeve
Copy link

mstroeve commented Nov 3, 2020

Third Floor would be needed in my OpenHAB Setup.

@bobadair
Copy link
Member

bobadair commented Nov 3, 2020

Third floor is really not something common. Second floor is just a little more. IMHO, second floor could be added.

I would argue that 3rd floor is actually quite common in the US. In Europe and the UK, they use "Ground Floor" for what we would call "First Floor" in the US, and then "First Floor" for what we would call "Second Floor", and so on. So I would expect it to be less common there.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

Ok for driveway and third floor.

I see in the current definition that television and TV are defined as synonyms of screen.
In French version, washing machine is a synonym of white good.
The problem is that synonyms are used by HABot but not yet in MainUI.
One solution would be for UI to display the synonyms in addition to the main object.
As example, user will see in the equipment list one entry like "Screen (television, TV)" rather than just "Screen".
We could then add few additional synonyms, for example powder room to bath room.
@ghys : is it a change you could accept?

@bwosborne2
Copy link

  • Patio (synonym of Terrace)

In the US the Terrace level of a building is usually below the first floor. A Patio is an outside seating area.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

@mhilbush : I misunderstood your requests of new synonyms. I think they could be added as synonyms, especially if the UI would be able to expose them more directly with the main location/equipment.

@mhilbush
Copy link
Contributor

mhilbush commented Nov 3, 2020

Ok, no problem.

How do you want to handle the aggregation of all the suggestions?

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

I can list the validated changes in my first message?
By validated, I mean when several members agreed on a change.

But before, I would like to know if we can rely on synonyms or not in UI. This could reduce the need of new entries but a change in UI.
This will not be always obvious if we should add a new entry or add a synonym to an existing entry.i would like listening @ghys about use of synonyms.

@mhilbush
Copy link
Contributor

mhilbush commented Nov 3, 2020

I can list the validated changes in my first message?

That works.

But before, I would like to know if we can rely on synonyms or not in UI. This could reduce the need of new entries but a change in UI.

Makes sense.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

First message updated with all proposals.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

The point "OpenState" be replaced by a property "Opening". For a door/window, we will then use point "Status" and property "Opening". Does it make sense ? The idea is to have a card "Opening" in UI (tab Properties) that will show the opening status of all door and windows.

@mhilbush
Copy link
Contributor

mhilbush commented Nov 3, 2020

Looks good. Just one suggestion.

Corridor: Hallway, Entry ?

Change to:

Corridor: Hallway
Entry: Foyer

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 3, 2020

1.) There are shortcommings. Things that are realy missing. Example: Battery Level/State Point = Status Property = ? maybe Energy

Property "Level" could be added. We will then use point "Status" (or "Measurement") and property "Level".

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 4, 2020

Change to:

Corridor: Hallway
Entry: Foyer

You mean adding "Foyer Entry" as new synonym for existing entry "Corridor" ? Or adding a new entry "Foyer Entry" ?

@mhilbush
Copy link
Contributor

mhilbush commented Nov 4, 2020

Oh, sorry, I should've been more clear. WDYT?

Add Hallway as a synonym of Corridor

Add a new location Entry.

Add Foyer as a synonym of Entry.

@ghys
Copy link
Member

ghys commented Nov 4, 2020

As example, user will see in the equipment list one entry like "Screen (television, TV)" rather than just "Screen".
We could then add few additional synonyms, for example powder room to bath room.
@ghys : is it a change you could accept?

No, I don't think it's a good solution to display all synonyms. Instead I'll push to offer the ability to customize what's displayed on the card, so it would be possible to rename the title from the suggested default, but also change the background color, eventually add a background image if desired, maybe a badge with some counter, and other additional text or controls of the user's choosing. For example the Temperatures card might be a good place to display an average - but the indoor temperatures only as including an outdoor temperature in the average wouldn't make sense -, or on a Window card the number of windows that are open, maybe with icons.
What's in the list when you expand the card would still be controlled with the semantic tagging and additional metadata - including the order and omitting certain unwanted entries, but I plan to have more extensive customization options for the card header. The issue is that it's hard to know reliably what is relevant or desirable to display there without user intervention, that's why I believe there would be a need for manual configuration at some point; for instance that could involve creating a group with an aggregation function for outdoor temperatures only, and then use this group to display the desired info.

On the other hand, displaying synonyms when picking the semantic class (when you're editing the items) make sense.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 4, 2020

Add Hallway as a synonym of Corridor

Add a new location Entry.

Add Foyer as a synonym of Entry.

Ok, changed.

@TBail
Copy link

TBail commented Nov 4, 2020

As a new Property we should add Time or TimeStamp

As far as i undersnd the synonyms are only used within habbot. Is that right?

@lolodomo
Copy link
Contributor Author

Setting semantic tags is required to build the model and have channels dispayed in MainUI (equipment tab, properties tabs).
Adding more tags helps to have a better ordering in MainUI rather having everything under "Status" for example.
And you ask yourself if a forecast is a measurement. So of course, you can guess that many users will ask themself what "Point" to choose.
So I agree that we can live without these tags but this is just better with them, in UI perspective.

@TBail
Copy link

TBail commented Jul 12, 2021

From my point of view the problem with the model is that we need PR's to change/add new things (Points, propertyies, Equipments, ...) and i have real doubts about the usefullness at all.

Based on this i deleted the whole model and work only with groups. A real benefit would be a good groups display in the ui where is no need to tick a checkmark to see my groups an get goups with metadata displayed.

So strip away all tags and create a dynamic system that every use create on his own.

@kaikreuzer
Copy link
Member

@TBail Removing the semantic model is imho not the way to go. The model is very powerful and can be used for so much more than for plain grouping.

I understand from @lolodomo though that the current UI implementation forces users to put semantic tags on everything, because they otherwise are not shown on the semantic tabs. I don't think the semantic tabs were ever meant to be the main access for everything, though. Ideally, one should design pages, which can use grouping for sorting stuff into a desired structure.
We could also think to define any item that is a member of a location or equipment and which does not have any semantic tags to be a Point (as this is what a "standard" item is supposed to be). Not sure if this would help to improve the semantic tabs or rather clutter them with unwanted information...

@TBail
Copy link

TBail commented Jul 13, 2021

@kaikreuzer Could you give some examples how to use the model. All i see since the first version of openHAB 3 is that it is complex to implement, it is not complete, it is not easy to extend for the user (PR required) and it only generates some kind of standard sitemap.

Beside the automatic sitemap creation all other thing could be done with groups in a more flexible way. Only thin missing is group display, that is not ficussed on the semantic model.

Maybe the right way is to add user dynamic options. Dynamically extendable by the user, Why not define own equipment, points and properties. On big problem is alway to get a common understanding. Is first floor in the US the same as in germany, is a meter value a measurement, what does light as point mean does it include color, ????

@lolodomo
Copy link
Contributor Author

Ideally, one should design pages

Designing pages is IMHO for very advanced users. Even me, I did not do it !
The semantic approach with the semantic tabs in Main UI is clearly a more easy way to get a UI. I imagine most of users are using that way.

@kaikreuzer
Copy link
Member

Could you give some examples how to use the model.

It existed long before openHAB 3 already - it brings "machine readability". It's first use was for NLP in HABot and it will be important in future for properly using rule templates as well. We definitely won't drop it.

The semantic approach with the semantic tabs in Main UI is clearly a more easy way to get a UI.

@ghys I'd like to invite you to the discussion and see what solution there could be. I agree with @lolodomo that the semantic tabs are very prominent and in many places (including our newby tutorials), it is suggested to users to make extensive use of it. On the other hand, we agreed here on this thread that our semantic library should be cautiously maintained and must not proliferate - through this it is clear that we won't have semantic tags for any of the channels that are out there, which will always leave us with items that have no suitable tags.

For the issue at hand (channels with forecasted weather data) I somehow think it is correct that they do not turn up on the semantic tabs - such information would somehow clutter it too much, especially if we'd keep adding more and more such things. What could be a solution here?

@rkoshak
Copy link

rkoshak commented Jul 20, 2021

I understand from @lolodomo though that the current UI implementation forces users to put semantic tags on everything, because they otherwise are not shown on the semantic tabs.

There is a checkbox at the bottom of the model views that will show all Items whether or not they are semantically tagged. By default that check box is not tagged.

The UI encourages the use of tags but it does not force the user to put tags on everything and I've personally taken it as a mission to make that clear on the forum. I tried to make that clear in the Getting Started Tutorial. In my experience only 60%-75% of Items belong in the model and to have tags at all. Stuff like the Items that feed into proxy Items, Items used in rules or to hold settings and such shouldn't be in the model.

We could also think to define any item that is a member of a location or equipment and which does not have any semantic tags to be a Point (as this is what a "standard" item is supposed to be). Not sure if this would help to improve the semantic tabs or rather clutter them with unwanted information...

I would not be in favor of this approach but it's not a strong preference. The problem is that these Items with a Point tag added will automatically end up represented in the Overview Pages whether you want it there or not. Rather than making a positive decision to show it, by adding semantic tags, one must edit the visibility of the Items to make the negative decision to not show the Items.

But the problem of not being able to see non-tagged Items in the Model view is already solved. Check the box and you'll see all the Items. The ones that are not in the model will be slightly grayed out so it's easy to tell the difference between tagged and untagged.

One nice feature this allows is you can still take advantage of grouping these Items into Equipment and Locations but you don't have to deal with making everything a part of the model and then needing to do something special to not show those Items in the UI.

For example, here is one of my Chromecast Equipment groups in the Model.

image

Everything under "Rich's Office Home Hub Volume" have no semantic tags. I don't want those Items to be a part of the model. I don't want them rendered in the Overview Pages and I don't want them available to HABot. So they are not tagged. But notice they are still members of "Rich's Office Home Hub" which is tagged with an Equipment tag.

Overall my understanding is that the tags that we had initially came from an established ontology so that would explain why we had the set of tags that we originally had. But we will be moving pretty far from that original set based on the discussion here. So maybe it's worth considering something that might work better in an OH context.

Personally I really like how the Point/Properties work. It provides a really powerful way to define both what the Point does/represents and what it does it to. For example, Alarm/Smoke for a smoke alarm. Alarm/Water for a leak alarm. Alarm/Sound for a loud sound alarm. And so on. Maybe that can be expanded to Equipment and Locations too? Maybe have just on Door tag and then have a "Equipment Property" to distinguish between "Front Door" and "Back Door" and so on. Why do we need six separate tags to represent doors? Semantically is there really a difference between a Front Door and Back Door beyond it's name? Maybe we only need three tags with the ability to enhance it with a second tag: Exterior Door/Front, Interior Door/Bathroom, Garage Door.

Way back in OH 2.5 there was the ability to define synonyms for the model used by HABot using metadata if I recall correctly. So, for example, one can use a Bedroom Location tag with a synonym "Rich's Bedroom". Perhaps something like that could be incorporated to allow users the flexibility define the model in ways that provide more meaning to them while also preserving the set meanings required by the HLP in HABot. To go back to the doors example: Exterior Door is the tag and "Front door" is the synonyms.

Just some thoughts...

@kaikreuzer
Copy link
Member

Thanks @rkoshak, your input is highly appreciated.

There is a checkbox at the bottom of the model views that will show all Items

This is correct, but afaik that's only the case for the model view. The discussion above was mainly about the "Locations" and "Equipment" tabs, which I dubbed "Semantic tabs" above. Those tabs only show semantically tagged items and nothing else (see #1791 (comment)). Therefore @lolodomo created PRs like openhab/openhab-addons#10973 and openhab/openhab-addons#10972 (and there would be 298 PRs to come to also cover other bindings) to make sure that channels of Things turn up on those tabs without the user having to manually add semantic tags to them.

See this post for the questions I was trying to find a solution for right now (and please allow me to "park" your comments on the granularity of tags and the concept of synonyms, which are both worthwhile, but imho not directly contributing to the questions at hand).

I think @ghys did great suggestions in openhab/openhab-webui#155 a long time ago - the "problem" is probably, that the "Overview" page never became the "one-stop shop" for the user so far and he rather opens the "Locations" and "Equipment" tabs to find all he needs. If we had a powerful "Overview" page that is automatically grouping/sorting all there is in the home and that can be customized to the liking of the user, nobody would actually complain about the fact that "Locations" and "Equipment" does not show everything. I wonder if we hence shouldn't focus on improving the "Overview" instead of adding semantics for all channels that exist. Maybe we could also think about a checkbox for non-tagged items for the "Locations" and "Equipment" tabs for the time being.

@TBail
Copy link

TBail commented Jul 21, 2021

Two additions:

1.) It would be nice if the checkmark for non semantic items could be made permanent

2.) As far as i remeber there is a bug that group items with meta data are not shown in the tree of non semanic data

@rkoshak
Copy link

rkoshak commented Jul 21, 2021

My mistake. I was confusing this issue with the other issue about adding new tags and I misunderstood which screen we were talking about.

@kaikreuzer
Copy link
Member

@rkoshak While waiting for @ghys to chime in here (yeah, it's holiday season, so let's be patient), I'd also be interested in your view on how to best deal with the different "tabs" in the UI - what to show where, how much customisability there should be and what implications this should have on the tags that we add on channels by default.

@rkoshak
Copy link

rkoshak commented Jul 26, 2021

That's a pretty big topic and I don't really have a coherent set of ideas yet. But I do have some disjoint ideas and things that have been requested on the forum:

  • We should be able to hide the Overview tab just like we can hide the Locations, Equipments, and Properties tab.

  • We should be able to specify the default tab to show when first loading the page. Maybe support a different default per user or user role? Beyond the tab on the Overview Page, many have requested the ability to specify one of their own custom pages as the default one shown.

  • We need to keep in mind that there are two types of user roles: admin and user. As we talk about what is shown and where we need to keep in mind which type of user we are talking about. Everything I mentioned thus far I think applies to both types of users, but there are places where it wont. For example, having a checkbox to show those Items that are not part of the model on the Locations tab is probably not something that should be available to regular users and only to admin users.

  • There already is a good deal of customization but it's somewhat hard to use or discover. For example, one can add an Item to the Model and then set metadata to determine whether the Item is visible in the Overview Pages and that visibility can be controlled based on user type (e.g. only show to admin users, hide for regular users) or an expression (e.g. only show an Item when it's state or the state of some other Item means it's relevant). But that setting is buried in the "Default List Widget" Item metadata. I think it would be great to bring this setting to the foreground, perhaps making it settable straight from the Model page itself. Then it's more obvious that you have additional ways to control whether Items appear in the Overview Pages beyond keeping Items out of the model entirely.

  • I've written a couple of tutorials on this on the forum and tried to include this in the Getting Started tutorial. It is really powerful and relatively simple if users create custom List Widgets in the Developer Tools. Then as Items are added to the Model apply those custom widgets. For example, I've a bunch of humidifiers and each has a setpoint. I created a custom widget some customizations. Once that one widget was created I can apply it to all of my humidifier setpoints and they all will look and behave the same in the Overview Pages. And if I want to change something in the widget I can update the widget in the Developer Tools and it updates all the Items that use that widget. This is super powerful but not at all obvious. I'd like to see that workflow somehow emphasized more in the UIs. Maybe in the "Create Equipment from Thing" page where we create the Items have an option to select the custom List Widget. Show that a custom list widgets is expected, not something that is only for advanced users.

  • It'd also be nice to have a "save as custom widget" option in the Default List Widget creation page. Then one could build the widget on one Item directly, copy it over to a Custom List Widget for use in other Items when ready, and apply it to the similar Items. Right now it takes a good deal of copy/paste/edit to promote a Default List Widget Item metadata to become a Custom Widget in Developer Tools.

  • Another area of customization available is that we can include multiple Items in one widget. For example, I've a custom list widget that includes a button to mute and a slider for volume control and a separate custom list widget that includes the artist, album, track, and time remaining. Thats six Items represented by two widgets. So what's the best way to handle that? I've applied the widget to two of the Items and left the rest of the Items out of the model entirely (though they are members of the Equipment Group as shown in the screenshot above). Another option would be to set the visibility of the other Items to false so they just don't show up in the Overview Pages but they remain a part of the model. Neither approach is that obvious right now but if we expose that visibility setting as discussed above the second one would become more obvious. And remember, we can set the visibility based on user type so we can hide some Items just from end users but show them to admin users.

In general I think we already have most of the customization options we really need. But some of them are too deep and too hidden to be obvious to many users who don't read the tutorials too closely. And if you don't get this from the tutorials they are not approaches and techniques that could be discovered casually making them unavailable. If we can make them more discoverable it doesn't matter what we do with the tags I think.

One thing that might become a game changer overall though is the marketplace. If the marketplace becomes successful, custom Pages and widgets won't be just for very advanced users any more. Users will be able to download and configure very complex unified widgets (e.g. weather forecast, thermostat, media control, etc.) without ever needing to look at or understand the code. When that happens I think users will start building custom pages much more because all they have to do is install the widget, add it to a page and fill out the configuration form. They won't be just for very advanced users as @lolodomo stated.

Sorry for the wall of text. I've been thinking on this all weekend.

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/starting-using-oh3/124840/10

@jimtng
Copy link
Contributor

jimtng commented Dec 6, 2021

Maybe the right way is to add user dynamic options. Dynamically extendable by the user, Why not define own equipment, points and properties.

I would very much like to see this. No matter how extensive or restrictive the semantic model is, there's always something that doesn't quite fit into the predefined model or fits awkwardly.

It would be great if OpenHAB allows a custom list of Locations/Equipment/Points/Properties, loaded in a text file structure (yaml?) and/or GUI.

I have just started adding semantic tags to my items, with the intention of using them to aid my rules in inferring "related items".

Currently within my rule, I am using item name pattern and using string substitution from the current items's name to get a related item. Example pseudocode:

TriggeredItem = Camera_LastMotionType
# I want to get: Camera_EventData item
event_data = TriggeredItem.name.strip_suffix('_LastMotionType') + '_EventData'

I am hoping to use semantic tags to do something like;

TriggeredItem = Camera_LastMotionType
event_data = TriggeredItem.find_sibling_point_with_property('EventData')

Currently due to the very limited set of properties, I cannot do this because, there's no "EventData" property. Yes, I understand that nobody else might ever need such a property, which highlights the point for the ability to define it dynamically.

Just a typical scenario of a smart light with the following items: Power (on/off), Brightness, ColorTemperature, Color(HSB), I cannot figure out unique properties for these 4 items that belong to the lightbulb, let alone if I want to add ColorScheme, Mode, PulseTime, and a gazillion other custom items that could belong to this light. Currently only ColorTemperature is available as a property.

@Rosi2143
Copy link
Contributor

I just closed my PR #2021 and would like to keep the discussion here for the extention of the semantic model by these two properties:

Type Tag Parent Label Synonyms
Property Distance Distance Length
Property Angle Angle Gradient

It's important for e.g. these bindings that I use

  • astro
  • Tankerkönig
  • GPS Tracker
  • Automover/Indego
  • BMW Connected drive

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/missing-equipments-in-the-semantic-model/134078/2

@mstormi
Copy link

mstormi commented Mar 9, 2022

Not sure if applicable here but a forum post pointed me at this one,
apparently an ontology KNX and others are probably going to be using
https://www.nen.nl/en/nen-en-50090-6-2-2021-en-290308

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/is-it-possible-to-add-new-properties-to-the-semantic-model/135785/3

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/extend-semantic-model-icons/144239/3

@jimtng
Copy link
Contributor

jimtng commented Apr 1, 2023

I made a PoC code in jruby that can dynamically add (but not remove) additional semantic tags. An openHAB restart would reset it back to "factory default". Example:

Semantics.add(SecretRoom: Semantics::Room) # Adds Location_Indoor_Room_SecretRoom
Semantics.add(Color: Semantics::Property, label: "Light Color", synonyms: "Colour") # Adds Property_Color
Semantics.add(Staircase: Semantics::Indoor, synonyms: "Stairway") # Adds Location_Indoor_Staircase

the extention of the semantic model by these two properties:

Type Tag Parent Label Synonyms
Property Distance Distance Length
Property Angle Angle Gradient

So to add the above:

Semantics.add(Distance: Semantics::Property, synonyms: "Length")
Semantics.add(Angle: Semantics::Property, synonyms: "Gradient")

It works by creating the bytecode of java interface and adding it into the JVM runtime. It also adds the corresponding entries in SemanticTags.TAGS and Locations/Properties/etc. list of members (Locations.LOCATIONS, Properties.PROPERTIES, etc), so that SemanticTags methods will work with the added tags.

The only downside is that the list of tags is hardcoded in MainUI, so while it can display it, it doesn't allow selecting the added tags to an item.

It works fine for me using textual rules / items definitions.

image

If openHAB would like to support dynamically adding semantic tags in this manner:

  • Decide whether to stick with the current architecture of using Java interfaces to define the tags, or move to some sort of data structure so that adding/removing new tags would be easier without resorting to dealing with java bytecode.
  • Implement some sort of loading mechanism, i.e. textual config (a-la the items file) + managed provider to store the additional tags so they can be loaded/restored on startup. Right now my mechanism is by loading them in my rule. I can set my rule to run at a lower startlevel, but I think by then, items would have loaded. It's fine if I also create my items dynamically within my rule, which is super easy to do in jruby.
  • Implement REST interface so MainUI can fetch the list of semantic tags that have been added.

@jimtng
Copy link
Contributor

jimtng commented Apr 2, 2023

I've just submitted PR #3519 to allow dynamically add custom semantic tags.

@lolodomo
Copy link
Contributor Author

I have now implemented a semantic tag registry. It is now possible to add any semantic tag you like by yourself.

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
Related to openhab#1791

Also-by: Christoph Weitkamp <[email protected]>
Also-by: Mark <[email protected]>
Signed-off-by: Laurent Garnier <[email protected]>
GitOrigin-RevId: f6d3f1d
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
Related to openhab#1791

Signed-off-by: Laurent Garnier <[email protected]>
GitOrigin-RevId: 5ae3c67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests