You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ferllings opened this issue
Jan 27, 2024
· 2 comments
Labels
bugError, flaw or fault in the specification that causes misunderstandings and/or incorrect/unexpectedquestionAny generic question and/or commentuse caseDescribes a scenario that may be useful for technical decisions
This algorithm allows for only one active Subscription per Property. If a new Subscription is made while an existing Subscription is active the runtime will throw an NotAllowedError.
And #6 confirms
If thing.[activeObservations][propertyName] [=map/exists], [reject] promise with a [NotAllowedError] and stop.
But in the case of using uriVars, do we consider the subscription is the same, even if the uriVars are different?
Make a request to the underlying platform to observe the [Property] identified by propertyName with form and optional URI templates given in options' uriVariables.
What if we already made a previous request, .../propertyA?v=X
but we want to make a new request for .../propertyA?v=Y
For question, yes with the current approach, you can't have two active subscriptions to the same Event. This means that if you need it you have two options:
you subscribe and then unsubscribe and then subscribe again
You consume the Thing twice and then use the second instance to subscribe with the new URI variables
I know that both options are not ideal, we can work to fix this issue in the future release. To understand better it would be valuable if you provide a short description of the concrete use case you have ( protocol you are using, platform, etc.? ).
@zolkis: it is a bug since a subscription without, or with [different] URIVariables should be considered different subscriptions, made with different requests. So we need to address this in the spec.
relu91
added
bug
Error, flaw or fault in the specification that causes misunderstandings and/or incorrect/unexpected
use case
Describes a scenario that may be useful for technical decisions
labels
Jan 29, 2024
@relu91 Thanks for the clarification
For the context, I'm running my own golang implementation of WoT, for home automation.
It only supports http/ws for now.
I have a (thing) service that provides some dynamic states for my house.
And clients that observe those states, using filters to trigger various automations.
something like /isAtHome?name=me or /isAtHome?name=wife
I'll find a workaround, until this get clarified in the next version
bugError, flaw or fault in the specification that causes misunderstandings and/or incorrect/unexpectedquestionAny generic question and/or commentuse caseDescribes a scenario that may be useful for technical decisions
Hello,
Could someone clarifies something for me?
In the
ObserveProperty
method: https://w3c.github.io/wot-scripting-api/#the-observeproperty-methodBut in the case of using uriVars, do we consider the subscription is the same, even if the uriVars are different?
#8 indicates:
What if we already made a previous request,
.../propertyA?v=X
but we want to make a new request for
.../propertyA?v=Y
And I believe there is a mistake in
subscribeEvent()
https://w3c.github.io/wot-scripting-api/#the-subscribeevent-method#6 says
Thanks for your help?
The text was updated successfully, but these errors were encountered: