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

Support the current WebOfThings specification #61

Open
lu-zero opened this issue Jan 31, 2022 · 1 comment · May be fixed by #62
Open

Support the current WebOfThings specification #61

lu-zero opened this issue Jan 31, 2022 · 1 comment · May be fixed by #62

Comments

@lu-zero
Copy link
Contributor

lu-zero commented Jan 31, 2022

At @sifis-home we are experimenting with augmenting the ThingDescription with additional semantic components and we are using webthings-rust (and webthings-arduino) as base.

We'd like to contribute an update to this crate to support the current specification.

Do you have preferences on how to do that?

@benfrancis
Copy link
Member

Hi @lu-zero, great to hear from you and thank you for the offer of contributions.

I'm currently leading a project to make WebThings compliant with W3C WoT standards for version 2.0, including

You can read an overview of the project in WebThingsIO/gateway#2802 and the work on WebThings Gateway is tracked by the w3c-compliance label.

The three high level phases of this project are:

  1. WebThings Gateway producer - Make the Thing Descriptions and API exposed by the gateway W3C compliant
  2. WebThings Gateway consumer - Enable the gateway to consume W3C compliant Things using wot-adapter
  3. WebThings Framework - Make all the libraries (including webthing-rust) W3C compliant

Work has started on all three, but I am currently focused on the first phase. Your contributions to the third phase would be very welcome.

It is important that the W3C specifications are implemented consistently between WebThings Gateway and all the libraries that make up WebThings Framework, so that they are all guaranteed to work together out of the box.

The first thing to note is that it is not possible to be compliant with WoT Thing Description 1.0 without removing features of the current Web Thing API, because not all of the existing features can be described in 1.0. This is why I've been working closely with the WoT Working Group to add features to 1.1 to such as new operation types.

The second thing to note is that in order to guarantee out-of-the-box interoperability we are implementing a standardised HTTP+JSON protocol binding from the Core Profile, which will replace the current Web Thing REST API (the Web Thing WebSocket API is also being standardised under the Web Thing Protocol Community Group). The WoT Profile specification is still in a lot of flux, so implementation is taking time.

In terms of making webthing-rust W3C compliant, some good first steps might be:

  1. Change links to forms (like Change links to forms in API gateway#2806)
  2. Remove object wrappers from API payloads (like Remove object wrappers from API payloads gateway#2807)
  3. Add support for Server-Sent Events (like Add support for Server Sent Events gateway#2830)
  4. Change mediaType to type in links (like Change mediaType to type for links in API gateway#2808)

This will go a long way to making the Thing Descriptions themselves W3C compliant, and make the payloads of basic API calls match what a W3C compliant WoT consumer would expect.

We could then discuss further about tidying up some remaining incompatibilities which we also still have in the gateway, and an approach for implementing the rest of WoT Profile and WoT Discovery to bring everything fully in line.

I'd be happy to set up a call to discuss a co-ordinated plan for W3C compliance, including looping in @tim-hellhake who is the current module owner of webthing-rust.

@lu-zero lu-zero linked a pull request Apr 21, 2022 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants