Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Thing Description

From Wikipedia, the free encyclopedia
Thing Description
ThingDescription
The logo of the latest version, Thing Description
Filename extension
.jsontd, .td.json, .td.jsonld
Internet media type
application/td+json
Developed byW3C
Initial releaseApril 9, 2020
Type of formatJSON-LD
StandardW3C Web of Things
Open format?Yes
Websitehttps://www.w3.org/TR/wot-thing-description/

TheThing Description (TD) (orW3C WoT Thing Description (TD)) is aroyalty-free, open information model with aJSON based representation format for theInternet of Things (IoT). A TD provides a unified way to describe the capabilities of an IoT device or service with its offered data model and functions, protocol usage, and further metadata. Using Thing Descriptions help reduce the complexity of integrating IoT devices and their capabilities into IoT applications.[1]

The TD originated from theWeb of Things (WoT) initiative of the international standards organization of theW3C which has the intention to increase the interoperability in the IoT.[2] Since April 2020, theThing Description[3] is aW3C recommendation (W3C WoT Thing Description 1.0).

The W3C published the Thing Description 1.1 as a W3C recommendation in December 2023.[4]

Principles

[edit]

The major principle of the Thing Description is to provide a human-readable and machine-interpretable interface description of an IoT device/Thing. In that context, theWoT Thing Description is to the IoT whatindex.html is to a website: it can be considered as the entry point of a physical or virtual Thing/device.[5] Thing Description are not limited to a specific communication protocol, rather it provides a framework called a WoT Binding Template.[6] Such a Protocol Binding defines the mapping from an Interaction Affordance to concrete messages of a specific IoT protocol such asMQTT,HTTP,CoAP,Modbus orOPC UA.

The WoT Thing Description defines 3 kinds of Interaction Affordances, named Property, Action and Event:

Property

[edit]

An Interaction Affordance that exposes state of an IoT device. This state can then be retrieved (read) and optionally updated (write). Devices can also choose to make Properties observable by pushing the new state after a change.

Action

[edit]

An Interaction Affordance that allows to invoke a function of an IoT device, which manipulates state (e.g., toggling a lamp on or off) or triggers a process on the device (e.g., dim a lamp over time).

Event

[edit]

An Interaction Affordance that describes an event source, which asynchronously pushes event data to the subscribers of the event (e.g., overheating alerts).

Components and standard technologies

[edit]
WoT Thing Description components: Context Extension Framework, Security Framework, Things Relation Definitions, WoT Interaction Model (containing Properties, Actions and Evens), Data Model, Binding Templates.
Figure 1. WoT Thing Description components.

In general, the Thing Description is designed to reuse and rely on established Internet and Web standards, this includes:

  • Serialization: The JSON serialization of the TD information model is aligned with the syntax ofJSON-LD 1.1.[7] JSON-LD opens the opportunity of context extension and enrich the Thing Description instances with additional (e.g., domain-specific) semantics such as fromSchema.org. This also supports the extraction and the understanding of relevant information such as in discovery scenarios in IoT applications[8]
  • Security: The Thing Description comes with a framework that allows to provide metadata to follow existing security scheme such asOAuth2 or Digest Access Authentication.[9] Due to the context extension concept of the Thing Description specific security schemes can be imported.
  • Linking: Things may have references to other Things or like to link to further information. For defining such kind of relations the Thing Description relies on the well known Web Linking[10] concept.
  • Interactions: The offered data and/or functions of a Thing are assigned to the corresponding interaction affordance Properties, Actions, and Events.
  • Data Schema: For modeling the Thing's data that can be exchanged, the concept of JSON schema[11] is embedded in the Thing Description.
  • Bindings: The binding templates define the specific protocol and serialization method for the properties, actions, and events of the Thing. As protocol identification and addressing method URI Identifier[12] are used. For announcing the serialization encoding (e.g.,JSON,CBOR,XML,Efficient XML Interchange) of the payload that is specified by the data schema, Media Type[13] assignment is applied in the Thing Description.

Thing Description examples

[edit]
Example of a Thing Description object.

Below is an example TD serialized in JSON-LD format, which has one property, one action and one event. The IoT device represented by this TD uses the HTTP protocol but a TD can represent any protocol with aURI scheme, as shown in the example below.

{"@context":"https://www.w3.org/2022/wot/td/v1.1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions":{"basic_sc":{"scheme":"basic","in":"header"}},"security":["basic_sc"],"properties":{"status":{"type":"string","forms":[{"href":"https://mylamp.example.com/status","htv:methodName":"GET"}]}},"actions":{"toggle":{"forms":[{"href":"https://mylamp.example.com/toggle","htv:methodName":"POST"}]}},"events":{"overheating":{"data":{"type":"string"},"forms":[{"href":"https://mylamp.example.com/oh","htv:methodName":"GET","subprotocol":"longpoll"}]}}}

This TD represents an Internet connected lamp, which could be thought as a simple version of aPhilips Hue lamp.

From this TD example, a client knows that there exists one Property affordance with the titlestatus (lines 10-16). In addition, information is provided in lines 13-14 that this Property is readable with an HTTP GET request to theURIhttps://mylamp.example.com/status, and will return a string-based status value. In a similar manner, an Action affordance is specified to toggle the switch status using the POST method on thehttps://mylamp.example.com/toggle resource. The Event affordance enables a mechanism for asynchronous messages to be sent by a Thing. Here, a subscription to be notified upon a possible overheating event of the lamp can be obtained by using HTTP with its long polling subprotocol onhttps://mylamp.example.com/oh. The use of the GET or POST method is stated explicitly but can be omitted using the default assumptions stated in the TD specification. It can be seen that the HTTP methods are defined using the"htv:methodName" vocabulary terms. This vocabulary terms for HTTP are included in the TD vocabulary that is found in the"@context" value.

This example also specifies thebasic security scheme, requiring a username and password for access. A security scheme is first given a name and its corresponding scheme in thesecurityDefinitions and then activated by specifying that name in asecurity section. In combination with the use of the HTTP this example demonstrates the use ofBasic access authentication.

Below is the same connected lamp but using MQTT protocol and no security.

{"@context":["https://www.w3.org/2022/wot/td/v1.1",{"mqv":"http://www.example.org/mqtt-binding#"}],"id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions":{"nosec_sc":{"scheme":"nosec"}},"security":["nosec_sc"],"properties":{"status":{"type":"string","forms":[{"href":"mqtt://mylamp.example.com/status","mqv:controlPacketValue":"SUBSCRIBE"}]}},"actions":{"toggle":{"forms":[{"href":"mqtt://mylamp.example.com/toggle","mqv:controlPacketValue":"PUBLISH"}]}},"events":{"overheating":{"data":{"type":"string"},"forms":[{"href":"mqtt://mylamp.example.com/oh","mqv:controlPacketValue":"SUBSCRIBE"}]}}}

Differently from the last TD, here the forms include MQTT protocol as specified by the WoT Binding Templates. More specifically, lines 17, 25 and 34 describe what message types should be used to use the affordances. For example, instead ofHTTP GET and longpoll subprotocol to observe the overheating event, a client can subscribe to this event using the MQTT protocol. Furthermore, a WoT device with MQTT protocol can be both a publisher and a subscriber. For the property and event affordances, it would publish the values, whereas for action affordances it would subscribe to the action topics that other MQTT publishers can trigger by publishing to these topics.

Implementations

[edit]

Thing Description editing and validation tools

  • Eclipse edi{TD}or:[14] A tool for simply designing W3C Thing Descriptions and Thing Models
  • TD Playground:[15] Playground for validation of Thing Description instances

Implementations using Thing Description

  • Eclipse node-wot:[16] An implementation of W3C WoT technologies inNode.js
  • WoTify:[17] A library of WoT implementation that support a Thing Description
  • wot-py:[18] An implementation of W3C WoT technologies inPython
  • Node-RED node-gen:[19] Generates nodes based on a Thing Description inNode-RED
  • SANE:[20] An implementation of W3C WoT technologies inJava

See also

[edit]

References

