SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
IoT	
  Toolkit	
  and	
  Smart	
  Object	
  API	
  
Tutorial	
  Introduc7on	
  
Open	
  Source	
  Internet	
  of	
  Things	
  
IoT	
  2.0	
  –	
  Interoperability	
  
M2M	
  
CoAP	
   M2M	
  
MQ	
   SOA	
  
M2M	
  
HTTP	
  
Smart	
  Object	
  API	
  
IoT	
  Toolkit	
  
Discovery	
  
Applica7ons	
  
Thing	
  
Models	
  
Resource	
  
Models	
  
•  Object	
  Model	
  
•  REST	
  +	
  Event	
  Model	
  
•  M2M	
  Abstrac<ons	
  
IoT	
  Toolkit	
  
Connected	
  Things,	
  Sensors,	
  Actuators,	
  Data	
  Sources	
  
Seman5c	
  
Repository	
  
•  Easy	
  to	
  deploy	
  new	
  
things	
  and	
  
applica7ons	
  using	
  data	
  
models	
  
•  Write	
  once	
  run	
  
anywhere,	
  any	
  app	
  to	
  
any	
  thing	
  via	
  any	
  M2M	
  
•  Network	
  effect	
  
enabled	
  
•  Allows	
  for	
  appropriate	
  
M2M	
  choice	
  
Interoperability	
  Architecture	
  
SO	
  
SO	
  
SO	
  
Gateway	
   Server	
  
Cloud	
  
Endpoints	
  
•  Sensors	
  
•  Devices	
  
Applica7on	
  	
  
Components	
  	
  
And	
  	
  
Resources	
  
Databases	
  
Instances	
  
Classes	
  
SRT	
  
• Discovery	
  
• Persistence	
  
• Replica7on	
  
• Resource	
  Access	
  
• Data	
  Models	
  	
  
• Sensor	
  Models	
  
• Machine	
  Models	
  
• Templates	
  
IoT	
  Toolkit	
  
•  IoT	
  Toolkit	
  is	
  a	
  reference	
  implementa7on	
  of	
  
the	
  Smart	
  Object	
  API	
  and	
  related	
  tools	
  
•  REST	
  API	
  with	
  real-­‐7me	
  event	
  model	
  for	
  the	
  
Internet	
  of	
  Things	
  
•  Lightweight	
  server	
  that	
  can	
  run	
  on	
  small	
  
computers	
  e.g.	
  Raspberry	
  Pi	
  
•  Work	
  in	
  progress	
  prototype	
  (limited	
  excep7on	
  
handling	
  and	
  simple	
  interfaces)	
  
Smart	
  Object	
  API	
  
•  Object	
  Model	
  –	
  Web	
  Object	
  Encapsula7on	
  	
  
•  Data	
  Models	
  –	
  Linked	
  Data	
  descrip7ons	
  
•  Event	
  Model	
  –	
  Asynchronous	
  M2M	
  and	
  
applica7on	
  soUware	
  event	
  handlers	
  
•  REST	
  API	
  using	
  JSON,	
  XML,	
  RDF	
  
representa7ons	
  
•  Web	
  standards	
  and	
  best	
  prac7ces	
  with	
  new	
  
extensions	
  
Object	
  Model	
  
Web	
  Object	
  Encapsula7on	
  	
  
Smart	
  Object	
  
Web	
  protocol	
  interfaces,	
  also	
  M2M	
  e.g.	
  MQTT	
  
Event	
  Model	
  
Links	
  data	
  with	
  ac7ons	
  
Pub-­‐Sub	
  and	
  event	
  handlers	
  
Encapsulates	
  local	
  soUware	
  	
  
components	
  and	
  handlers	
  
Self-­‐describing	
  data	
  model	
  
For	
  Resource	
  Discovery	
  	
  
and	
  Linkage	
  
Sensor	
  or	
  other	
  data	
  	
  
JSON,	
  XML,	
  data	
  feeds	
  
Smart	
  Object	
  Structure	
  –	
  Object	
  Model	
  
Smart	
  Object	
  
Descrip7on	
  
ObservableProperty	
  
ObservableProperty…	
  
Agent	
  
Publisher	
  
Subscriber	
  
Handler	
  
PropertyOfInterest	
  
Descrip7on	
  
Observers	
  
Handler	
  Instance	
  
Daemon	
  
Default	
  Property	
  
REST	
  API	
  
•  Python	
  API	
  –	
  Local	
  SoUware,	
  Agents	
  and	
  Handlers	
  
–  Resources	
  (objects)	
  are	
  hierarchical	
  proper7es	
  of	
  other	
  
resources	
  
–  self.indoorTempValue = sensors.weather.indoor_temp.get()!
•  Web	
  API	
  –	
  HYp	
  REST	
  Client	
  access	
  
–  Resources	
  are	
  organized	
  in	
  hierarchical	
  path	
  
–  GET http:my_server:8000/sensors/weather/indoor_temp!
•  Default	
  Property	
  
–  Returns	
  a	
  resource	
  associated	
  with	
  a	
  higher	
  level	
  resource	
  
–  GET	
  of	
  Smart	
  Object	
  returns	
  it’s	
  Descrip7on;	
  GET	
  of	
  
Observable	
  Property	
  returns	
  it’s	
  Observa7on	
  Value	
  
API	
  –	
  Descrip7on	
  (Data	
  Model)	
  
•  Contains	
  graphs	
  describing	
  the	
  resource	
  data	
  
model	
  	
  
•  RDF	
  in	
  many	
  popular	
  representa7ons	
  
– create	
  (POST)	
  loads	
  a	
  graph	
  into	
  the	
  descrip7on	
  
delete	
  (DELETE)	
  removes	
  a	
  graph	
  or	
  subgraph	
  from	
  
the	
  descrip7on	
  
– set	
  (PUT)	
  updates	
  a	
  graph	
  or	
  subgraph	
  
– get	
  (GET)	
  returns	
  a	
  graph	
  or	
  subgraph	
  
API	
  –	
  Observable	
  Property	
  	
  
•  Represents	
  sensor	
  data	
  or	
  a	
  data	
  feed	
  
•  Can	
  be	
  JSON,	
  xml,	
  text,	
  or	
  other	
  content	
  type	
  
– create	
  (POST):	
  make	
  new	
  observable	
  property	
  
– delete	
  (DELETE)	
  remove	
  observable	
  property	
  
– set	
  (PUT)	
  update	
  Observa7on	
  Value	
  or	
  data	
  feed	
  
– get	
  (GET)	
  returns	
  the	
  current	
  Observa7on	
  Value	
  
API	
  –	
  Observers	
  
•  Contains	
  graphs	
  which	
  define	
  endpoints	
  of	
  
event	
  driven	
  processing	
  
•  Publish,	
  Subscribe,	
  and	
  Event	
  Handler	
  paYerns	
  
•  Reference	
  Implementa7on	
  
– create	
  (POST)	
  makes	
  a	
  new	
  Observer	
  	
  
•  Publisher,	
  Subscriber,	
  or	
  Handler	
  Class	
  
– set	
  (PUT)	
  updates	
  an	
  Observer’s	
  seangs	
  
– get	
  (GET)	
  returns	
  an	
  Observer’s	
  seangs	
  
– delete	
  (DELETE)	
  removes	
  an	
  observer	
  graph	
  
API	
  –	
  Agent	
  
•  Container	
  for	
  Event	
  Handlers,	
  soUware	
  
components	
  invoked	
  within	
  the	
  local	
  context	
  of	
  
the	
  Smart	
  Object	
  
•  Observer	
  class	
  invokes	
  Event	
  Handler	
  code	
  
•  Reference	
  Implementa7on	
  
–  create	
  (POST)	
  makes	
  a	
  new	
  code	
  object	
  instance	
  
•  type	
  handler	
  or	
  daemon	
  
–  delete	
  (DELETE)	
  removes	
  	
  code	
  instance	
  
–  set	
  (PUT)	
  updates	
  seangs	
  of	
  a	
  code	
  instance	
  
–  get	
  (GET)	
  returns	
  seangs	
  of	
  a	
  code	
  instance	
  
Weather	
  Sensor	
  Example	
  
•  Weather	
  Sensor	
  hardware	
  from	
  Sparkfun	
  
•  Arduino	
  connects	
  hardware	
  sensors	
  to	
  
gateway	
  via	
  ethernet	
  
•  Raspberry	
  Pi	
  gateway	
  runs	
  Smart	
  Object	
  API	
  	
  
•  Arduino	
  uses	
  hYp	
  POST	
  of	
  JSON	
  value	
  to	
  
update	
  Smart	
  Object	
  Observable	
  Proper7es	
  
•  Smart	
  Object	
  built	
  using	
  python	
  code	
  	
  
Weather	
  sensor	
  example	
  
Sensor	
  
(Arduino)	
  
Gateway	
  
(Rpi)	
  
Sensor	
  Hardware	
  
•  Wind	
  Speed	
  
•  Wind	
  Direc7on	
  
•  Rainfall	
  
•  Temperature	
  
•  Humidity	
  
•  Barometer	
  
Reads	
  sensor	
  elements	
  and	
  creates	
  sensor	
  output	
  	
  
values	
  to	
  update	
  Smart	
  Object	
  in	
  the	
  Gateway	
  	
  
using	
  a	
  simple	
  hYp	
  client	
  
Gateway	
  runs	
  Smart	
  Object	
  API	
  and	
  exposes	
  HTTP	
  
	
  interface,	
  adds	
  descrip7onand	
  other	
  resources,	
  	
  
Observers	
  send	
  updates	
  to	
  cloud	
  server	
  
Local	
  
Ethernet	
  
Cloud	
  Server	
  acts	
  as	
  Gateway-­‐as-­‐a-­‐Service	
  for	
  Xively	
  
Receives	
  updates	
  from	
  the	
  gateway,	
  Observers	
  	
  
Send	
  periodic	
  updates	
  to	
  Xively	
  feed	
  
Cloud	
  	
  
Server	
  
Internet	
  
Client	
  
(Xively)	
  
Internet	
  
Xively	
  acts	
  as	
  client	
  applica7on	
  and	
  receives	
  	
  
updates	
  from	
  the	
  cloud	
  service	
  ac7ng	
  as	
  GaaS	
  
