SlideShare a Scribd company logo
Web of Things
The way towards interoperability with NGSI-LD
José Manuel Cantera Fonseca – FIWARE Foundation
May 2019 – FIWARE Summit Genoa
1
WoT Introduction (I)
• The W3C Web of Things (WoT) has been created to enable
interoperability across IoT Platforms and application domains.
• WoT provides mechanisms to formally describe IoT
interfaces:
• allowing IoT devices and services to communicate with each other
• independent of the underlying implementation
• across multiple networking protocols
2
WoT Interaction Model
• WoT applications use three types of Interaction Affordances:
• Properties
• Expose internal state of the Thing that can be directly accessed (read) and
optionally manipulated (write) or watched (observe) i.e. pull and push
communication styles.
• Actions
• allow to invoke a function or service exposed by the Thing or to trigger a process
• Events
• Thing-initiated notifications, discrete events, or streams of values sent
asynchronously to the receiver. Push communication style.
3
WoT Building Blocks
• Thing Description (TD): it describes the network-facing
interface of a Thing. Each WoT Device MUST have a
corresponding TD. Normative
• Binding Templates can be used to describe multiple protocol
bindings, so that a Thing can communicate with different IoT
Platforms. Non-normative.
• Scripting API enables implementation of the application logic
of a Thing using a standardized contract for JavaScript. Non-
normative
• Status: Thing Description is expected to be a W3C
Recommendation in Q2 2019
• Note: This presentation is based on latest Editor’s Draft WoT
specifications.
• (Non substantial) changes may happen
Source: W3C
4
W3C WoT Architectural elements & patterns
Source: W3C
Servient as a Thing
Servient as a Intermediary
• A Servient is a software stack that implements the WoT building blocks.
• Servients can host and expose Things and/or consume Things (i.e., host Consumers)
• Depending on the Protocol Binding, Servients can perform in both server and client role
5
WoT Thing Description (WoT TD)
• It defines an information model based on a semantic vocabulary and a
serialized representation based on JSON. (but also allows JSON-LD
processing).
• The index.html for Things, human-readable and machine-understandable
metadata:
• Thing instances general metadata such as name, ID, descriptions
• Web Links to related Things or other documents.
• Interaction Affordance metadata (properties, actions, events)
• Public Security Configuration metadata
• Schemata of the information exchanged with the Thing (using JSON Schema).
• TD can be hosted locally by a Thing or externally (ex. by a Thing Catalogue)
6
Thing Description (TD) Information Model
source: W3C
7
TD Example (I). (HTTPs)
source: W3C
{
"id": "urn:dev:wot:com:example:servient:lamp",
"@type": "Thing",
"name": "MyLampThing",
"securityDefinitions": {
"basic_sc": {"scheme": "basic", "in":"header"}
},
"security": ["basic_sc"],
"properties": {
"status" : {
"type": "string",
"forms": [{"href": "https://mylamp.example.com/status"}]
}
},
"actions": {
"toggle" : {
"forms": [{"href": "https://mylamp.example.com/toggle"}]
}
},
"events":{
"overheating":{
"data": {"type": "string"},
"forms": [{
"href": "https://mylamp.example.com/oh",
"subprotocol": "longpoll"
}]
}
},
"@context": "https://www.w3.org/2019/wot/td/v1"
}
source: W3C
8
TD Example (II) (MQTT)
source: W3C
{
"id": "urn:dev:ops:32473-WoTLightSensor-1234",
"@type": "Thing",
"name": "MyLightSensor",
"securityDefinitions": {
"nosec_sc": {
"scheme": "nosec"
}
},
"security": [
"nosec_sc"
],
"events": {
"luminosityValue": {
"data": {
"type": "integer"
},
"forms": [
{
"href": "mqtt://192.168.1.187:1883/lightSensor",
"contentType": "text/plain"
}
]
}
},
"@context": "https://www.w3.org/2019/wot/td/v1"
}
source: W3C
9
TD with SAREF semantic annotations
source: W3C
{
"id": "urn:dev:wot:com:example:servient:lamp",
"name": "MyLampThing",
"@type": "saref:LightingDevice",
"securityDefinitions": {"basic_sc": {
"scheme": "basic",
"in": "header"
}},
"security": ["basic_sc"],
"properties": {
"status": {
"@type": "saref:OnOffState",
"type": "string",
"forms": [{
"href": "https://mylamp.example.com/status"
}]
}
},
"actions": {
"toggle": {
"@type": "saref:ToggleCommand",
"forms": [{
"href": "https://mylamp.example.com/toggle"
}]
}
},
"events": {
"overheating": {
"@type": "saref:NotifyCommand",
"data": {"type": "string"},
"forms": [{
"href": "https://mylamp.example.com/oh"
}]
}
},
"@context": [
"https://www.w3.org/2019/wot/td/v1",
{
"saref": "https://w3id.org/saref#"
}
]
}
SAREF can be used to
annotate TDs
source: W3C
10
WoT  NGSI-LD Interworking (IoW) principles
 Overall Architecture:
 NGSI-LD : Information Management Layer
 WoT : IoT Service Layer
 Proposed Interworking mechanism. An “NGSI-LD-WoT Intermediary” to play a dual role:
 NGSI-LD Context Source
 WoT Intermediary Servient
 NGSI-LD-WoT Intermediary responsibilities:
 Act as an Intermediary Servient to Things
 Perform NGSI-LD mappings for WoT Events, Properties and Actions
 Using extra semantic annotations added to the TD
 ”Similar process” to what currently the IoT Agents do
 Expose WoT Properties as NGSI-LD Attributes (Context Source)
 Propagate WoT Event data to an NGSI-LD Context Broker
 (the intermediary does not have data storage capabilities itself)
 Export WoT Actions as NGSI-LD Actuations (see next slides)
11
WoT  NGSI-LD Interworking. Conceptual architecture
NGSI-LD
Context Broker
WoT Intermediary
(CSource)
WoT Thing
Thing Descriptors
Client
Applications
NGSI-LD
API
(Entities)
WoT Thing
WoT Things
Thing Description
(Things)
Semantic
Annotations
Semantic
Annotations
12
WoT  NGSI-LD Interworking (mappings)
 Proposed Mappings
WoT Affordance NGSI-LD Element
Property Attribute (Property or Relationship)
Event Attribute (Property or Relationship)
Action "hasActuation" Relationship. NEW
"saref:hasCommand" Property. ETSI SAREF
"sosa:Actuation" Entity Type. W3C SSN
 Mapping process can be guided through TD annotations expressed
using standard ontologies
 W3C SSN
 ETSI SAREF
 ….
13
TD with NGSI-LD IoW semantic annotations (I)
source: W3C
{
"id": "urn:dev:ops:32473-WoT-ContainerSensor-1234",
"name": "Sensor-Brand-Model",
"securityDefinitions": {
"nosec_sc": {
"scheme": "nosec"
}
},
"security": [
"nosec_sc"
],
"events": {
"fillingValue": {
"@type": "sosa:Observation",
"sosa:hasFeatureOfInterest": "urn:ngsi-ld:WasteContainer:A3456",
"sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/fillingLevel",
"data": {
"type": ”number"
},
"forms": [
{
"href": "mqtt://192.168.1.187:1883/WasteContainer/1234",
"contentType": "text/plain"
}
]
}
},
"@context": [
"https://www.w3.org/2019/wot/td/v1",
{
"sosa": "http://www.w3.org/ns/sosa/"
}
]
}
W3C SSN Annotations
for NGSI-LD Mapping
{
"id": "urn:ngsi-ld:WasteContainer:A3456 ",
"type": ”WasteContainer",
"fillingLevel": {
"type”: "Property",
"value" : 0.85,
"observedAt" : “2019-22-05T12:34:55Z”,
"source" : "urn:dev:ops:32473-WoT-ContainerSensor-
1234"
},
"color" : {
"type”: "Property",
"value”: "green"
},
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1"
]
}
Event Mapping
14
WoT Action  NGSI-LD IoW Proposal
 New terms introduced:
 hasCommand Property (reused from SAREF). A collection of actuatable commands
 hasActuation Relationship. NEW. A collection of actuations (sosa:Actuation)
 sosa:Actuation Entity Type. (reused from W3C SSN)
 For each WoT Action concerning an NGSI-LD Entity:
 hasCommand contains the concerned command (ex. saref:ToggleCommand)
 hasActuation has an NGSI-LD object of type “sosa:Actuation”
 An Entity of type “sosa:Actuation” includes information about the execution status
of the last actuation (command execution) over such Entity.
 Extended NGSI-LD API for launching Actuations over Entities
 POST /ngsi-ld/v1/entities/{entityId}/actuations/{command}
 ContextSourceRegistration API to allow registration of Actuation Executors
 The “WoT-NGSI-LD Intermediary” is actually an Actuation Executor
15
TD with NGSI-LD IoW semantic annotations (II)
source: W3C
{
"id": "urn:dev:wot:com:example:servient:lamp",
"name": "MyLampThing",
"securityDefinitions": {
"basic_sc": {"scheme": "basic", "in":"header"}
},
"security": ["basic_sc"],
"sosa:hasFeatureOfInterest": "urn:ngsi-ld:Streetlight:Sl3456",
"properties": {
"status" : {
"@type" : "sosa:Observation",
"sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/powerState",
"type": "string",
"forms": [{"href": "https://mylamp.example.com/status"}]
}
},
"actions": {
"toggle" : {
"@type" : ["sosa:Actuation", "saref:ToggleCommand"],
"sosa:actsOnProperty": "https://uri.fiware.org/ns/dataModels/powerState",
"forms": [{"href": "https://mylamp.example.com/toggle"}]
}
},
"events":{
"overheating":{
"@type" : ["sosa:Observation”, "saref:NotifyCommand”],
"sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/status",
"data": {"type": "string"},
"forms": [{
"href": "https://mylamp.example.com/oh",
"subprotocol": "longpoll"
}]
}
},
"@context": [
"https://www.w3.org/2019/wot/td/v1",
{ "sosa": "http://www.w3.org/ns/sosa/" , ”saref": "https://w3id.org/saref#" }
]
W3C SSN Annotations
for NGSI-LD Mapping
{
"id": "urn:ngsi-ld:Streetlight:Sl3456",
"type": "Streetlight",
"powerState": "on",
"status" : ”overheating",
"hasActuation" : ["urn:ngsi-ld:sosa:Actuation:A456"],
"hasCommand" : ["saref:ToggleCommand"],
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1"
]
}
{
"id": "urn:ngsi-ld:sosa:Actuation:A456",
"type": "sosa:Actuation",
"name : "toggle",
"sosa:hasResult": "OK",
"sosa:resultTime" : "2019-05-22T12:34:09Z",
"sosa:actsOnProperty" : "powerState",
"sosa:madeByActuator" :
"urn:dev:wot:com:example:servient:lamp",
"sosa:hasFeatureOfInterest" : "urn:ngsi-ld:Streetlight:Sl3456",
"saref:hasCommand": "saref:ToggleCommand",
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1",
{
"sosa": "http://www.w3.org/ns/sosa/",
”saref": "https://w3id.org/saref#"
}
]
}
Property / Event Mapping
16
NGSI-LD WoT Adaptor Detailed Architecture
NGSI-LD
Context Broker
Thing
Catalogue
WoT Thing
Thing Descriptors
Client
Applications
NGSI-LD
API
WoT Thing
WoT Things
Thing Descriptions
Semantic
Annotations
Semantic
Annotations
NGSI-LD
Context Source
NGSI-LD
Data Log & Writer
Property Manager Event ListenerAction Executor
Add
TD
Register
CSource
forward
Intermediary Servient
update
<<Notification>>
New TD
WoT Mapper
Log Data
NGSI-LD
17
Issues and open points
 Scalability
 How to deal with millions of TDs and related annotations?
 TD Templates (For further study).
 Use JSON Hyperlinked Schema?
 An Actuation Entity per Entity and command type … could be too much?
 Semantic annotations suitability
 Is the usage of W3C SSN / ETSI SAREF appropriate?.
 Are we assuming the right semantics?
 Specific Ontology for TD annotations?
 What happens to WoT Binding Templates?
 How to convey data transformations?
 What happens to IoT Agents?
 Can IoT Agents play a role in this architecture?
