building internet of things applications with compose and

63
Building Internet of Things applica5ons with COMPOSE and JavaScript Charalampos Doukas @buildingiot

Upload: lyhanh

Post on 10-Feb-2017

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Building Internet of Things applications with COMPOSE and

 Building  Internet  of  Things  applica5ons  with  COMPOSE  and  JavaScript  Charalampos  Doukas  @buildingiot  

Page 2: Building Internet of Things applications with COMPOSE and

PART  A  –  Some  Basics  

Building  Internet  of  Things  applica5ons  with  COMPOSE  and  JavaScript  

Page 3: Building Internet of Things applications with COMPOSE and

IoT:  The  main  components  

Devices  –  ‘Smart  Objects’  –  ‘Things’  

Networks  

Online  Services  

Page 4: Building Internet of Things applications with COMPOSE and

Devices  

•  Prototyping  plaIorms  (some  IoT  oriented)  •  Arduino  (….)  

–  hNp://postscapes.com/arduino-­‐wifi  

•  openPicus  Flyport  (WiFi,  Ethernet,  GPRS,  Enocean)  •  Libelium  Waspmote  •  mBed  by  ARM  •  Pinocc.io  (mesh  network  support,  RF+WiFi)  •  Spark  core  (WiFi)  •  Electric  Imp  •  Tessel  (WiFi,  Node.js)    

Page 5: Building Internet of Things applications with COMPOSE and

Devices    

•  SODAQ  (WiFi,  Xbee,  ..)  •  XinoRF  •  PanStamps  •  Intel  boards  •  TI  CC3200  Evalua5on  board  •  Domain  specific  

–  BITalino  (Wearables)  –  Thingsquare  –  FluNer  

hNp://postscapes.com/internet-­‐of-­‐things-­‐diy  hNp://postscapes.com/internet-­‐of-­‐things-­‐hardware    

Page 6: Building Internet of Things applications with COMPOSE and

Gateways  

•  Why  do  I  need  a  gateway?  

•  RaspberryPi  –  hNp://postscapes.com/raspberry-­‐pi-­‐wireless-­‐op5ons  

•  BeagleBone  •  UDOO  •  Intel  Galileo  •  Commercial:  

–  SmartThings  

Page 7: Building Internet of Things applications with COMPOSE and

Sensors  &  Actuators  

•  Gas  &  Air  quality  •  Barometric  pressure  •  Temperature  &  Humidity  •  Light  &  Sound  •  Mo5on  •  Flex  &  Force  •  Posi5on  •  Magne5c  fields  •  Electricity  •  Biometrics  

Page 8: Building Internet of Things applications with COMPOSE and

Sensors  &  Actuators  

•  Proximity  &  Presence  •  Weight  •  Liquids  &  Liquid  flow  •  Radia5on  •  …  

Page 9: Building Internet of Things applications with COMPOSE and

Sensors  &  Actuators  

•  Move  things  (motors)  •  Ac5vate  (switches)  •  Interfaces  

–  Sound  –  Light  –  Displays  

•  Remote  interfaces  –  Social  –  Email,  text,  …  –  Phone  (twillio)  

Page 10: Building Internet of Things applications with COMPOSE and

Sofware  

•  Standard  IDEs  –  Arduino  IDE  –  Eclipse  

•  Code  –  less:  –  Scratch  

•  Cloud-­‐based  –  Codebender  (codebender.cc)  –  Spark.io  

•  Browser-­‐based  –  mBed  –  Electron  –  Noduino  –  …  

Page 11: Building Internet of Things applications with COMPOSE and

Workflow  -­‐  based  

•  Node-­‐RED  

Page 12: Building Internet of Things applications with COMPOSE and

Networks  

Page 13: Building Internet of Things applications with COMPOSE and

Protocols  

•  Web  based:  •  HTTP  

–  REST  – WebSockets  

•  M2M  (lower  resources  +  actua5on)  – MQTT  –  CoAP  -­‐  LWM2M  –  XMPP  –  STOMP  –  …  

Page 14: Building Internet of Things applications with COMPOSE and

Online  Services  

•  Sensor  Data  –  Pachube/Cosm/Xively  –  Paraimpu  –  TheThingsystem.io  

•  Device  Management    •  Full  PaaS  

Page 15: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Why  JavaScript?  

Page 16: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Why  JavaScript?  

Page 17: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Why  JavaScript?  

Page 18: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Why  JavaScript?  

Page 19: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Noduino  •  A  simple  and  flexible  JavaScript  and  Node.js  Framework  for  

accessing  basic  Arduino  controls  from  Web  Applica5ons  using  HTML5,  Socket.IO  and  Node.js  

Page 20: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Device.js  •  DeviceJS  is  a  JavaScript  based  development  plaIorm  for  

reac5ng  to  sensors  and  controlling  devices.  It’s  built  on  top  of  Google’s  V8  JavaScript  engine,  Node.js  and  a  real-­‐5me  JSON  database  

Page 21: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Node-­‐RED  

–  Node-­‐RED  is  a  tool  for  wiring  together  hardware  devices,  APIs  and  online  services  

–  Web-­‐based  –  O/S  

Page 22: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Node-­‐RED  

Page 23: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Node-­‐RED  •  Nodes  available:  

 Over  40    user  contributed    nodes  

Page 24: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

SoAware  •  Node-­‐RED  

Page 25: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Hardware  •  Tessel  

–  180mhz  ARM  Cortex-­‐M3  LPC1830  –  32mb  SDRAM  –  32mb  Flash  –  TI  CC3000  Wifi  Radio  –  16-­‐pin  GPIO  bank  for  prototyping  –  Open  source  code,  open  source  hardware  –  NPM  module  support  

Page 26: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Hardware  •  Tessel  

Page 27: Building Internet of Things applications with COMPOSE and

IoT  &  JavaScript  

Hardware  •  Espruino  

–  TM32  32-­‐bit  72MHz  ARM  Cortex  M3  CPU  –  256KB  of  Flash  memory,  48KB  of  RAM  –  44  GPIO  Pins  –  WiFi  Support  with  the  TI  CC3000  –  Open  source  code,  open  source  hardware  –  Web-­‐based  IDE  –  Code-­‐less  IDE  

Page 28: Building Internet of Things applications with COMPOSE and

Building  IoT  Applica5ons  

What  else  does  it  take?  

Devices  –  ‘Smart  Objects’  –  ‘Things’  

Networks  

Online  Services  

Page 29: Building Internet of Things applications with COMPOSE and

Building  IoT  Applica5ons  

What  else  does  it  take?  Deploy  &  Manage  Back-­‐

End  

Many  APIs  to  connect  and  integrate  

Management  &  Data  Maintenance  

Page 30: Building Internet of Things applications with COMPOSE and

Building  IoT  Applica5ons  

What  else  does  it  take?  

Sofware  

Hardware  

Libraries  

APIs  

Data?

Users?

Page 31: Building Internet of Things applications with COMPOSE and

Building  IoT  Applica5ons  

What  else  does  it  take?  

Hosting

Management

Outsourcing

Resources

scalable

Page 32: Building Internet of Things applications with COMPOSE and

More  than  sensor  data  storing…  

Page 33: Building Internet of Things applications with COMPOSE and

What  is  COMPOSE?  

Scalable  PaaS  

IoT  Marketplace  

Development  Tools  

Sensor  Communica5on  Technologies  

Page 34: Building Internet of Things applications with COMPOSE and

MQTT  WebSockets  

XMPP  …   Service  Discovery  

Security  

IoT  PlaKorm  As  A  Service  

Page 35: Building Internet of Things applications with COMPOSE and

COMPOSE  at  heart  

servIoTicy  •  IoT  Streaming  made  easy!  •  RESTful  API  for:  

–  Storing  device  (sensor)  data  –  Querying  &  Retrieving  the  data  –  Pushing  data  to  the  device  –  Subscribing  to  no5fica5ons  (e.g.,  new  sensor  data  arrived)  

•  Free  and  Open  Source  •  Downloadable  bundle  (Ubuntu/Debian  Image)  •  Soon  -­‐>  CloudFoundry  installa5on  

Page 36: Building Internet of Things applications with COMPOSE and

WWW  -­‐>  IoT  CoAP

REST  

MQTT  CoAP  

MQTT  

STOMP  WS  

CoAP  

Page 37: Building Internet of Things applications with COMPOSE and

COMPOSE  at  heart  

servIoTicy  •  Integra5on  of  popular  frameworks:  •  Apache  STORM  •  Elas5cSearch  •  CouchBase  DB  •  Apache  Apollo  –  Ac5veMQ  

–  WS/STOMP/MQTT/AMQP/…  

•  JeNy  •  ….  

Page 38: Building Internet of Things applications with COMPOSE and

COMPOSE  

Page 39: Building Internet of Things applications with COMPOSE and

COMPOSE  

hNps://github.com/compose-­‐eu  servIoTicy  IoT  streaming  made  easy  

COMPOSE  SDKs  hNp://www.servio5cy.com  hNp://www.gluethings.com    

Page 40: Building Internet of Things applications with COMPOSE and

COMPOSE  

Developer Friendly! Conceptual  idea  from  Node-­‐RED  

Page 41: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

Security taken seriously!

Page 42: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

Security taken seriously!

Page 43: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

With Service Discovery!

Page 44: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

With Service Discovery!

Page 45: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

With Service Discovery!

Page 46: Building Internet of Things applications with COMPOSE and

Meet  COMPOSE  

With Service Discovery!

Page 47: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA!

Page 48: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA! Smart Device

Smart Device

Page 49: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA! Smart Device

Smart Device

Page 50: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA! Smart Device

Smart Device

Discover

Services

Page 51: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA! Smart Device

Smart Device

Discover

Services

Application

Page 52: Building Internet of Things applications with COMPOSE and

So  how  to  use  COMPOSE?  

IDEA! Smart Device

Smart Device

Discover

Services

Application

Deploy  Manage  Publish  

Page 53: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  1   hNp://www.gluethings.com/plaKorm/smart-­‐object-­‐manager/  

Page 54: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  2   hNp://www.gluethings.com/plaKorm/smart-­‐object-­‐manager/  

Page 55: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  2   hNp://www.gluethings.com/plaKorm/smart-­‐object-­‐manager/  

Page 56: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  3   hNp://www.gluethings.com/plaKorm/smart-­‐object-­‐manager/  

Page 57: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  4   hNps://github.com/compose-­‐eu/COMPOSE_client_libraries  

Page 58: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  5   hNp://www.gluethings.com/plaKorm/smart-­‐object-­‐manager/  

Page 59: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  6   hNp://your.nodered.installa[no:1880  

Page 60: Building Internet of Things applications with COMPOSE and

Step  by  Step…  

Step  6   COMPOSE  -­‐  Cloudfoundry  

Node.JS  ,  Java  

COMPOSE  APIs,  SDKs  

It  scales…  

Page 61: Building Internet of Things applications with COMPOSE and

Find  out  more!  

@COMPOSE_Project

https://www.facebook.com/groups/Compose.Eu.Project/

http://www.compose-project.eu

Page 62: Building Internet of Things applications with COMPOSE and

Stay  in  touch!  

Competitions

Page 63: Building Internet of Things applications with COMPOSE and

Charalampos  Doukas  

Researcher  •  Informa5on  &  

Communica5on  Systems  Engineer  

•  PhD  in  Health  Informa5cs  •  Senior  Researcher  in  

CREATE-­‐NET  •  COMPOSE  Project  

 

Maker  •  IoT  Blogger  

–  Many  DIY  IoT  Projects  

•  Workshops  (Makerland,  Makerfaire…)  

•  Author  –  Building  Internet  of  Things  

with  the  Arduino  

•  Consultancy  

@BuildingIoT

hdoukas