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

[question] How to describe observeOnly properties? #810

Closed
egekorkan opened this issue Sep 6, 2019 · 4 comments
Closed

[question] How to describe observeOnly properties? #810

egekorkan opened this issue Sep 6, 2019 · 4 comments
Labels
Propose closing Problem will be closed shortly if there is no veto.

Comments

@egekorkan
Copy link
Contributor

In the current specification, we cannot describe if a property is only observable and not readable and writeable. In the case of MQTT, if one publishes a message without a retain flag or if the broker doesn't support retain, only the current subscribers of the topic will get the message, hence they will be observing. A readproperty via MQTT would be possible only if the retain flag is settable to true. I think this is a real use case for MQTT Things. Some solutions:

  • Saying that this is an event (needs no spec change)
  • A new observeOnly for properties. This would be quite confusing since readOnly or writeOnly equal to false would mean that it is observable as well. This needs spec change and would be possible only for next version. Even then, it is not a perfect solution since it makes it impossible to have readable and writeable but not observable properties.
  • Bringing back writeable, readable. This would be perfect solution to fix this little thing but would open all the issues of having writeable discussed in writable vs. readOnly #209
@zolkis
Copy link

zolkis commented Sep 6, 2019

In that case modeling with an event makes most sense IMHO. One could argue about the difference between observing (changes reported) and events (all occurences reported), but in this case the meaning is to report all changes, which is fine.

observeOnly brings in too much complexity vs other protocols, like OCF/CoAP where we can't observe a property if not readable.

The [observable, readable, writeable] tuple was a pretty good solution IMHO, we changed it for mostly syntactic and tradition-esthetic reasons.

@sebastiankb
Copy link
Contributor

sebastiankb commented Sep 12, 2019

This is actually something what I expect in a TD design for MQTT binding:

  • properties have to be observable AND readable since the broker supports the retain flag and the MQTT Client defines flag= true
  • actions only supports inputs and can be only applied for publishing
  • events supports observation only. This should be always used when the broker does not supports the retain flag feature or the MQTT client defines retain flag= false

@egekorkan
Copy link
Contributor Author

In this case, this will be explained in the protocol bindings document. I am copying this issue over there as well.

@sebastiankb sebastiankb added the Propose closing Problem will be closed shortly if there is no veto. label Sep 13, 2019
@egekorkan
Copy link
Contributor Author

Closing since it is at protocol bindings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Propose closing Problem will be closed shortly if there is no veto.
Projects
None yet
Development

No branches or pull requests

3 participants