NGSI-LD and WoT: complementary open standards that may converge to bring a standard for digital twin data management�
Juanjo Hierro
Chairman, FIWARE Technical Steering Committee
juanjose.hierro@gmail.com
Digital Twins as basis for the architecture of smart vertical solutions, smart organizations and data spaces in multiple sectors
1
Process / Analyze / Monitor
Digital Twin representation
Context�(Real World)
update
actuation
update
notify / query
Digital Twins: an approach for integration at multiple levels following a system of systems approach
2
Digital Twin representation
Digital Twin representation
Architecting �Smart Solutions
Integrating systems and data within cities
Sharing Data across organizations�(data spaces)
3rd systems
sensors
Smart Solution
System 3
System 4
System 1
System 2
Smart City
Smart Building
Smart Logistics
Smart Grid
Digital Twin representation
What are we referring to as Digital Twin?
3
WoT:Things and NGSI-LD:Entities
4
A Thing Model Description
5
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",� "@type": "tm:ThingModel",
"title": "Coffee Machine",
…
"properties": {
"status": {
"description": "current status of the coffee machine (on|off)",� "type": "string",
},
"full": {
"description": "indicates whether container is full of capsules",� "type": "boolean"
"readonly": true
}
},
"actions": {
"self-clean": {� "description": "Activates self-cleaning program"
}
},
"events": {
"warning": {
"description": "Coffee Machines raises some warning",
"data": {"type": "string"},
}]
}
}
}
A Thing Description
6
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06",
"title": "MyCoffeeMachine",
…
"properties": {
"status": {
"description": "current status of the coffee machine (on|off)",� "type": "string",
"forms": [{"href": "https://myCoffeMachine.example.com/status"}]
},
…
},
"actions": {
"self-clean": {� "description": "Activates self-cleaning program"
"forms": [{"href": "https://myCoffeMachine.example.com/self-clean"}]
}
},
"events": {
"warning": {
"description": "Coffee Machines raises some warning",
"data": {"type": "string"},
"forms": [{
"href": "https://myCoffeeMachine.example.com/oh",
"subprotocol": "sse"
}]
}
}
}
URN identifying a particular Thing
URL with which issuing an HTTP GET will allow to get the value of the “status” property (can we assume that an HTTP POST would allow to modify it?)
indicates how to access to the value of the “status” property for the referred thing
indicates how to trigger the “toggle” action
indicates how to subscribe to “overheating” events through a longpoll protocol on the specified endpoint
Compatibility of NGSI-LD with Thing Models/Descriptions
7
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06",
"title": "MyCoffeeMachine",
…
"properties": {
"status": {
"description": "current status of the coffee machine (on|off)",� "type": "string",
"forms": [{"href": <valid NGSI-LD form>}]
}
},
"actions": {
"self-clean": {� "description": "Activates self-cleaning program"
"forms": [{"href": <valid NGSI-LD form>}]
}
},
"events": {
"warning": {
"description": "Coffee Machines raises some warning",
"data": {"type": "string"},
"forms": [{
"href": "<valid NGSI-LD form>",
"subprotocol": "sse"
}]
}
}
}
Compatibility of NGSI-LD with Thing Descriptions: properties
8
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06",
"title": "MyCoffeeMachine",
…
"properties": {
"status": {
"description": "current status of the coffee machine (on|off)",� "type": "string",
"forms": [{"href": “https://MyContext.com/ngsi-ld/v1/entities/� urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06/� attrs/status”}]
},
"full": {
"description": "indicates whether container is full of capsules",� "type": "boolean"
"readonly": true
"forms": [{"href": “https://MyContext.com/ngsi-ld/v1/entities/� urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06/� attrs/full”}]
}
},�}
endpoint where NGSI-LD requests would be served may be connected to the specific Thing or configured for all instances of several Thing Models (recommended)
Default Thing Description derived from Thing Model: properties
9
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",� "@type": "tm:ThingModel",
"title": "Coffee Machine",� “server endpoint”: “MyContext.com”
…
"properties": {
"status": {
"description": "current status (on|off)”)",� "type": "string",
},
"full": {
"description": "true if full of capsules",� "type": "boolean"
"readonly": true
}
…
}
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06",
"title": "MyCoffeeMachine",
…
"properties": {
"status": {
"description": "current status of the coffee machine (on|off)",� "type": "string",
"forms": [{"href": “https://MyContext.com/ngsi-ld/v1/entities/� urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06/� attrs/status”}]
},
"full": {
"description": "indicates whether container is full of capsules",� "type": "boolean"
"readonly": true
"forms": [{"href": “https://MyContext.com/ngsi-ld/v1/entities/� urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06/� attrs/full”}]
}
},�}
Compatibility of NGSI-LD with Thing Descriptions: events
10
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:uuid:0804d572-cce8-422a-bb7c-4412fcd56f06",
"title": "MyCoffeeMachine",
…
“events": {
"warning": {
"description": "Coffee Machines raises some warning",
"data": {"type": "string"},
"forms": [{
"href": "<valid NGSI-LD form>",
"subprotocol": "sse"
}]
}
}
}
Default Thing Description derived from Thing Model: events
11
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",� "@type": "tm:ThingModel",
"title": "Coffee Machine",� “server endpoint”: “MyContext.com”
…� "properties": {
"status": {
"description": "current status(on|off)",� "type": "string",
},
"full": {
"description": "true if full of capsules",� "type": "boolean"
"readonly": true
}
"events": {
"warning": {
"description": "Coffee Machines raises some warning",
"data": {"type": "string"}
}� "full event": {
"description": "Sends an event when full of capsules",� “property”: “full”
}
}
}
“warning” would map into a property of type “string” and users would be able to subscribe to the “MyContext.com” endpoint to subscribe to updates on that property
I can subscribe to updates on properties if the “data” element is not specified in the Thing Model but a “property” is designed instead. Here, the “full event” is triggered when an update occurs in property “full”
Compatibility of NGSI-LD with Thing Descriptions
12
Summary
13
Next steps
14
Sounds nice? - Contact us!
http://fiware.org
Follow @FIWARE on Twitter
RESTful API: ETSI NGSI-LD
16
Smart Home
Wind Plant
Application/Service
Context Broker
Wind Turbine
NGSI-LD
Summary
17