18
Next Steps
 Refine the proposed Architecture through a Proof of Concept
 Study other alternatives for semantic annotation
 Other concepts in SSN, SAREF, or custom ontology, etc.
 Align with latest version of W3C WoT TD Specification
 We hope to see it in CR state soon!!
 Contribute to ETSI deliverables on NGSI-LD IoW with W3C WoT
 Raise awareness of this work within the W3C WoT Community
19
Conclusions
 Interworking between W3C WoT and NGSI-LD is feasible
 Semantic annotations are a powerful tool to bridge the Information
Management Layer and the IoT Service Layer
 W3C WoT TD specification is very promising and flexible
 W3C WoT TD as the lingua franca for semantic description of devices in the
Smart Domain
 A great opportunity to improve the IoT Chapter of FIWARE!!
20
References
 W3C WoT Architecture (Editor’s Draft)
 https://w3c.github.io/wot-architecture/
 W3C WoT TD Specification (Editor’s Draft)
 https://w3c.github.io/wot-thing-description
 NGSI-LD Specification (January 2019)
 https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf
 W3C WoT Binding Templates (Editor’s Draft)
 https://w3c.github.io/wot-binding-templates/
 ETSI SAREF Ontology
 http://ontology.tno.nl/saref/
 W3C SSN Ontology
 https://www.w3.org/TR/2017/REC-vocab-ssn-20171019/
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
José Manuel Cantera Fonseca
FIWARE Foundation
josemanuel.cantera@fiware.org

More Related Content

PDF
FIWARE Global Summit - Lessons from Building FIWARE Environment with IoT Agent
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PPTX
User Data Management with MongoDB
PDF
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
PDF
The case for a unified way of speaking to things
PDF
Victor Charpenay | Standardized Semantics for an Open Web of Things
PDF
FIWARE Global Summit - Defragmenting the IoT with the Web of Things
FIWARE Global Summit - Lessons from Building FIWARE Environment with IoT Agent
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
User Data Management with MongoDB
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
The case for a unified way of speaking to things
Victor Charpenay | Standardized Semantics for an Open Web of Things
FIWARE Global Summit - Defragmenting the IoT with the Web of Things

Similar to Towards Interoperability between W3C Web of Things and NGSI-LD (20)

PDF
A component based architecture for the Web of Things
PPTX
IoT Broker
PPTX
IoT-Broker Developers Week
PDF
1213532535.pdf
PDF
NGSI-LD IoT Agents
PPTX
A Model-Driven, Component Generation Approach for the Web of Things
PPTX
Thesis Defence: A Model Driven Architecture for the Web of Things
PPT
Semantic Sensor Service Networks
PDF
Design patternsforiot
PPTX
Hypermedia for Machine APIs
PDF
Service Integration in the Web of Things
PDF
5 Years of Web of Things Workshops
PPTX
IoT-A ARM
PDF
From the internet of things to the web of things course
PPTX
Hypermedia System Architecture for a Web of Things
PDF
Service Integration - A Web of Things Perspective
PDF
Seongmyung_Jeong_Presentation.pdf
PDF
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
PPTX
IoT Discovery GE: An Introduction
PDF
Configuration of Smart Environments Made Simple
A component based architecture for the Web of Things
IoT Broker
IoT-Broker Developers Week
1213532535.pdf
NGSI-LD IoT Agents
A Model-Driven, Component Generation Approach for the Web of Things
Thesis Defence: A Model Driven Architecture for the Web of Things
Semantic Sensor Service Networks
Design patternsforiot
Hypermedia for Machine APIs
Service Integration in the Web of Things
5 Years of Web of Things Workshops
IoT-A ARM
From the internet of things to the web of things course
Hypermedia System Architecture for a Web of Things
Service Integration - A Web of Things Perspective
Seongmyung_Jeong_Presentation.pdf
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
IoT Discovery GE: An Introduction
Configuration of Smart Environments Made Simple
Ad

Recently uploaded (20)

PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
innovation process that make everything different.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
DOCX
Unit-3 cyber security network security of internet system
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Introduction to Information and Communication Technology
PPTX
Digital Literacy And Online Safety on internet
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPT
tcp ip networks nd ip layering assotred slides
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt
Sims 4 Historia para lo sims 4 para jugar
Paper PDF World Game (s) Great Redesign.pdf
innovation process that make everything different.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
PptxGenJS_Demo_Chart_20250317130215833.pptx
Unit-3 cyber security network security of internet system
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Introduction to Information and Communication Technology
Digital Literacy And Online Safety on internet
Decoding a Decade: 10 Years of Applied CTI Discipline
tcp ip networks nd ip layering assotred slides
SASE Traffic Flow - ZTNA Connector-1.pdf
The New Creative Director: How AI Tools for Social Media Content Creation Are...
QR Codes Qr codecodecodecodecocodedecodecode
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
introduction about ICD -10 & ICD-11 ppt.pptx
Ad

Towards Interoperability between W3C Web of Things and NGSI-LD

  • 1. Web of Things The way towards interoperability with NGSI-LD José Manuel Cantera Fonseca – FIWARE Foundation May 2019 – FIWARE Summit Genoa
  • 2. 1 WoT Introduction (I) • The W3C Web of Things (WoT) has been created to enable interoperability across IoT Platforms and application domains. • WoT provides mechanisms to formally describe IoT interfaces: • allowing IoT devices and services to communicate with each other • independent of the underlying implementation • across multiple networking protocols
  • 3. 2 WoT Interaction Model • WoT applications use three types of Interaction Affordances: • Properties • Expose internal state of the Thing that can be directly accessed (read) and optionally manipulated (write) or watched (observe) i.e. pull and push communication styles. • Actions • allow to invoke a function or service exposed by the Thing or to trigger a process • Events • Thing-initiated notifications, discrete events, or streams of values sent asynchronously to the receiver. Push communication style.
  • 4. 3 WoT Building Blocks • Thing Description (TD): it describes the network-facing interface of a Thing. Each WoT Device MUST have a corresponding TD. Normative • Binding Templates can be used to describe multiple protocol bindings, so that a Thing can communicate with different IoT Platforms. Non-normative. • Scripting API enables implementation of the application logic of a Thing using a standardized contract for JavaScript. Non- normative • Status: Thing Description is expected to be a W3C Recommendation in Q2 2019 • Note: This presentation is based on latest Editor’s Draft WoT specifications. • (Non substantial) changes may happen Source: W3C
  • 5. 4 W3C WoT Architectural elements & patterns Source: W3C Servient as a Thing Servient as a Intermediary • A Servient is a software stack that implements the WoT building blocks. • Servients can host and expose Things and/or consume Things (i.e., host Consumers) • Depending on the Protocol Binding, Servients can perform in both server and client role
  • 6. 5 WoT Thing Description (WoT TD) • It defines an information model based on a semantic vocabulary and a serialized representation based on JSON. (but also allows JSON-LD processing). • The index.html for Things, human-readable and machine-understandable metadata: • Thing instances general metadata such as name, ID, descriptions • Web Links to related Things or other documents. • Interaction Affordance metadata (properties, actions, events) • Public Security Configuration metadata • Schemata of the information exchanged with the Thing (using JSON Schema). • TD can be hosted locally by a Thing or externally (ex. by a Thing Catalogue)
  • 7. 6 Thing Description (TD) Information Model source: W3C
  • 8. 7 TD Example (I). (HTTPs) source: W3C { "id": "urn:dev:wot:com:example:servient:lamp", "@type": "Thing", "name": "MyLampThing", "securityDefinitions": { "basic_sc": {"scheme": "basic", "in":"header"} }, "security": ["basic_sc"], "properties": { "status" : { "type": "string", "forms": [{"href": "https://mylamp.example.com/status"}] } }, "actions": { "toggle" : { "forms": [{"href": "https://mylamp.example.com/toggle"}] } }, "events":{ "overheating":{ "data": {"type": "string"}, "forms": [{ "href": "https://mylamp.example.com/oh", "subprotocol": "longpoll" }] } }, "@context": "https://www.w3.org/2019/wot/td/v1" } source: W3C
  • 9. 8 TD Example (II) (MQTT) source: W3C { "id": "urn:dev:ops:32473-WoTLightSensor-1234", "@type": "Thing", "name": "MyLightSensor", "securityDefinitions": { "nosec_sc": { "scheme": "nosec" } }, "security": [ "nosec_sc" ], "events": { "luminosityValue": { "data": { "type": "integer" }, "forms": [ { "href": "mqtt://192.168.1.187:1883/lightSensor", "contentType": "text/plain" } ] } }, "@context": "https://www.w3.org/2019/wot/td/v1" } source: W3C
  • 10. 9 TD with SAREF semantic annotations source: W3C { "id": "urn:dev:wot:com:example:servient:lamp", "name": "MyLampThing", "@type": "saref:LightingDevice", "securityDefinitions": {"basic_sc": { "scheme": "basic", "in": "header" }}, "security": ["basic_sc"], "properties": { "status": { "@type": "saref:OnOffState", "type": "string", "forms": [{ "href": "https://mylamp.example.com/status" }] } }, "actions": { "toggle": { "@type": "saref:ToggleCommand", "forms": [{ "href": "https://mylamp.example.com/toggle" }] } }, "events": { "overheating": { "@type": "saref:NotifyCommand", "data": {"type": "string"}, "forms": [{ "href": "https://mylamp.example.com/oh" }] } }, "@context": [ "https://www.w3.org/2019/wot/td/v1", { "saref": "https://w3id.org/saref#" } ] } SAREF can be used to annotate TDs source: W3C
  • 11. 10 WoT  NGSI-LD Interworking (IoW) principles  Overall Architecture:  NGSI-LD : Information Management Layer  WoT : IoT Service Layer  Proposed Interworking mechanism. An “NGSI-LD-WoT Intermediary” to play a dual role:  NGSI-LD Context Source  WoT Intermediary Servient  NGSI-LD-WoT Intermediary responsibilities:  Act as an Intermediary Servient to Things  Perform NGSI-LD mappings for WoT Events, Properties and Actions  Using extra semantic annotations added to the TD  ”Similar process” to what currently the IoT Agents do  Expose WoT Properties as NGSI-LD Attributes (Context Source)  Propagate WoT Event data to an NGSI-LD Context Broker  (the intermediary does not have data storage capabilities itself)  Export WoT Actions as NGSI-LD Actuations (see next slides)
  • 12. 11 WoT  NGSI-LD Interworking. Conceptual architecture NGSI-LD Context Broker WoT Intermediary (CSource) WoT Thing Thing Descriptors Client Applications NGSI-LD API (Entities) WoT Thing WoT Things Thing Description (Things) Semantic Annotations Semantic Annotations
  • 13. 12 WoT  NGSI-LD Interworking (mappings)  Proposed Mappings WoT Affordance NGSI-LD Element Property Attribute (Property or Relationship) Event Attribute (Property or Relationship) Action "hasActuation" Relationship. NEW "saref:hasCommand" Property. ETSI SAREF "sosa:Actuation" Entity Type. W3C SSN  Mapping process can be guided through TD annotations expressed using standard ontologies  W3C SSN  ETSI SAREF  ….
  • 14. 13 TD with NGSI-LD IoW semantic annotations (I) source: W3C { "id": "urn:dev:ops:32473-WoT-ContainerSensor-1234", "name": "Sensor-Brand-Model", "securityDefinitions": { "nosec_sc": { "scheme": "nosec" } }, "security": [ "nosec_sc" ], "events": { "fillingValue": { "@type": "sosa:Observation", "sosa:hasFeatureOfInterest": "urn:ngsi-ld:WasteContainer:A3456", "sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/fillingLevel", "data": { "type": ”number" }, "forms": [ { "href": "mqtt://192.168.1.187:1883/WasteContainer/1234", "contentType": "text/plain" } ] } }, "@context": [ "https://www.w3.org/2019/wot/td/v1", { "sosa": "http://www.w3.org/ns/sosa/" } ] } W3C SSN Annotations for NGSI-LD Mapping { "id": "urn:ngsi-ld:WasteContainer:A3456 ", "type": ”WasteContainer", "fillingLevel": { "type”: "Property", "value" : 0.85, "observedAt" : “2019-22-05T12:34:55Z”, "source" : "urn:dev:ops:32473-WoT-ContainerSensor- 1234" }, "color" : { "type”: "Property", "value”: "green" }, "@context": [ "https://schema.lab.fiware.org/ld/context", "https://uri.etsi.org/ngsi-ld/v1" ] } Event Mapping
  • 15. 14 WoT Action  NGSI-LD IoW Proposal  New terms introduced:  hasCommand Property (reused from SAREF). A collection of actuatable commands  hasActuation Relationship. NEW. A collection of actuations (sosa:Actuation)  sosa:Actuation Entity Type. (reused from W3C SSN)  For each WoT Action concerning an NGSI-LD Entity:  hasCommand contains the concerned command (ex. saref:ToggleCommand)  hasActuation has an NGSI-LD object of type “sosa:Actuation”  An Entity of type “sosa:Actuation” includes information about the execution status of the last actuation (command execution) over such Entity.  Extended NGSI-LD API for launching Actuations over Entities  POST /ngsi-ld/v1/entities/{entityId}/actuations/{command}  ContextSourceRegistration API to allow registration of Actuation Executors  The “WoT-NGSI-LD Intermediary” is actually an Actuation Executor
  • 16. 15 TD with NGSI-LD IoW semantic annotations (II) source: W3C { "id": "urn:dev:wot:com:example:servient:lamp", "name": "MyLampThing", "securityDefinitions": { "basic_sc": {"scheme": "basic", "in":"header"} }, "security": ["basic_sc"], "sosa:hasFeatureOfInterest": "urn:ngsi-ld:Streetlight:Sl3456", "properties": { "status" : { "@type" : "sosa:Observation", "sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/powerState", "type": "string", "forms": [{"href": "https://mylamp.example.com/status"}] } }, "actions": { "toggle" : { "@type" : ["sosa:Actuation", "saref:ToggleCommand"], "sosa:actsOnProperty": "https://uri.fiware.org/ns/dataModels/powerState", "forms": [{"href": "https://mylamp.example.com/toggle"}] } }, "events":{ "overheating":{ "@type" : ["sosa:Observation”, "saref:NotifyCommand”], "sosa:observedProperty": "https://uri.fiware.org/ns/dataModels/status", "data": {"type": "string"}, "forms": [{ "href": "https://mylamp.example.com/oh", "subprotocol": "longpoll" }] } }, "@context": [ "https://www.w3.org/2019/wot/td/v1", { "sosa": "http://www.w3.org/ns/sosa/" , ”saref": "https://w3id.org/saref#" } ] W3C SSN Annotations for NGSI-LD Mapping { "id": "urn:ngsi-ld:Streetlight:Sl3456", "type": "Streetlight", "powerState": "on", "status" : ”overheating", "hasActuation" : ["urn:ngsi-ld:sosa:Actuation:A456"], "hasCommand" : ["saref:ToggleCommand"], "@context": [ "https://schema.lab.fiware.org/ld/context", "https://uri.etsi.org/ngsi-ld/v1" ] } { "id": "urn:ngsi-ld:sosa:Actuation:A456", "type": "sosa:Actuation", "name : "toggle", "sosa:hasResult": "OK", "sosa:resultTime" : "2019-05-22T12:34:09Z", "sosa:actsOnProperty" : "powerState", "sosa:madeByActuator" : "urn:dev:wot:com:example:servient:lamp", "sosa:hasFeatureOfInterest" : "urn:ngsi-ld:Streetlight:Sl3456", "saref:hasCommand": "saref:ToggleCommand", "@context": [ "https://schema.lab.fiware.org/ld/context", "https://uri.etsi.org/ngsi-ld/v1", { "sosa": "http://www.w3.org/ns/sosa/", ”saref": "https://w3id.org/saref#" } ] } Property / Event Mapping
  • 17. 16 NGSI-LD WoT Adaptor Detailed Architecture NGSI-LD Context Broker Thing Catalogue WoT Thing Thing Descriptors Client Applications NGSI-LD API WoT Thing WoT Things Thing Descriptions Semantic Annotations Semantic Annotations NGSI-LD Context Source NGSI-LD Data Log & Writer Property Manager Event ListenerAction Executor Add TD Register CSource forward Intermediary Servient update <<Notification>> New TD WoT Mapper Log Data NGSI-LD
  • 18. 17 Issues and open points  Scalability  How to deal with millions of TDs and related annotations?  TD Templates (For further study).  Use JSON Hyperlinked Schema?  An Actuation Entity per Entity and command type … could be too much?  Semantic annotations suitability  Is the usage of W3C SSN / ETSI SAREF appropriate?.  Are we assuming the right semantics?  Specific Ontology for TD annotations?  What happens to WoT Binding Templates?  How to convey data transformations?  What happens to IoT Agents?  Can IoT Agents play a role in this architecture?
  • 19. 18 Next Steps  Refine the proposed Architecture through a Proof of Concept  Study other alternatives for semantic annotation  Other concepts in SSN, SAREF, or custom ontology, etc.  Align with latest version of W3C WoT TD Specification  We hope to see it in CR state soon!!  Contribute to ETSI deliverables on NGSI-LD IoW with W3C WoT  Raise awareness of this work within the W3C WoT Community
  • 20. 19 Conclusions  Interworking between W3C WoT and NGSI-LD is feasible  Semantic annotations are a powerful tool to bridge the Information Management Layer and the IoT Service Layer  W3C WoT TD specification is very promising and flexible  W3C WoT TD as the lingua franca for semantic description of devices in the Smart Domain  A great opportunity to improve the IoT Chapter of FIWARE!!
  • 21. 20 References  W3C WoT Architecture (Editor’s Draft)  https://w3c.github.io/wot-architecture/  W3C WoT TD Specification (Editor’s Draft)  https://w3c.github.io/wot-thing-description  NGSI-LD Specification (January 2019)  https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf  W3C WoT Binding Templates (Editor’s Draft)  https://w3c.github.io/wot-binding-templates/  ETSI SAREF Ontology  http://ontology.tno.nl/saref/  W3C SSN Ontology  https://www.w3.org/TR/2017/REC-vocab-ssn-20171019/
  • 22. Thank you! http://fiware.org Follow @FIWARE on Twitter José Manuel Cantera Fonseca FIWARE Foundation josemanuel.cantera@fiware.org