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

Remove or add prefix to proprietary members of Thing Descriptions #2832

Open
benfrancis opened this issue May 26, 2021 · 3 comments
Open

Remove or add prefix to proprietary members of Thing Descriptions #2832

benfrancis opened this issue May 26, 2021 · 3 comments
Labels
task w3c-compliance wot-thing-description W3C WoT Thing Description specification
Milestone

Comments

@benfrancis
Copy link
Member

The current Thing Descriptions exposed by the gateway include a number of proprietary members which are not W3C compliant, may of which are used internally by the gateway UI.

Some examples include:

  • floorplanX
  • floorplanY
  • layoutIndex
  • selectedCapability

In order to make these Thing Descriptions W3C compliant I suggest adding a prefix to include these as semantic annotations, e.g.

  • wtg:floorplanX
  • wtg:floorplanY
  • wtg:layoutIndex
  • wtg:selectedCapability

This would also require adding an additional @context at the top of Thing Descriptions to refer to this custom context, e.g.

  "@context": [
    "https://www.w3.org/2019/wot/td/v1",
    {"wt": "https://webthings.io/schemas"},
    ["wtg": "https://webthings.io/gateway"}
  ]

Alternatively it might be possible to keep them as they are without a prefix and with an anonymous context, but this risks name collisions:

  "@context": [
    "https://www.w3.org/2019/wot/td/v1",
    "https://webthings.io/schemas" 
    "https://webthings.io/gateway"
  ]

See also: #2809

I've noticed there are also a bunch of members added for Zigbee devices and I'm not exactly sure why these need to be exposed at the Web Thing API level:

  • profileId
  • endpoint
  • clusterId
  • attr
  • attrId
  • fireAndForget
  • bindNeeded
  • configReportNeeded
  • initialReadNeeded

One exception to this is the current iconHref member, for which there's now a W3C compliant alternative in the latest Thing Description 1.1 draft.

"links": [
  "rel": "icon",
  "sizes": "64x64",
  "/uploads/ibkbpR.svg"
]
@benfrancis
Copy link
Member Author

Another term which is used internally is proxy, e.g. parsed at https://github.com/WebThingsIO/gateway/blob/master/src/models/thing.ts#L155

@benfrancis
Copy link
Member Author

benfrancis commented Dec 6, 2022

Another term used internally is visible, on property affordances. Support for this property was removed in the the latest gateway-addon-node, but it appears some adapter add-ons may rely on it.

@benfrancis benfrancis changed the title Add prefix to proprietary members of Thing Descriptions Remove or add prefix to proprietary members of Thing Descriptions Dec 6, 2022
@benfrancis
Copy link
Member Author

group_id, could become wt:groupId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task w3c-compliance wot-thing-description W3C WoT Thing Description specification
Projects
Status: Product Backlog
Development

No branches or pull requests

1 participant