[edit]
  1. ^"Web of Things over IoT and Its Applications".InfoQ. Retrieved2020-12-03.
  2. ^Guess, A. R. (13 April 2020)."Solution for IoT Interoperability – W3C Web of Things".DATAVERSITY - Data Education for Business and IT Professionals. Retrieved2020-04-13.
  3. ^Käbisch, Sebastian; Kamiya, Takuki; McCool, Michael; Charpenay, Victor; Kovatsch, Matthias (2020-04-09)."Web of Things (WoT) Thing Description".www.w3.org. Archived from the original on 2021-10-24. Retrieved2020-04-17.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  4. ^Käbisch, Sebastian; McCool, Michael; Korkan, Ege (2023-12-05)."Web of Things (WoT) Thing Description 1.1".www.w3.org. Archived from the original on 2023-12-07. Retrieved2023-01-19.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  5. ^"Solution for IoT Interoperability - W3C Web of Things (WoT)".W3C. W3C Press. 9 April 2020. Retrieved22 December 2020.
  6. ^Koster, Michael; Korkan, Ege (2019-01-30)."Web of Things (WoT) Binding Templates".www.w3.org. Archived from the original on 2020-04-14. Retrieved2020-04-17.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  7. ^Kellogg, Gregg; Champin, Pierre-Antoine; Longley, Dave (2020-07-16)."JSON-LD Syntax 1.1".
  8. ^Serena, Fernando; Poveda-Villalón, María; García-Castro, Raúl (22 February 2018).Semantic Discovery in the Web of Things. Cham, Switzerland: Springer.doi:10.1007/978-3-319-74433-9_2.ISBN 978-3-319-74433-9.
  9. ^Ed., R. Shekh-Yusef; Ahrens, D.; Bremer, S. (2015). Shekh-Yusef, R. (ed.)."HTTP Digest Access Authentication". IETF.doi:10.17487/RFC7616.S2CID 11159319. Retrieved2020-09-01.{{cite journal}}:Cite journal requires|journal= (help)
  10. ^Nottingham, M. (September 2017)."Web Linking". IETF.doi:10.17487/RFC8288.{{cite journal}}:Cite journal requires|journal= (help)
  11. ^Wright, Austin; Andrews, Henry; Luff, Geraint."JSON Schema Validation: A Vocabulary for Structural Validation of JSON".Ietf Datatracker. IETF.
  12. ^Berners-Lee, T.; Fielding, R.; Masinter, L. (2005)."Uniform Resource Identifier (URI): Generic Syntax". IETF.doi:10.17487/RFC3986.S2CID 30973664.{{cite journal}}:Cite journal requires|journal= (help)
  13. ^Freed, N.; Borenstein, N. (1996)."Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types". IETF.doi:10.17487/RFC2046.{{cite journal}}:Cite journal requires|journal= (help)
  14. ^Eclipse edi{TD}or project, Eclipse Foundation, 2020-12-04
  15. ^Thing Description Playground, 2020-11-14
  16. ^thingweb.node-wot. W3C Web of Things implementation on NodeJS., Eclipse Foundation, 2019-11-14, retrieved2019-11-17
  17. ^Korkan, Ege; Hassine, Hassib Belhaj; Schlott, Verena Eileen; Käbisch, Sebastian; Steinhorst, Sebastian (2019-09-07). "WoTify: A platform to bring Web of Things to your devices".arXiv:1909.03296 [cs.DC].
  18. ^Mangas, Andrés García (2020-01-08),Experimental implementation of a W3C Web of Things runtime: agmangas/wot-py, retrieved2020-01-15
  19. ^Toumura, Kunihiko (2019-05-21),GitHub - k-toumura/node-red-nodegen, retrieved2020-01-15
  20. ^"Java-Implementation für das Web of Things veröffentlicht".sane.city. Retrieved2020-01-28.
Products,
standards
Recommendations
Notes
Working drafts
Guidelines
Initiative
Deprecated
Obsoleted
Groups,
organizations
Elected
Working
Community, business
Closed
Software
Browsers
Conferences
Retrieved from "https://en.wikipedia.org/w/index.php?title=Thing_Description&oldid=1314387720"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp