openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

Discussion on ontology improvement

Open lolodomo opened this issue 4 years ago • 181 comments

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:

  • [x] Apartment (parent=Indoor) PR #1814
  • [x] House (parent=Building) PR #1814
  • [x] Shed (parent=Building) PR #1814
  • [x] SummerHouse (parent=Building) PR #1814
  • [x] Second Floor (parent=Floor) PR #1814
  • [x] Third Floor (parent=Floor) PR #1814
  • [x] BoilerRoom (parent=Room) PR #1814
  • [x] Cellar (parent=Room) PR #1814
  • [x] Dining Room (parent=Room) PR #1814
  • [x] Entry (parent=Room, synonym=Foyer) PR #1814
  • [x] Family Room (parent=Room) PR #1814
  • [x] Guestroom (parent=Room) PR #1814
  • [x] Laundry Room (parent=Room) PR #1814
  • [x] Office (parent=Room) PR #1814
  • [x] Veranda (parent=Room) PR #1814
  • [x] Driveway (parent=Outside) PR #1814
  • [x] Patio (parent=Outside) PR #1814
  • [x] Porch (parent=Outside) PR #1814
  • [ ] Property ???
  • [ ] GuestToilet
  • [ ] Storage
  • [ ] Workshop
  • [ ] Passageroom
  • [ ] Pool

New location synonyms:

  • [x] Corridor: Hallway PR #1814
  • [x] Bath Room: Powder Room PR #1814

New equiipment entries:

  • [x] Alarm System PR #1814
  • [x] Boiler PR #1814
  • [x] Doorbell PR #1814
  • [x] Fan PR #1814
  • [x] Ceiling Fan (parent=Fan) PR #1814
  • [x] KitchenHood (parent=Fan) PR #1814
  • [x] Pump PR #1814
  • [x] Sensor PR #1814
  • [x] Television (parent=Screen, synonym=TV) PR #1814
  • [x] VoiceAssistant PR #1814
  • [x] WeatherService (parent=WebService) PR #1814
  • [x] Dishwasher (parent=WhiteGood) PR #1814
  • [x] Dryer (parent=WhiteGood) PR #1814
  • [x] Freezer (parent=WhiteGood) PR #1814
  • [x] Oven (parent=WhiteGood) PR #1814
  • [x] Refrigerator (parent=WhiteGood) PR #1814
  • [x] WashingMachine (parent=WhiteGood) PR #1814
  • [ ] Microwave (parent=???)
  • [ ] Fountain
  • [x] Lightstripe (Parent=Lightbulb) PR #1814
  • [ ] Meter - already covered by Sensor ?
  • [ ] ElectrcityMeter (Parent=Meter) - already covered by Sensor ?
  • [ ] WaterMeter (Parent=Meter) - already covered by Sensor ?
  • [ ] NaturalGasMeter (Parent=Meter) - already covered by Sensor ?
  • [ ] Stove
  • [x] BackDoor (parent=Door) PR #1814
  • [x] CellarDoor (parent=Door) PR #1814
  • [x] InnerDoor (parent=Door) PR #1814
  • [x] SideDoor (parent=Door) PR #1814
  • [x] Gate (parent=Door) PR #1814
  • [x] Smartphone PR #1814

New property entries:

  • [x] Duration PR #1814
  • [x] Illuminance PR #1814
  • [x] Level PR #1814
  • [x] Opening PR #1814
  • [x] Timestamp PR #1814
  • [x] Ultraviolet PR #1814
  • [x] Vibration PR #1814

Properties removed:

  • [x] Illuminance PR #1879

lolodomo avatar Nov 03 '20 08:11 lolodomo

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 avatar Nov 03 '20 08:11 lolodomo

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.

lolodomo avatar Nov 03 '20 11:11 lolodomo

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

mhilbush avatar Nov 03 '20 13:11 mhilbush

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 avatar Nov 03 '20 14:11 lolodomo

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 avatar Nov 03 '20 18:11 lolodomo

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

lolodomo avatar Nov 03 '20 18:11 lolodomo

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

mhilbush avatar Nov 03 '20 18:11 mhilbush

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 avatar Nov 03 '20 18:11 lolodomo

  • 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 avatar Nov 03 '20 18:11 lolodomo

For TV, maybe Screen is intented ?

lolodomo avatar Nov 03 '20 20:11 lolodomo

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.

TBail avatar Nov 03 '20 20:11 TBail

  • Driveway (parent=Outside)

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

Some people put their OH monitored Car there. ;)

bwosborne2 avatar Nov 03 '20 20:11 bwosborne2

Third Floor would be needed in my OpenHAB Setup.

mstroeve avatar Nov 03 '20 21:11 mstroeve

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.

bobadair avatar Nov 03 '20 22:11 bobadair

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?

lolodomo avatar Nov 03 '20 22:11 lolodomo

  • 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.

bwosborne2 avatar Nov 03 '20 22:11 bwosborne2

@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.

lolodomo avatar Nov 03 '20 22:11 lolodomo

Ok, no problem.

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

mhilbush avatar Nov 03 '20 22:11 mhilbush

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.

lolodomo avatar Nov 03 '20 23:11 lolodomo

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.

mhilbush avatar Nov 03 '20 23:11 mhilbush

First message updated with all proposals.

lolodomo avatar Nov 03 '20 23:11 lolodomo

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.

lolodomo avatar Nov 03 '20 23:11 lolodomo

Looks good. Just one suggestion.

Corridor: Hallway, Entry ?

Change to:

Corridor: Hallway Entry: Foyer

mhilbush avatar Nov 03 '20 23:11 mhilbush

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 avatar Nov 03 '20 23:11 lolodomo

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" ?

lolodomo avatar Nov 04 '20 00:11 lolodomo

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.

mhilbush avatar Nov 04 '20 00:11 mhilbush

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.

ghys avatar Nov 04 '20 07:11 ghys

Add Hallway as a synonym of Corridor

Add a new location Entry.

Add Foyer as a synonym of Entry.

Ok, changed.

lolodomo avatar Nov 04 '20 07:11 lolodomo

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?

TBail avatar Nov 04 '20 07:11 TBail

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 avatar Nov 04 '20 07:11 lolodomo