Arduino	
  Sketch	
  
	
  	
  	
  PString jsonObject(objectBuffer, sizeof(objectBuffer));!
!
   if(nextPushPoint==0) {!
     nextPushPoint=1;!
/* use Pstring.print to format JSON string from integer */!
     jsonObject.println(daily_rain,1); !
/* PUT update to Smart Object server property using JSON */!
     client.print("PUT ");!
     client.print(serverPath);!
     client.print(”daily_rain");!
     client.println(" HTTP/1.1");!
     client.println("Content-Type: application/json");!
     client.print("Content-Length: ");!
     client.println(jsonObject.length()-2);!
     client.println("Connection: close");!
     client.println();!
     client.println(jsonObject);!
   }!
Demo	
  Code	
  for	
  Weather	
  Sensor	
  –	
  
Smart	
  Object	
  and	
  Service	
  Crea7on	
  
	
  	
  baseObject	
  =	
  SmartObject()	
  #	
  create	
  a	
  Smart	
  Object	
  to	
  serve	
  as	
  the	
  base	
  container	
  
for	
  other	
  Smart	
  Objects	
  and	
  resources	
  
	
  	
  	
  	
  server	
  =	
  SmartObjectService(baseObject)	
  #	
  make	
  an	
  instance	
  of	
  the	
  service,	
  
baseObject	
  is	
  the	
  object	
  root	
  
	
  	
  	
  	
  server.start(8000)	
  #	
  forks	
  a	
  server	
  thread	
  to	
  listen	
  on	
  port	
  8000	
  
	
  	
  	
  	
  print	
  'hDpd	
  started	
  at',	
  baseObject.Proper<es.get('hDpService’)	
  
	
  
#	
  top	
  level	
  object	
  container	
  for	
  sensors,	
  class	
  is	
  SmartObject	
  
sensors	
  =	
  baseObject.create({'resourceName':	
  'sensors',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
  	
  	
  	
  	
  	
  	
  'resourceClass':	
  'SmartObject'})	
  
	
  
#weather	
  sensor	
  Smart	
  Object	
  under	
  sensors	
  for	
  the	
  weather	
  sensor	
  	
  	
  	
  	
  
	
  	
  	
  	
  weather	
  =	
  sensors.create({'resourceName':	
  'rhvWeather-­‐01',	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  	
  	
  	
  'resourceClass':	
  'SmartObject’}!
Data	
  Model	
  –	
  Descrip7on	
  	
  
for	
  object	
  discovery	
  and	
  linkage	
  
	
  	
  	
  #	
  make	
  a	
  reference	
  to	
  the	
  weather	
  sensor	
  object	
  Descrip7on	
  and	
  build	
  an	
  example	
  
graph	
  (could	
  use	
  the	
  built-­‐in	
  reference	
  as	
  well)	
  
	
  	
  	
  	
  weather.descrip7on	
  =	
  weather.Resources.get('Descrip<on')	
  
	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_temperature'),	
  
RDFS.Resource,	
  Literal('sensor')))	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_temperature'),	
  
RDF.type,	
  Literal('temperature')))	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_humidity'),	
  
RDFS.Resource,	
  Literal('sensor')))	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_humidity'),	
  
RDF.type,	
  Literal('humidity')))	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/sealevel_pressure'),	
  
RDFS.Resource,	
  Literal('sensor')))	
  
	
  	
  	
  	
  weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/sealevel_pressure'),	
  
RDF.type,	
  Literal('pressure')))!
Encapsula7on:	
  Observable	
  Property,	
  
