web of things an update on development of iot schema org
play

Web of Things An Update on Development of iot.schema.org Darko - PowerPoint PPT Presentation

Web of Things An Update on Development of iot.schema.org Darko Anicic Michael Koster WoT F2F Meeting, March 2018 Prague, Czech Republic Overview IOT SCHEMA The Problem Many standards organizations for connected things: OCF, Zigbee,


  1. Web of Things An Update on Development of iot.schema.org Darko Anicic Michael Koster WoT F2F Meeting, March 2018 Prague, Czech Republic

  2. Overview IOT SCHEMA

  3. The Problem • Many standards organizations for connected things: – OCF, Zigbee, Z-Wave, Bluetooth, Fairhair – Focus on Device Certifcation – Exclusive, require membership to participate – Lack focus on common interoperability – Compete with each other, focus on verticals • Each defnes a unique device level application layer with dedicated data models, but… – Similar high level design patterns – Converging on common communication protocols (IPV6, CoAP, et. al.)

  4. What needs to be built? • Application level semantic interoperability – Well known formats to describe common afordances of connected things (What does it do? What can I control?) – A way to describe how to interact with connected things from diferent device ecosystems, which use similar protocols but diverse data models – Enable easy implementation of Bridges, Libraries, Translators, Mappings, Bindings, Proxies

  5. Capability Abstraction • Common abstraction => "Capability" • A capability is the set of afordances needed to interact with a single function of a connected thing • For example, an on/of switch capability – on/of state, delay time: properties – "switch on", "switch of": actions – "switched on", "switched of": events

  6. Diferent Layers in iotschema.org Capability Feature of Interaction Pattern Interest Data Type & Units Remarks: • Feature of Interest (FoI) pattern is still to be integrated in the model (consider the integration of FoI into schema.org);

  7. Example: LightControl Capabilitiy { "@id": "iot:LightControl", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "iot:Capability" }, "rdfs:comment": "A capability for controlling a light source, such as an RGB or other light“, "rdfs:label": "LightControl", "iot:domain": [ { "@id": "iot:Home"}, {"@id": "iot:Building"} ], All interactions "iot:providesInteractionPattern": [ { are optional "@id": "iot:BinarySwitch", "@id": "iot:SwitchStatus", "@id": "iot:T urnOn", "@id": "iot:T urnOf", Capabilities "@id": "iot:CurrentColour", are extensible "@id": "iot:SetColour", "@id": "iot:CurrentDimmer", "@id": "iot:SetDimmer", "@id": "iot:RampTime" }] }

  8. Example: SetDimmer Interaction { Interaction "@id": "iot:SetDimmer", "@type": "rdfs:Class", Pattern "iot:acceptsInputData": { T ype "@id": "iot:DimmerData" }, "rdfs:comment": "Set quantized representation for brightness (e.g., in the range 0-100)", "rdfs:label": "SetDimmer", "rdfs:subClassOf": { "@id": "iot:Action" } } Data T ype { Unit, "@id": "iot:DimmerData", Range "@type": "rdfs:Class", "rdfs:comment": "Dimmer data", "rdfs:label": "DimmerData", Data level "rdfs:subClassOf": { "@id": "schema:PropertyValue" }, is optional too "schema:propertyType": { "@id": "schema:Integer" }, "schema:minValue": "schema:Integer", "schema:maxValue": "schema:Integer" }

  9. Example: Annotated Thing Description {"@context": ["https://w3c.github.io/wot/w3c-wot-td-context.jsonld", {"iot": "http://iotschema.org/"}], "name": "LightControl", "@type": ["Thing", "iot:LightControl"], "base": "http://example.com:8080/mylamp", "domain": ["iot:Building"], "interaction": [ {"name": "SwitchStatus", "@type": [ "Property", "iot:SwitchStatus" ], "observable": false, "schema": "boolean", "writable": false, "form": [ {"href": "/switch", "mediaType": "application/ld+json"} ]} ]}

  10. Example: Annotated Thing Description {"@context": ["https://w3c.github.io/wot/w3c-wot-td-context.jsonld", {"iot": "http://iotschema.org/"}], "name": "LightControl", "@type": ["Thing", "iot:LightControl"], "base": "http://example.com:8080/mylamp", "domain": ["iot:Building"], "interaction": [ {"name": "SwitchStatus", "@type": [ iotschema.org "Property", "iot:SwitchStatus" ], "observable": false, Allowed to add "schema": "boolean", to Thing additional "writable": false, interactions "form": [ beyond {"href": "/switch", LightControl "mediaType": "application/json"} ]} ]}

  11. What is new in iot.schema.org • The schema contains more terms • Proposal on how to use shape constraints • Few Event specifcations have been added • Few Action specifcations (for writable Properties) have been added • Attributes “writable” and “observable” added for Properties

  12. Use of iot.schema.org DISCOVERY

  13. Motivation: Thing Discovery TD Directory Need AirConditioner • Problem to solve – Discover Things suitable for a WoT application;

  14. Motivation: Thing Discovery TD Directory MyAirConditione rP1 TD Need AirConditioner • Problem to solve – Discover Things suitable for a WoT application;

  15. Motivation: Thing Discovery TD Directory AirConditioner TD Need AirConditioner • Problem to solve – Discover Things suitable for a WoT application;

  16. Air Conditioner Uniquely Identifable

  17. Interaction Patterns of AirConditioner Capability

  18. Use of iot.schema.org TD TEMPLATES

  19. Thing Description T emplate Generation • Automated generation of semantically annotated TDs • Semantic validation of TD variations. Steps: 1. Select Capabilities, interactions, and data from iotschema.org 2. Specify shape constraints for your Thing 3. Generate a TD

  20. Example: Level Capability { "@context" : […], "@id": " iot:LevelCapability ", "rdfs:subClassOf": "iot:Capability", " iot:providesInteractionPatter n ": [ { "@id": " iot:CurrentLevel ", "iot:providesOutputData": {"@id": " iot:LevelData ", "schema:propertyType": "schema:Number", "schema:minValue": "schema:Number", "schema:maxValue": "schema:Number", "schema:unitCode": "qudt:Centimetre" }, "rdfs:subClassOf": "iot:Property" }, { "@id": " iot:SetLevel ",

  21. SHACL Shape for Level Capability : LevelCapabilityShape Why Shapes are required on a sh:NodeShape ; iot capabilities? sh:targetClass :LevelCapability ; sh:property [ Variations between Things • sh:path with same Capability :providesInteractionPattern ; sh:minCount 1 ; Validate semantically- • sh:maxCount 1 ; enriched Thing Descriptions sh:in (:CurrentLevel) ; ] ; . : CurrentLevelShape Shared documentation • sh:targetClass :CurrentLevel ; between manufacturers sh:property [ sh:path :providesoutputData ; (enhances interoperability) sh:minCount 1 ; sh:maxCount 1 ; sh:in ( :LevelData ) ; ] ; . : LevelDataShape sh:targetClass :LevelData ; sh:property [ sh:minInclusive 0 ;

  22. W3C WoT Thing Description W3C WoT Thing Description { "@context": [ ], "@type": ["Thing“], "name": “MyUltrasonicSensor ", “base": " coap://w3cwot.net:5689/", "interactions": [{ "@type": [" Property "], "name": "mylevel", " schema": {"type": “number"}, "writable": false, "observable": false, "form": [{ "href“: "level", "mediaT ype": "application/json" }] } ] }

  23. Generated Thing Description W3C WoT Thing Description iot.schema.org • { Capabilities "@context": [ ], • "@type": ["Thing“, Shapes • "iot:LevelCapability"], Proposal for shape constraints "name": “MyUltrasonicSensor ", • “base": " https:// • coap://w3cwot.net:5689/", github.com/iot-schema-collab/ "interactions": [{ "@type": [" Property “, iotschema/tree/master/shapes “iot:CurrentLevel"], "name": "mylevel", " schema": {"type": Code available at: • “number"}, https://github.com/aparnasai/iots "@type” : "iot:LevelData", chema/tree/iotschema-TDGenerator/ "schema:unitKind" : “iot:Centimetre", SHACL branch: iotschema-TDGenerator "writable": false, "observable": false, "form": [{ "href“: "level",

Recommend


More recommend