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

Relationship to Project Connected Home over IP #536

Open
jtc42 opened this issue Sep 9, 2020 · 6 comments
Open

Relationship to Project Connected Home over IP #536

jtc42 opened this issue Sep 9, 2020 · 6 comments

Comments

@jtc42
Copy link

jtc42 commented Sep 9, 2020

Hi,

I’m curious about if Project Connected Home over IP (https://github.com/project-chip/connectedhomeip) acts as a competing or complimentary standard to this W3C spec.

That working group seems to have support from some big players, but I’m really struggling to figure out if or how it might be compatible or complimentary to the W3C Web of Things architecture and description.

Any thoughts on this would be really useful.

Thanks!

@egekorkan
Copy link
Contributor

It is not competing with W3C WoT since CHIP aims to define an application layer that will be deployed on devices. W3C WoT wants to describe such application layers such that they can be used also by other implementations of other application layers :)

@jtc42
Copy link
Author

jtc42 commented Sep 9, 2020

It is not competing with W3C WoT since CHIP aims to define an application layer that will be deployed on devices. W3C WoT wants to describe such application layers such that they can be used also by other implementations of other application layers :)

Okay I think I follow. So in essence one could have a Thing Description for a CHIP device, using some (future) CHIP protocol binding?

I was under the impression that this spec expects Thing Descriptions to be served by the devices themselves, but your reply sounds more like you're expecting TDs to be generated externally and loaded by clients wanting to interface with a CHIP device?

I might be getting confused here though.

@egekorkan
Copy link
Contributor

Okay I think I follow. So in essence one could have a Thing Description for a CHIP device, using some (future) CHIP protocol binding?

Yes ;) You can actually describe any protocol with a TD the protocol has a URI Scheme. Binding Templates document tries to do that https://w3c.github.io/wot-binding-templates/ and the node-wot library has quite some protocols implemented, see here: https://github.com/eclipse/thingweb.node-wot/tree/master/packages

I was under the impression that this spec expects Thing Descriptions to be served by the devices themselves, but your reply sounds more like you're expecting TDs to be generated externally and loaded by clients wanting to interface with a CHIP device?

The spec is intentionally left open regarding that and it is normal that it might sound confusing. It is possible that you get a TD from the device, from a database, from a USB stick or hardcoded as a string in your program.

If the CHIP devices have some sort of a description, that needs to be converted to a TD first before it can be used by WoT conform clients.

@jtc42
Copy link
Author

jtc42 commented Sep 10, 2020

Yes ;) You can actually describe any protocol with a TD the protocol has a URI Scheme. Binding Templates document tries to do that https://w3c.github.io/wot-binding-templates/ and the node-wot library has quite some protocols implemented, see here: https://github.com/eclipse/thingweb.node-wot/tree/master/packages

Great, thanks for the links! I'd come across the WoT binding templates, but the examples in node-wot are really useful

The spec is intentionally left open regarding that and it is normal that it might sound confusing. It is possible that you get a TD from the device, from a database, from a USB stick or hardcoded as a string in your program.

Interesting. Is there advice on how these TDs might work in regard to form URLs and such? A TD should usually include URLs pointing to a specific device in the interaction forms objects, right? If I have an externally generated TD for a particular device class, how does that TD get populated with forms for a specific device instance? Would this be left to the client application?

@egekorkan
Copy link
Contributor

Is there advice on how these TDs might work in regard to form URLs and such?

So for case of CHIP, I do not know how their API work. For any device with IP level communication, you can write a TD. Describing the protocol can be difficult based on the protocol though :/ For example, you can find Philips Hue TDs that are written by others at https://wotify.org/library/Philips%20HUE%20White%20Light/general

A TD does not have to be generated, you can really hard code everything like the link above. We are bringing templating mechanism to the TD, which will allow us to not hard code such device specific stuff :) You can check out the respective issues at the TD repo at https://github.com/w3c/wot-thing-description/issues?q=is%3Aissue+is%3Aopen+label%3A%22Thing+Model%22

However, if you want a solution that works now, I would simply put {{myVariable}} whereever you see an instance specific information. Then you can use a library like handlebars or mustache in a Node.js environment.

@mlagally
Copy link
Contributor

Arch call on Oct 20th: agree to defer to next major release, this is more a use case discussion.
This should be added to next WG charter, does not belong here. Needs to be handled at charter level.
Consider move to use cases, close afterwards here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants