openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
904 stars 419 forks source link

Discussion on ontology improvement #1791

Closed lolodomo closed 1 year ago

lolodomo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Locations

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

Equipment

Points

lolodomo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

mhilbush commented 3 years ago

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 commented 3 years ago

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

lolodomo commented 3 years ago
  • 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 commented 3 years ago

For TV, maybe Screen is intented ?

TBail commented 3 years ago

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 commented 3 years ago
  • Driveway (parent=Outside)

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

Some people put their OH monitored Car there. ;)

mstroeve commented 3 years ago

Third Floor would be needed in my OpenHAB Setup.

bobadair commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago
  • 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 commented 3 years ago

@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 commented 3 years ago

Ok, no problem.

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

lolodomo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

First message updated with all proposals.

lolodomo commented 3 years ago

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 commented 3 years ago

Looks good. Just one suggestion.

Corridor: Hallway, Entry ?

Change to:

Corridor: Hallway Entry: Foyer

lolodomo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Add Hallway as a synonym of Corridor

Add a new location Entry.

Add Foyer as a synonym of Entry.

Ok, changed.

TBail commented 3 years ago

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 commented 3 years ago

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

In this case, without the help of synonyms for the user, we will have to extend more the equipments to be clearer for the user.

lolodomo commented 3 years ago

As a new Property we should add Time or TimeStamp

Oh yes, I forget this one while I saw it was missing. Is it ok to add Time as property with Timestamp as synonym ?

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

This is my understanding.

TBail commented 3 years ago

If synonym are only for habbot we should focuus on the tags, because that is what the user see in the semantic modell in mainUI

Currently i am creating an Excel to collect all stuff. Will post the first version as soon as it is ready

lolodomo commented 3 years ago

I propose to first create a PR to extend rooms.

TBail commented 3 years ago

We should do that after we have collected a sigificant amount of changes.

lolodomo commented 3 years ago

As everyone has a television and a washing machine, I propose to add them as equipment:

lolodomo commented 3 years ago

Currently i am creating an Excel to collect all stuff. Will post the first version as soon as it is ready

This is managed in my first message. I updated it to show the advancenent of what is done or still to be done. I will mention the PR for each entry change too.

lolodomo commented 3 years ago

Adding a new entry is not so easy as it requires to define the texts in several languages. I will have to use Google traduction for the languages I don't speak. So I think it is better to create several small PR rather than waiting that everything is complete and provide a big PR.

mhilbush commented 3 years ago

Washing Machine (parent=WhiteGood)

If we're adding washing machine, do we also want to add other major appliances that can be controlled and/or monitored?

For example:

bwosborne2 commented 3 years ago
  • Microwave

That is a small appliance, not a White Good., isn't it? That could open up a whole new complex list such as coffee maker, air fryer, toaster ad infinitum.

mhilbush commented 3 years ago

Yeah, true. I cast the net pretty wide, and expected it to be trimmed down. 😉

TBail commented 3 years ago

Ok guys here are some of my thoughts. Many could be treated as synonym, but jutst to have them on the list. I try to look from a plain user perspective.

Equpiment

Location

Thats it for the moment. Currently i am putting the locations into a hierarchical map.

rkoshak commented 3 years ago

Is it ok to add Time as property with Timestamp as synonym ?

They might be different though. I'd label a Number:Time Item which represents a duration using Time and a DateTime Item with Timestamp.

I am not sure about indoor, i would delete it

I think it makes sense. For example, I have two properties (one is a remotely mirrored OH instance). One property has both an indoor and an outdoor (garden, exterior lighting, etc). That made a nice separation between the two spaces.

lolodomo commented 3 years ago
* Cellar

In the current ontology, cellar is already set as a synonym of basement. Is it really necessary to distinguish them ?

TBail commented 3 years ago
* Cellar

In the current ontology, cellar is already set as a synonym of basement. Is it really necessary to distinguish them ?

Cellar is not meant as a floor like i understand Basement. My basement consits of a storage cellar, workshop Laundry, Boiler room Ante Cellar

TBail commented 3 years ago

So this is the current equipment tree with hierarchical structure to reflect the parent child structure.

Equipment

Hope i did not forget something

lolodomo commented 3 years ago

Cellar is not meant as a floor like i understand Basement. My basement consits of a storage cellar, workshop Laundry, Boiler room Ante Cellar

Ok to separate Basement and Cellar.

bwosborne2 commented 3 years ago

Microwave is a small appliance, not white good. No computer or networking?

mhilbush commented 3 years ago

How about adding Sump Pump?

rkoshak commented 3 years ago

No computer or networking?

There currently is a "Network Appliance" equipment type in the model.

Hope i did not forget something

I know it's separate in the blocks model, but I never understood why MotionDetector isn't a sensor. Same for Smoke/CO Detector.

What's the difference between a stove and an oven in this context and if they are kept separate (instead of using a synonym) shouldn't stove be under WhiteGoods next to oven?

Are there any Items that actually represent the digital assistants in OH?

I know a lot of people use OH to monitor their 3D Printers.

I always found it odd that there is a radiator and HVAC equipment but the "parts" of them are not represented in the model. For example, were I to model my HVAC system I'd have subequipment to represent the heater, air conditional, fan, and humidifier. These are also often independent pieces of equipment themselves.

Why create all these separate sensors when we have Points? Points seem to be missing from this entire conversation in fact. For example, instead of adding a Temperature Sensor use equipment "Sensor" and add "Temperature" as the Point? I thought that was how it was supposed to be done. The equipment tells us what it is and the Points define the individual sensors and given that I wonder if a lot of the new Equipments listed above would not better be represented by Points. For example, I'd model (and have) a DIY sensor bundle I make and deploy around the house as Group tagged with Sensor and then the members represent each of the sensors on the device with the appropriate Point tag (Measurement Temperature, Measurement Humidity, LowBattery Energy (for battery level), Status Power (for online/offline status which feels awkward, maybe we could add an Online Point?)). I would expect the Meter to be modeled as Meter Equipment with a Measurement Water Point instead of having a separate WaterMeter equipment which will still need a Measurement Water Point.

The original model was never consistent on this either. Why is there a SmokeDetector instead of a "Sensor with an Alarm Smoke"? You could then turn it into a combo detector by just adding "Alarm CO" Item to the equipment. I fear that if we go down the path of adding a lot of the proposed new equipment rather than encouraging constructing equipment using Points we will further muddy the model and actually make it harder to use. I also don't know what impact that will have to those parts of the system that actually use the model.

bwosborne2 commented 3 years ago

What's the difference between a stove and an oven in this context

We have a Wood Stove, an Oven and an electric Cooktop. Some people have a range that combines a Cooktop & Oven.