semantic metastandards will unlock iot interoperability

48
Semantic Metastandards Will Unlock IoT Interoperability

Upload: david-janes

Post on 12-Apr-2017

713 views

Category:

Internet


1 download

TRANSCRIPT

Page 1: Semantic Metastandards will Unlock IoT Interoperability

Semantic Metastandards Will

Unlock IoT Interoperability

Page 2: Semantic Metastandards will Unlock IoT Interoperability

David Janes@dpjanes

[email protected]://iotdb.org/social/imadeit/

October 2015

Page 3: Semantic Metastandards will Unlock IoT Interoperability

Introduction

Page 4: Semantic Metastandards will Unlock IoT Interoperability

Scope

• Semantics

• The “highest” levels of the stack / APIs

• Not about

• IPv6 v. Thread v BLE

• Weave v. HomeKit

Page 5: Semantic Metastandards will Unlock IoT Interoperability

Actuators

• How do I tell something “turn on”

• I don’t care how it does it, just that that it does it

• the concept of "turn on" is basically universal / standard independent

Page 6: Semantic Metastandards will Unlock IoT Interoperability

Sensors

• What does { t: 24.0 } mean?

Page 7: Semantic Metastandards will Unlock IoT Interoperability

Learning from the Web

• The Web works

• Use URIs

• Use REST

• Use JSON (-like data)

Page 8: Semantic Metastandards will Unlock IoT Interoperability

The World TodayParty Like It’s 199[0-9]

Page 9: Semantic Metastandards will Unlock IoT Interoperability

All Teh Standardz! • Open Interconnect Consortium

• Thread Group

• AllSeen Alliance

• HyperCat Consortium

• Industrial Internet Consortium

• IoT-GSI

• oneM2M

• Open Mobile Alliance

• Internet of Things (IEE)

• IETF

• IPSO Alliance

• W3C Web of Things Community Group

• W3C Semantic Sensor Network

• ITU Joint Coordination Activity on IoT

Page 10: Semantic Metastandards will Unlock IoT Interoperability

Commonalities

• Prescriptive - “Here’s how you do this”

• Roach Motel - “Once you go in you can never go out”

• Complicated - Can a N00b pick it up and use it?

Page 11: Semantic Metastandards will Unlock IoT Interoperability

XKCD was wrong

Page 12: Semantic Metastandards will Unlock IoT Interoperability

Antistandards

• The industry is actively trying to create more standards

• Malice (IMO)

• “Win the stack”

Page 13: Semantic Metastandards will Unlock IoT Interoperability

We’ve Been Here

• Internet Video

• XML

• RPC

• SOAP

• Power!

Page 14: Semantic Metastandards will Unlock IoT Interoperability

What’s wrong now?

• Most IoT Standardization efforts are an attempt to recreate the SOAP mistake

• SOAP is not the way to do things

• But how do we do things?…

Page 15: Semantic Metastandards will Unlock IoT Interoperability

Proposed Model

Page 16: Semantic Metastandards will Unlock IoT Interoperability

Summary

• A Thing has an id and dictionaries

• Dictionaries

• ostate

• istate

• model

• meta

Page 17: Semantic Metastandards will Unlock IoT Interoperability

Assertion

• Everything we need to create Interoperability can be done well with this model

• Based on URIs / API / REST / JSON - i.e. how we program the Internet today

Page 18: Semantic Metastandards will Unlock IoT Interoperability

Thing ID

• "Globally" Unique ID for all Things

• e.g. Many (but not all) Things provide UUIDs

Page 19: Semantic Metastandards will Unlock IoT Interoperability

Dictionaries

• JSON-like dictionaries

• Referenced by URIs

• Manipulate in a “web standard” way

• URI (from id and band)

• PUT / PATCH / GET

Page 20: Semantic Metastandards will Unlock IoT Interoperability

istate

• The “input” (toward me) state

• The actual state of the Thing

Page 21: Semantic Metastandards will Unlock IoT Interoperability

ostate

• The “output” state

• What we want the state to become

Page 22: Semantic Metastandards will Unlock IoT Interoperability

model

• describes terms used in istate and ostate

• "secret sauce"

• JSON-LD

Page 23: Semantic Metastandards will Unlock IoT Interoperability

meta

• slow moving data

• e.g.

• name

• facet (what it does)

• zone (where it is)

• reachability

Page 24: Semantic Metastandards will Unlock IoT Interoperability

