SlideShare una empresa de Scribd logo
1 de 22
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

Más contenido relacionado

Similar a Towards Interoperability between W3C Web of Things and NGSI-LD

FIWARE Training: IoT and Legacy
FIWARE Training: IoT and LegacyFIWARE Training: IoT and Legacy
FIWARE Training: IoT and Legacy
FIWARE
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LD
FIWARE
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
Fermin Galan
 
Mobility & Data Strategies
Mobility & Data StrategiesMobility & Data Strategies
Mobility & Data Strategies
Sam Basu
 

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

FIWARE Training: IoT and Legacy
FIWARE Training: IoT and LegacyFIWARE Training: IoT and Legacy
FIWARE Training: IoT and Legacy
 
Social Graphs and Semantic Analytics
Social Graphs and Semantic AnalyticsSocial Graphs and Semantic Analytics
Social Graphs and Semantic Analytics
 
WOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of ThingsWOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of Things
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
 
Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program
Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers ProgramSession 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program
Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program
 
WSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsWSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needs
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddler
 
IoT Interoperability: a Hub-based Approach
IoT Interoperability: a Hub-based ApproachIoT Interoperability: a Hub-based Approach
IoT Interoperability: a Hub-based Approach
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LD
 
The case for a unified way of speaking to things
The case for a unified way of speaking to thingsThe case for a unified way of speaking to things
The case for a unified way of speaking to things
 
Semantic web technologies applied to bioinformatics and laboratory data manag...
Semantic web technologies applied to bioinformatics and laboratory data manag...Semantic web technologies applied to bioinformatics and laboratory data manag...
Semantic web technologies applied to bioinformatics and laboratory data manag...
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIs
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
Mobility & Data Strategies
Mobility & Data StrategiesMobility & Data Strategies
Mobility & Data Strategies
 
WebServices
WebServicesWebServices
WebServices
 
How to Find a Needle in the Haystack
How to Find a Needle in the HaystackHow to Find a Needle in the Haystack
How to Find a Needle in the Haystack
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 

Último

Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 

Último (20)

Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
 

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