MQTT - REST Bridge using the Smart Object API
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

MQTT - REST Bridge using the Smart Object API

on

  • 2,589 views

 

Statistics

Views

Total Views
2,589
Views on SlideShare
2,527
Embed Views
62

Actions

Likes
4
Downloads
85
Comments
0

2 Embeds 62

https://twitter.com 57
http://www.linkedin.com 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

MQTT - REST Bridge using the Smart Object API Presentation Transcript

  • 1. MQTT  -­‐  REST  Bridge  using  the   Smart  Object  API   Open  Source  Internet  of  Things  
  • 2. SmartObject  API   Web  Object  EncapsulaBon     Smart  Object   Web  protocol  interfaces,  also  M2M  e.g.  MQTT   Event  Model   Links  data  with  acBons   Pub-­‐Sub  and  event  handlers   Encapsulates  local  soJware     components  and  handlers   Self-­‐describing  data  model   For  Resource  Discovery     and  Linkage   Sensor  or  other  data     JSON,  XML,  data  feeds  
  • 3. SmartObject  API  –  Observers   •  Contains  graphs  which  define  endpoints  of   event  driven  processing  and  communicaBon   •  The  Observer  paTern  is  the  basis  for  M2M   communicaBon  abstracBons   •  Publisher,  Subscriber,  Event  Handler  classes   •  Reference  ImplementaBon   – create  (POST)  makes  a  new  Observer     •  Publisher,  Subscriber,  or  Handler  Class   – set  (PUT)  updates  an  Observer’s  seZngs   – get  (GET)  returns  an  Observer’s  seZngs   – delete  (DELETE)  removes  an  Observer  
  • 4. MQTT  Observer   •  Implements  the  MQTT  M2M  AbstracBon  Layer   •  Publish,  Subscribe,  or  Pub+Sub  using  the   mqTObserver  resource  class   •  Prototype  opens  a  connecBon  to  a  specified   broker  for  each  REST  endpoint    Observers.create({'resourceName': 'mqttTestObserver',! ! ! ! ! ! 'resourceClass': 'mqttObserver',! 'connection': 'smartobjectservice.com',! 'pubTopic': ’sealevel_pressure',! 'subTopic': None,! 'QoS': 0,! 'keepAlive': 60 })!
  • 5. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   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  
  • 6. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   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  
  • 7. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   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  
  • 8. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   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  direcBons  
  • 9. MQTT  Bridge  to  mulBple  REST  endpoints   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  to  Other   Subscribers   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET  
  • 10. IoT  Toolkit   •  IoT  Toolkit  is  a  reference  implementaBon  of   the  Smart  Object  API  and  related  tools   •  REST  API  with  real-­‐Bme  event  model  for  the   Internet  of  Things   •  Lightweight  server  that  can  run  on  small   computers  e.g.  Raspberry  Pi   •  Work  in  progress  prototype  (limited  excepBon   handling  and  simple  interfaces)  
  • 11. IoT  2.0  –  Interoperability   M2M   CoAP   M2M   MQ   SOA   M2M   HTTP   Smart  Object  API   IoT  Toolkit   Discovery   ApplicaBons   Thing   Models   Resource   Models   •  Object  Model   •  REST  +  Event  Model   •  M2M  Abstrac<ons   IoT  Toolkit   Connected  Things,  Sensors,  Actuators,  Data  Sources   Seman?c   Repository   •  Easy  to  deploy  new   things  and   applicaBons  using  data   models   •  Write  once  run   anywhere,  any  app  to   any  thing  via  any  M2M   •  Network  effect   enabled   •  Allows  for  appropriate   M2M  choice  
  • 12. Interoperability  Architecture   SO   SO   SO   Gateway   Server   Cloud   Endpoints   •  Sensors   •  Devices   ApplicaBon     Components     And     Resources   Databases   Instances   Classes   SRT   • Discovery   • Persistence   • ReplicaBon   • Resource  Access   • Data  Models     • Sensor  Models   • Machine  Models   • Templates