This document outlines the use cases and requirements for a common sub-protocol for the Web of Things, to enable ad-hoc interoperability between WoT clients and WoT devices. This includes requirements for an HTTP sub-protocol and a WebSocket sub-protocol which define a standard way to monitor and control a connected device over the World Wide Web.
The goal of the Web of Things (WoT) is to define a standard way to communicate with connected devices using the World Wide Web, in order to provide a unifying application layer for the Internet of Things (IoT) and promote ad-hoc interoperability between devices.
The W3C [[WOT-THING-DESCRIPTION]] specification defines the first building block of the Web of Things, by defining an information model and data format for describing the capabilities of a connected device and the interfaces with which to communicate with it.
The Thing Description specification was designed to be protocol-agnostic and flexible enough to describe a broad range of existing devices, rather than specifying a fixed protocol or application programming interface (API) which all devices must implement. The downside of this open ended flexibility is that it makes ad-hoc interoperability on the Web of Things very difficult, because it's nearly impossible to create a single WoT client which is guaranteed to be able to communicate with any WoT device.
The Web Thing Protocol specification will be designed to complement the WoT Thing Description specification by defining a common sub-protocol for the Web of Things, such that any WoT client and WoT device (or "web thing") which follow the specification will be able to communicate with each other.
The Web Thing Protocol specification will define:
This document outlines the use cases and requirements for such a specification, based on existing Web of Things implementations and the collective experience of members of the Web Thing Protocol Community Group.
In addition to the WoT Thing Description specification, the Web Thing Protocol Community Group should aim for the Web Thing Protocol specification to complement other deliverables in progress by the WoT Working Group where possible, including WoT Binding Templates and WoT Profile. It's possible some of the requirements below may be fulfilled by those specifications. The Web Thing Protocol specification itself, or subsections of it, are intended to eventually join a standards track at the W3C or another standards body such as the IETF.
A WoT client is a software agent which monitors and controls a connected device on behalf of a user. This may include but is not limited to mobile applications, desktop applications, voice agents and mixed reality agents.
A WoT device or "web thing" is a virtual representation of a physical device on the web, which acts as a WoT server with which a WoT client can communicate. Examples might include an IP camera, a smart thermostat or an internet-connected robot.
A WoT gateway is hardware and/or software which bridges communications with a connected device from the Web Thing Protocol to another protocol, or acts as a proxy to bridge the Web Thing Protocol from one network to another. A WoT gateway may act as both a WoT client and WoT server (when acting as a proxy), or just as a WoT server (when briding other protocols to the Web of Things).
A WoT gateway may monitor and control WoT devices based on user commands issued via a WoT client, or automatically carry out operations on behalf of users based on changes in state or other criteria. Examples might include a smart home hub, the central computer system of a vehicle, or control software for a smart city.
A WoT directory is a service which provides a list of web things and links to their Thing Descriptions.
A WoT gateway may provide a directory of web things it hosts and may be hosted on-premises with devices (e.g. in the case of bridging a PAN protocol like Zigbee or Bluetooth to the Web of Things) or on a server on separate premises to devices (e.g. in the case of a cloud service bridging another IP-based protocol to the Web of Things).
The HTTP sub-protocol SHOULD define the [[HTTP11]] requests and responses a WoT client and WoT server should use in order to carry out the the set of operations described below, including methods, headers, payloads and expected response codes. Resources SHOULD be identified and located using the http(s)://
URI scheme and serialised in [[JSON]] by default.
The WebSocket sub-protocol SHOULD define the [[WEBSOCKETS-PROTOCOL]] messages that a WoT client and WoT server should use to carry out the following set of operations, including the messages types, payloads, error conditions and how they should be used. Messages SHOULD be serialised in [[JSON]] by default.
ws(s)://
URI scheme and webthing WebSocket sub-protocolThe Web of Things has a range of applications, including where privacy is particularly important such as in the medical and connected home domains. The specification SHOULD document any assumptions, recommendations and potential threats.
The specification will mainly rely on existing web security mechanisms such as TLS, OAuth and JSON Web Tokens. Any assumptions, recommendations and identified potential threats SHOULD be documented.
The specification SHOULD document any considerations for making the Web of Things work for all people, whatever their language, location or abilities.