Observer,	
  and	
  Subscriber	
  
	
  sealevel_pressure	
  =	
  weather.create({'resourceName':	
  'sealevel_pressure',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  'resourceClass':	
  'ObservableProperty'})	
  
	
  	
  	
  	
  	
  
	
  	
  sealevel_pressure.Observers.create({'resourceName':'demoServiceObserver',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  'resourceClass':	
  'hDpPublisher',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  'targetURI':	
  'hDp://smartobjectservice.com:
	
   	
   	
   	
   	
   	
   	
  8000/sensors/rhvWeather-­‐01/sealevel_pressure'})	
  
	
  
	
  #	
  make	
  a	
  named	
  subscriber	
  resource	
  
	
  	
  	
  	
  outdoor_humidity.Observers.create({'resourceName':	
  'humiditySubscriber',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'resourceClass':	
  'hDpSubscriber',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'observerURI':	
  'hDp://localhost:8000/sensors/rhvWeather-­‐01/
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  indoor_humidity',	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'observerName':	
  'humiditySubObserver'	
  })	
  
Event	
  Model	
  –	
  
Xively	
  Publisher	
  -­‐	
  Observer	
  
sealevel_pressure.Observers.create({'resourceName':	
  'xivelyObserver',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  'resourceClass':	
  'xivelyPublisher',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  'apiBase':	
  'hDps://api.xively.com/v2/feeds',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  'feedID':	
  '2141862995',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  'streamID':	
  'sealevel_pressure’,	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
   	
   	
   	
   	
   	
   	
  	
  'apiKey’:'QYourApiKeyGoesHEresjhgrjgo56',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
   	
  	
  'updateInterval':	
  pushInterval	
  })	
  
	
  
Event	
  Model	
  –	
  
Handler	
  and	
  Callback	
  No7fier	
  
	
  	
  #addHandler	
  class	
  adds	
  2	
  proper7es	
  values	
  together	
  and	
  stores	
  in	
  a	
  third	
  
	
  	
  	
  	
  weather.Agent.create({'resourceName':	
  'addHandler',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'resourceClass':	
  'addHandler',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'addendLink1':'sensors/rhvWeather-­‐01/indoor_temperature',	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'addendLink2':	
  'sensors/rhvWeather-­‐01/indoor_temperature',	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'sumOutLink':	
  'sensors/rhvWeather-­‐01/outdoor_humidity'})	
  
	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  #	
  now	
  create	
  a	
  callback	
  observer	
  endpoint	
  	
  
	
  	
  	
  	
  indoor_temperature.Observers.create({'resourceName':	
  'callbackTempObserver',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'resourceClass':	
  'callbackNo<fier',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'handlerURI':	
  'callback:///sensors/rhvWeather-­‐01/Agent/
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  addHandler'})	
  
IoT	
  Toolkit	
  Project	
  
•  Smart	
  Object	
  API	
  is	
  nominally	
  complete	
  and	
  
stable	
  
•  Development	
  priori7es	
  
–  Web	
  UI	
  for	
  debug	
  and	
  demo,	
  simple	
  applica7ons	
  
•  Navigator,	
  Dashboard,	
  Analy7cs,	
  Graphs	
  and	
  Charts	
  
–  M2M	
  Endpoints	
  for	
  CoAP,	
  MQTT,	
  and	
  others	
  
–  Test	
  code	
  for	
  API	
  	
  
–  Internal	
  features	
  development	
  
•  Build	
  SmartObject	
  Instances	
  from	
  Resource	
  Models	
  
•  Object	
  Persistence	
  
•  Data	
  persistence	
  and	
  storage	
  
MQTT	
  Observer	
  
•  Publish,	
  Subscribe,	
  or	
  Pub+Sub	
  using	
  the	
  
mqYObserver	
  resource	
  class	
  
•  Prototype	
  opens	
  a	
  connec7on	
  to	
  a	
  specified	
  
broker	
  for	
  each	
  endpoint	
  
	
  
Observers.create({'resourceName': 'mqttTestObserver',!
! ! ! ! ! 'resourceClass': 'mqttObserver',!
'connection': 'smartobjectservice.com',!
'pubTopic': ’sealevel_pressure',!
'subTopic': None,!
'QoS': 0,!
'keepAlive': 60 })!
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Connects	
  REST	
  Resource	
  to	
  MQTT	
  Topic	
  
Publish	
  and	
  Subscribe	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Publisher	
  	
  
Publishes	
  REST	
  Resource	
  updates	
  to	
  the	
  broker	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Subscriber	
  	
  
Makes	
  last	
  published	
  data	
  available	
  at	
  the	
  REST	
  endpoint	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Pub+Sub	
  
Repeats	
  data	
  updates	
  in	
  both	
  direc7ons	
  
MQTT	
  Bridge	
  to	
  mul7ple	
  REST	
  endpoints	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  to	
  Other	
  
Subscribers	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqYObserver	
  
PUT	
   GET	
  

Contenu connexe

Tendances

CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thSudhindra Mudhol
 
Digital in Italia 2018
Digital in Italia 2018Digital in Italia 2018
Digital in Italia 2018We Are Social
 
Cross platform app development with flutter
Cross platform app development with flutterCross platform app development with flutter
Cross platform app development with flutterHwan Jo
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & viewsma-polimi
 
IOT Unit-1 (Introduction to IOT) by Durgacharan
IOT Unit-1 (Introduction to IOT) by DurgacharanIOT Unit-1 (Introduction to IOT) by Durgacharan
IOT Unit-1 (Introduction to IOT) by DurgacharanDurgacharan Kondabathula
 
Meta-Classes in Python
Meta-Classes in PythonMeta-Classes in Python
Meta-Classes in PythonGuy Wiener
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)Partnered Health
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙
 
Internet of things
Internet of thingsInternet of things
Internet of thingsBrockanurag
 
Android sensors
Android sensorsAndroid sensors
Android sensorsdatta_jini
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of thingsPankesh Patel
 
Building beautiful apps with Google flutter
Building beautiful apps with Google flutterBuilding beautiful apps with Google flutter
Building beautiful apps with Google flutterAhmed Abu Eldahab
 

Tendances (20)

Python basic
Python basicPython basic
Python basic
 
CS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12thCS Project-Source code for shopping inventory for CBSE 12th
CS Project-Source code for shopping inventory for CBSE 12th
 
Digital in Italia 2018
Digital in Italia 2018Digital in Italia 2018
Digital in Italia 2018
 
Cross platform app development with flutter
Cross platform app development with flutterCross platform app development with flutter
Cross platform app development with flutter
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
IOT Unit-1 (Introduction to IOT) by Durgacharan
IOT Unit-1 (Introduction to IOT) by DurgacharanIOT Unit-1 (Introduction to IOT) by Durgacharan
IOT Unit-1 (Introduction to IOT) by Durgacharan
 
Meta-Classes in Python
Meta-Classes in PythonMeta-Classes in Python
Meta-Classes in Python
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
Low Level Design
Low Level DesignLow Level Design
Low Level Design
 
NPM
NPMNPM
NPM
 
Web of Things
Web of ThingsWeb of Things
Web of Things
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
 
Flutter vs React Native 2019
Flutter vs React Native 2019Flutter vs React Native 2019
Flutter vs React Native 2019
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
AutoMapper
AutoMapperAutoMapper
AutoMapper
 
Django
DjangoDjango
Django
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
 
Android sensors
Android sensorsAndroid sensors
Android sensors
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of things
 
Building beautiful apps with Google flutter
Building beautiful apps with Google flutterBuilding beautiful apps with Google flutter
Building beautiful apps with Google flutter
 

En vedette

Tools for the Open Source Internet of Things
Tools for the Open Source Internet of ThingsTools for the Open Source Internet of Things
Tools for the Open Source Internet of ThingsMichael Koster
 
Iot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityIot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoMichael Koster
 
Innovating with IoT: A Toolkit Approach
Innovating with IoT: A Toolkit ApproachInnovating with IoT: A Toolkit Approach
Innovating with IoT: A Toolkit ApproachAtanu Roy Chowdhury
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoTMichael Koster
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitMichael Koster
 
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...SisInfLab-SWoT @Politecnico di Bari
 
REST APIs for the Internet of Things
REST APIs for the Internet of ThingsREST APIs for the Internet of Things
REST APIs for the Internet of ThingsMichael Koster
 
ARM CoAP Tutorial
ARM CoAP TutorialARM CoAP Tutorial
ARM CoAP Tutorialzdshelby
 
CoAP, Copper, and Embedded Web Resources
CoAP, Copper, and Embedded Web ResourcesCoAP, Copper, and Embedded Web Resources
CoAP, Copper, and Embedded Web ResourcesMatthias Kovatsch
 
Hotel Booking System by Template124
Hotel Booking System by Template124Hotel Booking System by Template124
Hotel Booking System by Template124Template124
 
Internet of Things Architecture / Topology
Internet of Things Architecture / TopologyInternet of Things Architecture / Topology
Internet of Things Architecture / TopologyNEEVEE Technologies
 

En vedette (16)

Tools for the Open Source Internet of Things
Tools for the Open Source Internet of ThingsTools for the Open Source Internet of Things
Tools for the Open Source Internet of Things
 
Iot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityIot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for Interoperability
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
Innovating with IoT: A Toolkit Approach
Innovating with IoT: A Toolkit ApproachInnovating with IoT: A Toolkit Approach
Innovating with IoT: A Toolkit Approach
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
Iottoolkit osiot
Iottoolkit osiotIottoolkit osiot
Iottoolkit osiot
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoT
 
Iottoolkit wot
Iottoolkit wotIottoolkit wot
Iottoolkit wot
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
 
REST APIs for the Internet of Things
REST APIs for the Internet of ThingsREST APIs for the Internet of Things
REST APIs for the Internet of Things
 
ARM CoAP Tutorial
ARM CoAP TutorialARM CoAP Tutorial
ARM CoAP Tutorial
 
CoAP, Copper, and Embedded Web Resources
CoAP, Copper, and Embedded Web ResourcesCoAP, Copper, and Embedded Web Resources
CoAP, Copper, and Embedded Web Resources
 
Hotel Booking System by Template124
Hotel Booking System by Template124Hotel Booking System by Template124
Hotel Booking System by Template124
 
Internet of Things Architecture / Topology
Internet of Things Architecture / TopologyInternet of Things Architecture / Topology
Internet of Things Architecture / Topology
 
IoT architecture
IoT architectureIoT architecture
IoT architecture
 

Similaire à IoT Toolkit Tutorial: Build Connected Things with Smart Object API

M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitMichael Koster
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperabilityMichael Koster
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...Michael Koster
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Michael Koster
 
MQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMichael Koster
 
MQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object APIMQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object APIMichael Koster
 
CCNA-Open-Platform-IoT
CCNA-Open-Platform-IoTCCNA-Open-Platform-IoT
CCNA-Open-Platform-IoTMichael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoMichael Koster
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityMichael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoMichael Koster
 
A Modular Open Source Platform for IoT
A Modular Open Source Platform for IoTA Modular Open Source Platform for IoT
A Modular Open Source Platform for IoTMichael Koster
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityMichael Koster
 
From System Engineer to Gopher
From System Engineer to GopherFrom System Engineer to Gopher
From System Engineer to GopherI-Fan Wang
 
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...Jeff Hung
 
Android application architecture
Android application architectureAndroid application architecture
Android application architectureRomain Rochegude
 
Web of Things to the edge
Web of Things to the edgeWeb of Things to the edge
Web of Things to the edgeMichael Koster
 

Similaire à IoT Toolkit Tutorial: Build Connected Things with Smart Object API (20)

M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperability
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
 
MQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object API
 
MQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object APIMQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object API
 
CCNA-Open-Platform-IoT
CCNA-Open-Platform-IoTCCNA-Open-Platform-IoT
CCNA-Open-Platform-IoT
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
A Modular Open Source Platform for IoT
A Modular Open Source Platform for IoTA Modular Open Source Platform for IoT
A Modular Open Source Platform for IoT
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
 
AWS IoT Deep Dive
AWS IoT Deep DiveAWS IoT Deep Dive
AWS IoT Deep Dive
 
Ipso eclipse-summary
Ipso eclipse-summaryIpso eclipse-summary
Ipso eclipse-summary
 
Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
From System Engineer to Gopher
From System Engineer to GopherFrom System Engineer to Gopher
From System Engineer to Gopher
 
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
 
Android application architecture
Android application architectureAndroid application architecture
Android application architecture
 
Web of Things to the edge
Web of Things to the edgeWeb of Things to the edge
Web of Things to the edge
 

Plus de Michael Koster

Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsMichael Koster
 
Hypermedia design for machine apis
Hypermedia design for machine apisHypermedia design for machine apis
Hypermedia design for machine apisMichael Koster
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIsMichael Koster
 
Ipso smart objects for iot
Ipso smart objects for iotIpso smart objects for iot
Ipso smart objects for iotMichael Koster
 
Ipso application templates
Ipso application templatesIpso application templates
Ipso application templatesMichael Koster
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminarMichael Koster
 
REST APIs for an Internet of Things
REST APIs for an Internet of ThingsREST APIs for an Internet of Things
REST APIs for an Internet of ThingsMichael Koster
 
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki KeynoteThe Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki KeynoteMichael Koster
 
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013Michael Koster
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoTMichael Koster
 
Friend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOTFriend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOTMichael Koster
 

Plus de Michael Koster (14)

Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
Hypermedia design for machine apis
Hypermedia design for machine apisHypermedia design for machine apis
Hypermedia design for machine apis
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIs
 
Embedded to connected
Embedded to connectedEmbedded to connected
Embedded to connected
 
Osiot14 buildout
Osiot14 buildoutOsiot14 buildout
Osiot14 buildout
 
Osiot13 IoT buildout
Osiot13 IoT buildoutOsiot13 IoT buildout
Osiot13 IoT buildout
 
Ipso smart objects for iot
Ipso smart objects for iotIpso smart objects for iot
Ipso smart objects for iot
 
Ipso application templates
Ipso application templatesIpso application templates
Ipso application templates
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
 
REST APIs for an Internet of Things
REST APIs for an Internet of ThingsREST APIs for an Internet of Things
REST APIs for an Internet of Things
 
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki KeynoteThe Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
 
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoT
 
Friend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOTFriend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOT
 

Dernier

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 

Dernier (11)

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 

IoT Toolkit Tutorial: Build Connected Things with Smart Object API

  • 1. IoT  Toolkit  and  Smart  Object  API   Tutorial  Introduc7on   Open  Source  Internet  of  Things  
  • 2. IoT  2.0  –  Interoperability   M2M   CoAP   M2M   MQ   SOA   M2M   HTTP   Smart  Object  API   IoT  Toolkit   Discovery   Applica7ons   Thing   Models   Resource   Models   •  Object  Model   •  REST  +  Event  Model   •  M2M  Abstrac<ons   IoT  Toolkit   Connected  Things,  Sensors,  Actuators,  Data  Sources   Seman5c   Repository   •  Easy  to  deploy  new   things  and   applica7ons  using  data   models   •  Write  once  run   anywhere,  any  app  to   any  thing  via  any  M2M   •  Network  effect   enabled   •  Allows  for  appropriate   M2M  choice  
  • 3. Interoperability  Architecture   SO   SO   SO   Gateway   Server   Cloud   Endpoints   •  Sensors   •  Devices   Applica7on     Components     And     Resources   Databases   Instances   Classes   SRT   • Discovery   • Persistence   • Replica7on   • Resource  Access   • Data  Models     • Sensor  Models   • Machine  Models   • Templates  
  • 4. IoT  Toolkit   •  IoT  Toolkit  is  a  reference  implementa7on  of   the  Smart  Object  API  and  related  tools   •  REST  API  with  real-­‐7me  event  model  for  the   Internet  of  Things   •  Lightweight  server  that  can  run  on  small   computers  e.g.  Raspberry  Pi   •  Work  in  progress  prototype  (limited  excep7on   handling  and  simple  interfaces)  
  • 5. Smart  Object  API   •  Object  Model  –  Web  Object  Encapsula7on     •  Data  Models  –  Linked  Data  descrip7ons   •  Event  Model  –  Asynchronous  M2M  and   applica7on  soUware  event  handlers   •  REST  API  using  JSON,  XML,  RDF   representa7ons   •  Web  standards  and  best  prac7ces  with  new   extensions  
  • 6. Object  Model   Web  Object  Encapsula7on     Smart  Object   Web  protocol  interfaces,  also  M2M  e.g.  MQTT   Event  Model   Links  data  with  ac7ons   Pub-­‐Sub  and  event  handlers   Encapsulates  local  soUware     components  and  handlers   Self-­‐describing  data  model   For  Resource  Discovery     and  Linkage   Sensor  or  other  data     JSON,  XML,  data  feeds  
  • 7. Smart  Object  Structure  –  Object  Model   Smart  Object   Descrip7on   ObservableProperty   ObservableProperty…   Agent   Publisher   Subscriber   Handler   PropertyOfInterest   Descrip7on   Observers   Handler  Instance   Daemon   Default  Property  
  • 8. REST  API   •  Python  API  –  Local  SoUware,  Agents  and  Handlers   –  Resources  (objects)  are  hierarchical  proper7es  of  other   resources   –  self.indoorTempValue = sensors.weather.indoor_temp.get()! •  Web  API  –  HYp  REST  Client  access   –  Resources  are  organized  in  hierarchical  path   –  GET http:my_server:8000/sensors/weather/indoor_temp! •  Default  Property   –  Returns  a  resource  associated  with  a  higher  level  resource   –  GET  of  Smart  Object  returns  it’s  Descrip7on;  GET  of   Observable  Property  returns  it’s  Observa7on  Value  
  • 9. API  –  Descrip7on  (Data  Model)   •  Contains  graphs  describing  the  resource  data   model     •  RDF  in  many  popular  representa7ons   – create  (POST)  loads  a  graph  into  the  descrip7on   delete  (DELETE)  removes  a  graph  or  subgraph  from   the  descrip7on   – set  (PUT)  updates  a  graph  or  subgraph   – get  (GET)  returns  a  graph  or  subgraph  
  • 10. API  –  Observable  Property     •  Represents  sensor  data  or  a  data  feed   •  Can  be  JSON,  xml,  text,  or  other  content  type   – create  (POST):  make  new  observable  property   – delete  (DELETE)  remove  observable  property   – set  (PUT)  update  Observa7on  Value  or  data  feed   – get  (GET)  returns  the  current  Observa7on  Value  
  • 11. API  –  Observers   •  Contains  graphs  which  define  endpoints  of   event  driven  processing   •  Publish,  Subscribe,  and  Event  Handler  paYerns   •  Reference  Implementa7on   – create  (POST)  makes  a  new  Observer     •  Publisher,  Subscriber,  or  Handler  Class   – set  (PUT)  updates  an  Observer’s  seangs   – get  (GET)  returns  an  Observer’s  seangs   – delete  (DELETE)  removes  an  observer  graph  
  • 12. API  –  Agent   •  Container  for  Event  Handlers,  soUware   components  invoked  within  the  local  context  of   the  Smart  Object   •  Observer  class  invokes  Event  Handler  code   •  Reference  Implementa7on   –  create  (POST)  makes  a  new  code  object  instance   •  type  handler  or  daemon   –  delete  (DELETE)  removes    code  instance   –  set  (PUT)  updates  seangs  of  a  code  instance   –  get  (GET)  returns  seangs  of  a  code  instance  
  • 13. Weather  Sensor  Example   •  Weather  Sensor  hardware  from  Sparkfun   •  Arduino  connects  hardware  sensors  to   gateway  via  ethernet   •  Raspberry  Pi  gateway  runs  Smart  Object  API     •  Arduino  uses  hYp  POST  of  JSON  value  to   update  Smart  Object  Observable  Proper7es   •  Smart  Object  built  using  python  code    
  • 14. Weather  sensor  example   Sensor   (Arduino)   Gateway   (Rpi)   Sensor  Hardware   •  Wind  Speed   •  Wind  Direc7on   •  Rainfall   •  Temperature   •  Humidity   •  Barometer   Reads  sensor  elements  and  creates  sensor  output     values  to  update  Smart  Object  in  the  Gateway     using  a  simple  hYp  client   Gateway  runs  Smart  Object  API  and  exposes  HTTP    interface,  adds  descrip7onand  other  resources,     Observers  send  updates  to  cloud  server   Local   Ethernet   Cloud  Server  acts  as  Gateway-­‐as-­‐a-­‐Service  for  Xively   Receives  updates  from  the  gateway,  Observers     Send  periodic  updates  to  Xively  feed   Cloud     Server   Internet   Client   (Xively)   Internet   Xively  acts  as  client  applica7on  and  receives     updates  from  the  cloud  service  ac7ng  as  GaaS  
  • 15. Arduino  Sketch        PString jsonObject(objectBuffer, sizeof(objectBuffer));! !    if(nextPushPoint==0) {!      nextPushPoint=1;! /* use Pstring.print to format JSON string from integer */!      jsonObject.println(daily_rain,1); ! /* PUT update to Smart Object server property using JSON */!      client.print("PUT ");!      client.print(serverPath);!      client.print(”daily_rain");!      client.println(" HTTP/1.1");!      client.println("Content-Type: application/json");!      client.print("Content-Length: ");!      client.println(jsonObject.length()-2);!      client.println("Connection: close");!      client.println();!      client.println(jsonObject);!    }!
  • 16. Demo  Code  for  Weather  Sensor  –   Smart  Object  and  Service  Crea7on      baseObject  =  SmartObject()  #  create  a  Smart  Object  to  serve  as  the  base  container   for  other  Smart  Objects  and  resources          server  =  SmartObjectService(baseObject)  #  make  an  instance  of  the  service,   baseObject  is  the  object  root          server.start(8000)  #  forks  a  server  thread  to  listen  on  port  8000          print  'hDpd  started  at',  baseObject.Proper<es.get('hDpService’)     #  top  level  object  container  for  sensors,  class  is  SmartObject   sensors  =  baseObject.create({'resourceName':  'sensors',                                                                                  'resourceClass':  'SmartObject'})     #weather  sensor  Smart  Object  under  sensors  for  the  weather  sensor                  weather  =  sensors.create({'resourceName':  'rhvWeather-­‐01',                                                                          'resourceClass':  'SmartObject’}!
  • 17. Data  Model  –  Descrip7on     for  object  discovery  and  linkage        #  make  a  reference  to  the  weather  sensor  object  Descrip7on  and  build  an  example   graph  (could  use  the  built-­‐in  reference  as  well)          weather.descrip7on  =  weather.Resources.get('Descrip<on')            weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_temperature'),   RDFS.Resource,  Literal('sensor')))          weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_temperature'),   RDF.type,  Literal('temperature')))          weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_humidity'),   RDFS.Resource,  Literal('sensor')))          weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/outdoor_humidity'),   RDF.type,  Literal('humidity')))          weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/sealevel_pressure'),   RDFS.Resource,  Literal('sensor')))          weather.descrip7on.set((URIRef('sensors/rhvWeather-­‐01/sealevel_pressure'),   RDF.type,  Literal('pressure')))!
  • 18. Encapsula7on:  Observable  Property,   Observer,  and  Subscriber    sealevel_pressure  =  weather.create({'resourceName':  'sealevel_pressure',                                                                                      'resourceClass':  'ObservableProperty'})                sealevel_pressure.Observers.create({'resourceName':'demoServiceObserver',                                                                                          'resourceClass':  'hDpPublisher',                                                                                          'targetURI':  'hDp://smartobjectservice.com:              8000/sensors/rhvWeather-­‐01/sealevel_pressure'})      #  make  a  named  subscriber  resource          outdoor_humidity.Observers.create({'resourceName':  'humiditySubscriber',                                                                                  'resourceClass':  'hDpSubscriber',                                                                                  'observerURI':  'hDp://localhost:8000/sensors/rhvWeather-­‐01/                          indoor_humidity',                                                                                    'observerName':  'humiditySubObserver'  })  
  • 19. Event  Model  –   Xively  Publisher  -­‐  Observer   sealevel_pressure.Observers.create({'resourceName':  'xivelyObserver',                                                                                        'resourceClass':  'xivelyPublisher',                                                                                        'apiBase':  'hDps://api.xively.com/v2/feeds',                                                                                        'feedID':  '2141862995',                                                                                        'streamID':  'sealevel_pressure’,                                                                                      'apiKey’:'QYourApiKeyGoesHEresjhgrjgo56',                                                                                        'updateInterval':  pushInterval  })    
  • 20. Event  Model  –   Handler  and  Callback  No7fier      #addHandler  class  adds  2  proper7es  values  together  and  stores  in  a  third          weather.Agent.create({'resourceName':  'addHandler',                                                    'resourceClass':  'addHandler',                                                    'addendLink1':'sensors/rhvWeather-­‐01/indoor_temperature',                                                      'addendLink2':  'sensors/rhvWeather-­‐01/indoor_temperature',                                                      'sumOutLink':  'sensors/rhvWeather-­‐01/outdoor_humidity'})                        #  now  create  a  callback  observer  endpoint            indoor_temperature.Observers.create({'resourceName':  'callbackTempObserver',                                                                                    'resourceClass':  'callbackNo<fier',                                                                                    'handlerURI':  'callback:///sensors/rhvWeather-­‐01/Agent/                            addHandler'})  
  • 21. IoT  Toolkit  Project   •  Smart  Object  API  is  nominally  complete  and   stable   •  Development  priori7es   –  Web  UI  for  debug  and  demo,  simple  applica7ons   •  Navigator,  Dashboard,  Analy7cs,  Graphs  and  Charts   –  M2M  Endpoints  for  CoAP,  MQTT,  and  others   –  Test  code  for  API     –  Internal  features  development   •  Build  SmartObject  Instances  from  Resource  Models   •  Object  Persistence   •  Data  persistence  and  storage  
  • 22. MQTT  Observer   •  Publish,  Subscribe,  or  Pub+Sub  using  the   mqYObserver  resource  class   •  Prototype  opens  a  connec7on  to  a  specified   broker  for  each  endpoint     Observers.create({'resourceName': 'mqttTestObserver',! ! ! ! ! ! 'resourceClass': 'mqttObserver',! 'connection': 'smartobjectservice.com',! 'pubTopic': ’sealevel_pressure',! 'subTopic': None,! 'QoS': 0,! 'keepAlive': 60 })!
  • 23. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Connects  REST  Resource  to  MQTT  Topic   Publish  and  Subscribe  
  • 24. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Publisher     Publishes  REST  Resource  updates  to  the  broker  
  • 25. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Subscriber     Makes  last  published  data  available  at  the  REST  endpoint  
  • 26. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Pub+Sub   Repeats  data  updates  in  both  direc7ons  
  • 27. MQTT  Bridge  to  mul7ple  REST  endpoints   MQTT  Broker   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET   Publish  from   data  producer   Publish  to  Other   Subscribers   REST  Endpoint   ObservableProperty   mqYObserver   PUT   GET