using java script and compose to build cool iot applications, senzations 2015
TRANSCRIPT
Using JavaScript and COMPOSE to build cool IoT applica;ons Charalampos Doukas @buildingiot
PART A – Some Basics
Using JavaScript and COMPOSE to build cool IoT applica;ons
IoT: The main components
Devices – ‘Smart Objects’ – ‘Things’
Networks
Online Services
Devices: the community approach
Devices
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)
Devices
Devices
IoT: the community approach
Devices
IoT: the community approach
Devices
IoT: the community approach
Devices
NodeMCU
WiFI eLua 12$
Based on ESP8266 WiFI SoC Community based development SW + HW
IoT: the community approach
Devices
IoT Gateways
IoT: the community approach
Devices
Wearables?
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
Sensors & Actuators
• Gas & Air quality • Barometric pressure • Temperature & Humidity • Light & Sound • Mo;on • Flex & Force • Posi;on • Magne;c fields • Electricity • Biometrics
Sensors & Actuators
• Proximity & Presence • Weight • Liquids & Liquid flow • Radia;on • …
Sensors & Actuators
• Move things (motors) • Ac;vate (switches) • Interfaces
– Sound – Light – Displays
• Remote interfaces – Social – Email, text, … – Phone (twillio)
Soiware
• Standard IDEs – Arduino IDE – Eclipse
• Code – less: – Scratch
• Cloud-‐based – Codebender (codebender.cc) – par;cle.io
• Browser-‐based – mBed – Electron – Noduino – …
Workflow -‐ based
• Node-‐RED
Networks
Protocols
• Web based: • HTTP
– REST – WebSockets
• M2M (lower resources + actua;on) – MQTT – CoAP -‐ LWM2M – XMPP – STOMP – …
Online Services
• Sensor Data – Pachube/Cosm/Xively – Paraimpu – TheThingsystem.io
• Device Management • Full PaaS
IoT & JavaScript
Why JavaScript?
IoT & JavaScript
Why JavaScript?
IoT & JavaScript
Why JavaScript?
IoT & JavaScript
Why JavaScript?
IoT & JavaScript
Why JavaScript?
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
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
IoT & JavaScript
SoEware • Node-‐RED
– Node-‐RED is a tool for wiring together hardware devices, APIs and online services
– Web-‐based – O/S
IoT & JavaScript
SoEware • Node-‐RED
IoT & JavaScript
SoEware • Node-‐RED • Nodes available:
Over 40 user contributed nodes
IoT & JavaScript
SoEware • Node-‐RED
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
Building IoT Applica;ons
What else does it take?
Devices – ‘Smart Objects’ – ‘Things’
Networks
Online Services
Building IoT Applica;ons
What else does it take? Deploy & Manage Back-‐
End
Many APIs to connect and integrate
Management & Data Maintenance
Building IoT Applica;ons
What else does it take?
Soiware
Hardware
Libraries
APIs
Data?
Users?
Building IoT Applica;ons
What else does it take?
Hosting
Management
Outsourcing
Resources
scalable
More than sensor data storing…
What is COMPOSE?
Scalable PaaS
IoT Marketplace
Development Tools
Sensor Communica;on Technologies
MQTT WebSockets
XMPP … Service Discovery
Security
IoT PlaLorm As A Service
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
WWW -‐> IoT CoAP
REST
MQTT CoAP
MQTT
STOMP WS
CoAP
COMPOSE at heart
servIoTicy • Integra;on of popular frameworks: • Apache STORM • Elas;cSearch • CouchBase DB • Apache Apollo – Ac;veMQ
– WS/STOMP/MQTT/AMQP/…
• JeMy • ….
COMPOSE
COMPOSE
hMps://github.com/compose-‐eu servIoTicy IoT streaming made easy
COMPOSE SDKs hMp://www.servio;cy.com hMp://www.gluethings.com
COMPOSE
Developer Friendly! Conceptual idea from Node-‐RED
Meet COMPOSE
Security taken seriously!
PART B – Some Fun stuff (Hands on Demo)
Using JavaScript and COMPOSE to build cool IoT applica;ons
(Mind the Demo Effect
)
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