Complete ExampleOn / Off Light

Page 25: Semantic Metastandards will Unlock IoT Interoperability

Initial State

Page 26: Semantic Metastandards will Unlock IoT Interoperability

Thing

GET /api/lights/1 { "istate": "/api/things/1/istate", "ostate": "/api/things/1/ostate", "model: "https://…/light.jsonld", "meta": "https://…/xxx.json" }

Page 27: Semantic Metastandards will Unlock IoT Interoperability

istate

GET /api/lights/1/istate { "o": true }

Page 28: Semantic Metastandards will Unlock IoT Interoperability

ostate

GET /api/lights/1/ostate { "o": null }

Page 29: Semantic Metastandards will Unlock IoT Interoperability

model

GET https://…/light.jsonld { "iot:attribute": [ { "@id": "#o", "iot:purpose": "iot-purpose:on", "schema:name": "Turn On / Off" } ] }

Page 30: Semantic Metastandards will Unlock IoT Interoperability

meta

GET https://…/xxx.json { "schema:name": "On-Off Lamp", "iot:facet": "iot-facet:lighting", "iot:zone": "Living Room" }

Page 31: Semantic Metastandards will Unlock IoT Interoperability

"Turn off the light"Phase I - look at model (semantics)

Page 32: Semantic Metastandards will Unlock IoT Interoperability

iot-purpose:on

• This means "turn something on / off"

Page 33: Semantic Metastandards will Unlock IoT Interoperability

Look it up in model

GET https://…/light.jsonld { "iot:attribute": [ { "@id": "#o", "iot:purpose": "iot-purpose:on", "schema:name": "Turn On / Off", "iot:type": "iot-type:boolean" } ] }

Page 34: Semantic Metastandards will Unlock IoT Interoperability

#o is the term

• This is what we will look for in istate and ostate

Page 35: Semantic Metastandards will Unlock IoT Interoperability

N.B.

• This is the new thing!

• We can leave the semantics world and manipulate objects "as per usual"

• A more complicated example would have

• units of measure (Fahrenheit sensor)

• what is being measured / controlled, &c

Page 36: Semantic Metastandards will Unlock IoT Interoperability

Change StatePhase II - Action with #o

Page 37: Semantic Metastandards will Unlock IoT Interoperability

Initial State

GET /api/lights/1/ostate { "o": null }

GET /api/lights/1/istate { "o": true }

The light is off

Page 38: Semantic Metastandards will Unlock IoT Interoperability

Send Command

PATCH /api/lights/1/ostate { "o": false }

GET /api/lights/1/istate { "o": true }

The light is off

Page 39: Semantic Metastandards will Unlock IoT Interoperability

Interstitial State

GET /api/lights/1/ostate { "o": false }

GET /api/lights/1/istate { "o": true }

Waiting for light to turn on

Page 40: Semantic Metastandards will Unlock IoT Interoperability

Final State

GET /api/lights/1/ostate { "o": null }

GET /api/lights/1/istate { "o": false }

The light is on

Page 41: Semantic Metastandards will Unlock IoT Interoperability

Reference Implementation

Page 42: Semantic Metastandards will Unlock IoT Interoperability

Semantics

• https://iotdb.org/pub

• iot: core definitions

• iot-purpose: sensor and actuators

• iot-unit: units of measure

• iot-facet: facets (what does it do)

Page 43: Semantic Metastandards will Unlock IoT Interoperability

HomeStar

• https://homestar.io/about

• https://github.com/dpjanes/iotdb-homestar

• complete reference implementation

Page 44: Semantic Metastandards will Unlock IoT Interoperability

HomeStar Modules• homestar-ble

• homestar-denon-avr

• homestar-feed

• homestar-firmata

• homestar-hue

• homestar-lg-smart-tv

• homestar-lifx

• homestar-littlebits

• homestar-rest

• homestar-smart-things

• homestar-sonos

• homestar-template

• homestar-tcp

• homestar-wemo

Page 45: Semantic Metastandards will Unlock IoT Interoperability

IoTQL

SET ostate:on = true WHERE iot:facet = "iot:lighting"

Page 46: Semantic Metastandards will Unlock IoT Interoperability

HomeStar App

Page 47: Semantic Metastandards will Unlock IoT Interoperability
Page 48: Semantic Metastandards will Unlock IoT Interoperability

Get in touch! David Janes

@[email protected]

http://iotdb.org/social/imadeit/