Top Banner
Using JavaScript and COMPOSE to build cool IoT applica;ons Charalampos Doukas @buildingiot
48

Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Jan 24, 2018

Download

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

 Using  JavaScript  and  COMPOSE  to  build  cool  IoT  applica;ons  Charalampos  Doukas  @buildingiot  

Page 2: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

PART  A  –  Some  Basics  

Using  JavaScript  and  COMPOSE  to  build  cool  IoT  applica;ons  

Page 3: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  The  main  components  

Devices  –  ‘Smart  Objects’  –  ‘Things’  

Networks  

Online  Services  

Page 4: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Devices:  the  community  approach    

Devices  

Page 5: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Devices  

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

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

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

Page 6: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Devices  

Devices  

Page 7: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Devices  

Page 8: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Devices  

Page 9: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Devices  

NodeMCU  

WiFI  eLua  12$  

Based  on  ESP8266  WiFI  SoC  Community  based  development  SW  +  HW    

Page 10: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Devices  

IoT Gateways

Page 11: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Devices  

Wearables?

Page 12: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Devices    

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

–  BITalino  (Wearables)  –  Thingsquare  –  FluMer  

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

Page 13: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Sensors  &  Actuators  

•  Gas  &  Air  quality  •  Barometric  pressure  •  Temperature  &  Humidity  •  Light  &  Sound  •  Mo;on  •  Flex  &  Force  •  Posi;on  •  Magne;c  fields  •  Electricity  •  Biometrics  

Page 14: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Sensors  &  Actuators  

•  Proximity  &  Presence  •  Weight  •  Liquids  &  Liquid  flow  •  Radia;on  •  …  

Page 15: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Sensors  &  Actuators  

•  Move  things  (motors)  •  Ac;vate  (switches)  •  Interfaces  

–  Sound  –  Light  –  Displays  

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

Page 16: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Soiware  

•  Standard  IDEs  –  Arduino  IDE  –  Eclipse  

•  Code  –  less:  –  Scratch  

•  Cloud-­‐based  –  Codebender  (codebender.cc)  –  par;cle.io  

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

Page 17: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Workflow  -­‐  based  

•  Node-­‐RED  

Page 18: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Networks  

Page 19: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Protocols  

•  Web  based:  •  HTTP  

–  REST  – WebSockets  

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

Page 20: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Online  Services  

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

•  Device  Management    •  Full  PaaS  

Page 21: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

Why  JavaScript?  

Page 22: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

Why  JavaScript?  

Page 23: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

Why  JavaScript?  

Page 24: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

Why  JavaScript?  

Page 25: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

Why  JavaScript?  

Page 26: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

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

accessing  basic  Arduino  controls  from  Web  Applica;ons  using  HTML5,  Socket.IO  and  Node.js  

Page 27: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

SoEware  •  Device.js  •  DeviceJS  is  a  JavaScript  based  development  plaHorm  for  

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

Page 28: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

SoEware  •  Node-­‐RED  

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

–  Web-­‐based  –  O/S  

Page 29: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

SoEware  •  Node-­‐RED  

Page 30: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

SoEware  •  Node-­‐RED  •  Nodes  available:  

 Over  40    user  contributed    nodes  

Page 31: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT  &  JavaScript  

SoEware  •  Node-­‐RED  

Page 32: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

IoT:  the  community  approach    

Device  SoEware  

Cylon.js   is   a   JavaScript  framework   for   robo9cs,  physical   compu9ng,   and   the  Internet  of  Things.  It  makes  it  incredibly   easy   to   command  robots  and  devices.  

Device  SDK  over  JS/Node.JS    REST/WebSockets/MQTT    Browser/Mobile  support  

Page 33: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Building  IoT  Applica;ons  

What  else  does  it  take?  

Devices  –  ‘Smart  Objects’  –  ‘Things’  

Networks  

Online  Services  

Page 34: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Building  IoT  Applica;ons  

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

End  

Many  APIs  to  connect  and  integrate  

Management  &  Data  Maintenance  

Page 35: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Building  IoT  Applica;ons  

What  else  does  it  take?  

Soiware  

Hardware  

Libraries  

APIs  

Data?

Users?

Page 36: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Building  IoT  Applica;ons  

What  else  does  it  take?  

Hosting

Management

Outsourcing

Resources

scalable

Page 37: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

More  than  sensor  data  storing…  

Page 38: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

What  is  COMPOSE?  

Scalable  PaaS  

IoT  Marketplace  

Development  Tools  

Sensor  Communica;on  Technologies  

Page 39: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

MQTT  WebSockets  

XMPP  …   Service  Discovery  

Security  

IoT  PlaLorm  As  A  Service  

Page 40: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

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  no;fica;ons  (e.g.,  new  sensor  data  arrived)  

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

Page 41: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

WWW  -­‐>  IoT  CoAP

REST  

MQTT  CoAP  

MQTT  

STOMP  WS  

CoAP  

Page 42: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

COMPOSE  at  heart  

servIoTicy  •  Integra;on  of  popular  frameworks:  •  Apache  STORM  •  Elas;cSearch  •  CouchBase  DB  •  Apache  Apollo  –  Ac;veMQ  

–  WS/STOMP/MQTT/AMQP/…  

•  JeMy  •  ….  

Page 43: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

COMPOSE  

Page 44: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

COMPOSE  

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

COMPOSE  SDKs  hMp://www.servio;cy.com  hMp://www.gluethings.com    

Page 45: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

COMPOSE  

Developer Friendly! Conceptual  idea  from  Node-­‐RED  

Page 46: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Meet  COMPOSE  

Security taken seriously!

Page 47: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

PART  B  –  Some  Fun  stuff  (Hands  on  Demo)  

Using  JavaScript  and  COMPOSE  to  build  cool  IoT  applica;ons  

(Mind  the  Demo  Effect

)  

Page 48: Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015

Charalampos  Doukas  

Researcher  •  Informa;on  &  

Communica;on  Systems  Engineer  

•  PhD  in  Health  Informa;cs  •  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