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
count 42
DEBUG - 2024-05-02T20:29:03:171 - spectrometer/ocean-optics/USB2000-plus - starting measurement count 43
DEBUG - 2024-05-02T20:29:03:172 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:03:173 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:03:174 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:03:175 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:03:175 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:03:176 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:182 - spectrometer/ocean-optics/USB2000-plus - measurement taken at 02.05.2024 20:29:04.182 - measurement count 43
DEBUG - 2024-05-02T20:29:04:184 - spectrometer/ocean-optics/USB2000-plus - starting measurement count 44
DEBUG - 2024-05-02T20:29:04:185 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:186 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:187 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:188 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:188 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:04:189 - HTTPServer|0.0.0.0:8083 - new data sent - intensity-measurement-event
DEBUG - 2024-05-02T20:29:05:196 - spectrometer/ocean-optics/USB2000-plus - measurement taken at 02.05.2024 20:29:05.196 - measurement count 44
The event is being sent, but there are 6 of them (each line claiming "new data sent" is a single event of same type). Also, I am not able to invoke further actions.
When adding the subprotocol field, the issue is solved. However, due to absence of schema the event value is undefined.
(#1280)
The TD document also says subprotocol is optional, may I know what is the default value?
The text was updated successfully, but these errors were encountered:
By default, http-binding assumes any "event-like" affordance to be implemented with a long polling protocol. I bet that's the reason why you were seeing such weird behavior with multiple subscriptions ( the client continuously creates a GET request against the endpoint). To be honest I'm not sure how to properly solve this behaviour. What about adding a warning message? Something like: No subprotocol found defaulting to longpoll.
Personally I would say that if there is more than one form of subprotocol possible with the same http method and URL, then subprotocol field can be made mandatory.
But of course, the warning would solve the issue of "unexpectedness"/unknown behaviour which makes the user dig deep into docs.
I use events primarily with HTTP SSE.
When I generate the TD without the subprotocol option within the event affordance, the node-wot client subscribes to the event multiple times.
The event afffordance (faulty) schema is as follows:
The validator does not complain. When the client tries to subscribe to the event:
This somehow leads to 6 event subscriptions to the server side. I get the following output:
From server side:
The event is being sent, but there are 6 of them (each line claiming "new data sent" is a single event of same type). Also, I am not able to invoke further actions.
When adding the subprotocol field, the issue is solved. However, due to absence of schema the event value is undefined.
(#1280)
The TD document also says subprotocol is optional, may I know what is the default value?
The text was updated successfully, but these errors were encountered: