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

Check existing semantic tags defined on channel types #12262

Open
32 of 36 tasks
lolodomo opened this issue Feb 12, 2022 · 27 comments · Fixed by #12270, #12268, #12274, #12271 or #12269
Open
32 of 36 tasks

Check existing semantic tags defined on channel types #12262

lolodomo opened this issue Feb 12, 2022 · 27 comments · Fixed by #12270, #12268, #12274, #12271 or #12269
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Feb 12, 2022

The guidelines about semantic tags are not yet really clear.
We found the following temporary agreement with @kaikreuzer to start adding semantic tags. Here are the current guidelines. Kai, please correct me if something is wrong or not enough clear:

  1. Semantic tags should be added to a channel type only when the assignment is absolutely obvious. For example, the tags "Measurement" + "Temperature" should not be set on a channel type used for forecasted temperature as forecast is not a measurement.
  2. It is not allowed to set only "Control" or "Switch" tag on a writable channel type. Also not expected to set "Status" tag on all read-only channel types.
  3. No property tag is expected with the "Status" point tag; a property tag is generally expected with a "Control" or "Measurement" point tag. As an example, Status + Temperature is not expected.

Now here are all the bindings which defined semantic tags on static channel types. We have to check if they respect the rules defined above:

And here are all the bindings using withDefaultTags (channel) and/or withTags / withTag (channel type) that should be checked:

We can discuss in this topic each time we find a tag which does not match the rules.

@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label Feb 12, 2022
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
Related to openhab#12262

Signed-off-by: Laurent Garnier <[email protected]>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
Related to openhab#12262

Signed-off-by: Laurent Garnier <[email protected]>
@lolodomo
Copy link
Contributor Author

lolodomo commented Feb 12, 2022

@kaikreuzer / I believe we should moderate the fourth rule because for old bindings you have sometimes Number channels without any dimension but the semantic tags "Measurement" + "something" make sense (I guess the binding was created before UoM was introduced in openHAB core, or maybe the developer decided to not use UoM).
And another case is the UV index, it is generally a simple Number channel but it make sense to tag it with "Measurement" + "Ultraviolet", like it is done in the openweathermap binding.

@lolodomo
Copy link
Contributor Author

lolodomo commented Feb 12, 2022

For the sonyprojector binding, I defined the channel type "powerstate" (Current detailed power state of the projector). I tagged the channel type with "Status" + "Power". It does not respect the third rule. @kaikreuzer : should I switch to "Measurement" + "Power" ? Or maybe only "Status" ?

@lolodomo
Copy link
Contributor Author

lolodomo commented Feb 12, 2022

@kaikreuzer : for the sagercaster binding, we have 2 cases to discuss:

  1. the channel "is-raining": this is an ON/OFF information. It was tagged with "Status" + "Rain". Should we remove all the tags ? If not, what tags should we use ?
  2. the channel "timestamp" (Timestamp of the last weather forecast update): this is another interesting case as we could find it in many bindings. It was tagged with "Status" + "Timestamp". Should we remove all the tags ? If not, what tags should we use ?

@clinioque as author of the binding

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
Related to openhab#12262

Signed-off-by: Laurent Garnier <[email protected]>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Feb 12, 2022
Related to openhab#12262

Signed-off-by: Laurent Garnier <[email protected]>
@wborn
Copy link
Member

wborn commented Feb 12, 2022

You could add some SAT checks so it is easier to check and enforce the logic on tags. 😉

@jlaur
Copy link
Contributor

jlaur commented Feb 12, 2022

@lolodomo - addressing the danfossairunit system channel type comment: #12277

jlaur pushed a commit that referenced this issue Feb 12, 2022
Related to #12262

Signed-off-by: Laurent Garnier <[email protected]>
@jlaur jlaur linked a pull request Feb 12, 2022 that will close this issue
jlaur pushed a commit that referenced this issue Feb 12, 2022
Related to #12262

Signed-off-by: Laurent Garnier <[email protected]>
@jlaur jlaur linked a pull request Feb 12, 2022 that will close this issue
@kaikreuzer
Copy link
Member

Kai, please correct me if something is wrong or not enough clear

Thanks @lolodomo for your efforts here, the summary above sounds good to me.
Just FWIW: I am not the one to ultimately decide here, so these guidelines were just a suggestion on how to proceed for now, as they are probably the least controversial. Anyhow, everyone should feel free to challenge and suggest changes. But in order to move forward, let's go with this unless anyone complains!

I'll try to look into and answer your questions later today...

@lolodomo
Copy link
Contributor Author

I am not the one to ultimately decide here, so these guidelines were just a suggestion on how to proceed for now

Yes, of course. And that is clear for me that is the current and temporary proposed guidelines, not the final ones.

wborn pushed a commit that referenced this issue Feb 13, 2022
Related to #12262

Signed-off-by: Laurent Garnier <[email protected]>
wborn pushed a commit that referenced this issue Feb 13, 2022
wborn pushed a commit that referenced this issue Feb 13, 2022
@jlaur
Copy link
Contributor

jlaur commented Jan 6, 2023

Just openend an issue so that it may be added to the developer docs.

Or maybe even user docs? After all, deriving consistent default tags should have user impact, otherwise there would be no point. So if we could explain the rules in relation to the end result, this might be worth doing.

@lsiepel
Copy link
Contributor

lsiepel commented Feb 4, 2023

To add a questions to the 'rules' discussion i want to point to #14160

Some tags where added (Setpoint + Temperature) to the "Intended Boiler Temperature" channel. While this channel is read-only, it does hold the setpoint for that temperature. It is not writable from openHAB, but it is controlled by the device.

So how would this channel be tagged? If Setpoint+Temperature is wrong, then should the rules be adapted to never ever allow control + read-only?

I hardly see any bindings with default tags, and that might be because these rules are not clear yet. I really think the out-of-the-box experience could be improved by adding as much as tags as possible (offcourse only by rules and that make sense). I'm willing to spend a lot of time on many bindings to add those tags, but only if we cvan come up with some more rules / guidance.

psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
* [deconz] Cleanup semantic tags

Related to openhab#12262

Signed-off-by: Laurent Garnier <[email protected]>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
@openhab-bot
Copy link
Collaborator

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

https://community.openhab.org/t/setting-semantic-class-from-binding/146975/4

@openhab-bot
Copy link
Collaborator

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

https://community.openhab.org/t/openhab-5-semantic-model-proposal/162526/88

@jimtng
Copy link
Contributor

jimtng commented Feb 22, 2025

2. It is not allowed to set only "Control" or "Switch" tag on a writable channel type

How should I set the tags for an airconditioner mode channel? Control + Something but I can't find a suitable property.

Ditto for:

  • TV Channel (To change the channel)
  • TV Application (launcher)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment