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

Mqtt observable property is not exposed #980

Open
hasanheroglu opened this issue May 8, 2023 · 4 comments
Open

Mqtt observable property is not exposed #980

hasanheroglu opened this issue May 8, 2023 · 4 comments
Assignees
Labels
binding-mqtt Issues related to mqtt protocol binding bug Something isn't working

Comments

@hasanheroglu
Copy link
Contributor

https://github.com/eclipse/thingweb.node-wot/blob/09dfd6ab03805b7b39ab39433880496466d25e67/packages/binding-mqtt/src/mqtt-broker-server.ts#L123-L149

In case property has observable: true and writeOnly: true fields form for observable not exposed. Additionally, if readOnly: true at the same time, no forms would be exposed.

It could be better to have the code like this:

if (property.observable) {
    // observable form expose logic
}
if (property.writeOnly) {
    // writeOnly form expose logic
}

And I think, we can skip totally readOnly since readproperty is not used with mqtt.

@relu91 relu91 added bug Something isn't working binding-mqtt Issues related to mqtt protocol binding labels May 16, 2023
@hasanheroglu
Copy link
Contributor Author

@egekorkan Should we remove the read logic here?

@egekorkan
Copy link
Member

@hasanheroglu there should be no form with readproperty exposed. There is a spec-level issue for reading as explained at #1241 (comment)

@relu91
Copy link
Member

relu91 commented Jul 23, 2024

Wait can't we support read operations only if we have the retain flag to true? not wonderful but for some brownfield devices might work.

@egekorkan
Copy link
Member

We can deliver the value wished to be read if it is retained for X amount of time or was published within a timeout Y (subscription is sent, Y has passed, read fails). Maybe those can be parameters to be passed in the options where those parameters are specific to node-wot. There can be of course default values for both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding-mqtt Issues related to mqtt protocol binding bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants