openhab / openhab-docs

This repository contains the documentation for openHAB.
https://www.openhab.org/docs/
Other
272 stars 688 forks source link

Semantic model list of all available tags #1988

Open lsiepel opened 1 year ago

lsiepel commented 1 year ago

Semantic tags are an important part of OH-3 and i have read somewhere that every binding should add a default tag to obvious channel/tag matches. When trying to read about it i had trouble to find a list of possible tags. When an user decides to use textual config and a default tag is not supplied, how would he know the possible tag options?

The page at https://www.openhab.org/docs/tutorial/model.html#semantic-model describes it perfectly fine, but does not supply a list of possible options. Maybe it would be useful to add a link to: https://github.com/openhab/openhab-core/blob/main/bundles/org.openhab.core.semantics/model/SemanticTags.csv

On the developer’s page (https://www.openhab.org/docs/developer/bindings/thing-xml.html#default-tags) there are two links to https://www.openhab.org/javadoc/latest/org/openhab/core/semantics/model/property/package-summary.html and https://www.openhab.org/javadoc/latest/org/openhab/core/semantics/model/point/package-summary.html

Personally, i find the earlier linked CSV page much easier to use as lookup table when developing a binding. Maybe it would be an option to add this link to the dev docs too.

stefan-hoehn commented 1 year ago

I think the main reason the package-summaries are linked because they are the "real truth" while there is chance that csv might not be up-to-date but I do I agree that the csv link is much easier to read. I wouldn't even mind to add both links to the docs.

Btw, I would even recommend to add an example to https://www.openhab.org/docs/developer/bindings/thing-xml.html#default-tags (I have to admit that I, too, wasn't aware of the fact and my binding doesn't have it either, so I searched for an example in the repo - btw, it surprises me that a very low number of bundles actually defines them)

@Confectrician What do you think?

Confectrician commented 1 year ago

This is already on my todo list

https://community.openhab.org/t/how-to-fill-the-knowledge-gaps-that-arise-when-reading-the-documentation/141831/11?u=confectrician