-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add directory of things #13
Comments
Note that a Web of Things gateway like WebThings Gateway should be exposed as a WoT Directory, with a Thing Description describing the capabilities of the gateway and providing its list of things as a property. Gateways would therefore be added to the app as a directory. If we want to be backwards compatible with WebThings Gateway 1.x we'll need to figure out how to do this without a Thing Description, perhaps by using the /things endpoint directly since there's no machine-readable JSON resource currently served at the root of a gateway's domain. |
Some initial ideas for the UI to add a directory/gateway:
Open questions:
|
Did we start discovering ThingsDirectory or we just add it provding the url and login(for a gateway) |
One of the challenges of adding a ThingDirectory (gateway) as opposed to individual Things (devices) is that in the Web Thing API there is currently no resource which represents the directory/gateway itself. This will be solved in 2.x by WebThingsIO/gateway#2927, which is part of implementing the WoT Discovery specification. Maybe we could solve that earlier by adding a simpler non-standard Thing Description for the gateway in 1.1. Another challenge (which also applies to adding individual Things) is how to handle authentication/authorisation when adding a directory which requires authentication. This is something we're working on solving for the WoT Discovery specification in w3c/wot-discovery#135. The way that will probably work is that an initial HTTP Currently none of this is possible because with WebThings Gateway 1.0 if you send a Until we add a Thing Description for the gateway (which is a much better approach because it can provide additional metadata about the gateway such as its name), the only way I can think of making this work in the app is to fetch the Things resource of the gateway instead. If you send a GET request to You also need to solve the authentication problem, and the only way you can really work around that is to manually enter a JSON Web Token into an additional field in the form when adding a directory to the app. I'd really rather not implement that if we can avoid it because it would be very difficult to use. All of this should be much easier with WebThings Gateway 2.x... |
What i suggest, is create the ThingsDirectory (gateway) library and handling it only as a gateway, when we will be ready to change this to gateway v2.0(or maybe having both) we can then edit this library only to make it compatible |
As a user I want to add a directory of web things my list of things so that I don't have to manually add each thing in turn.
Implementation of https://w3c.github.io/wot-discovery/#exploration-directory
The text was updated successfully, but these errors were encountered: