Building the
Internet of Things
with Eclipse IoT*
Mike Milinkovich – Eclipse Foundation
@mmilinkovich
February 10, 2016
© Eclipse Foundation – Made available under the EPL v1.0
* and more!
Agenda
● Eclipse Foundation
● IoT: “State of the Union”
● Eclipse IoT Vision
● Key projects
● Community aspects
● Getting engaged
Eclipse Foundation
●
●
●
●
●
Eclipse Foundation by the numbers
•
•
•
•
• …
•
•
Eclipse Community by the numbers
Eclipse IoT community
Eclipse IoT by the numbers
● 2 Million Lines of Code
● 20 projects
● 125 developers from 30+ organizations
○ Bosch, Eurotech, IBM, Sierra Wireless, LAAS-CNRS,
Deutsche Telekom, Cisco, ...
● 95K+ unique websites visitors per month
● 50K+ monthly downloads for Eclipse IoT projects
● 3 developer sandboxes (MQTT, CoAP, LWM2M)
Eclipse IoT Marketing Activities
● Tutorials
● IoT Days
● Developer Challenges
○ http://iot.eclipse.org/open-iot-challenge
● Virtual IoT meetup
○ Bi-weekly webinars with IoT experts
○ 700 members
○ http://www.meetup.com/Virtual-IoT
● Developer survey
IoT?
In reality...
In reality...
… Internet of Silos
fragmentation
fragmentation complexity
fragmentation complexity lock-in
Eclipse IoT
Vision
● Founded in 2011 by IBM,
Eurotech, Sierra Wireless
● 20 open-source projects*
● Lots of Java but also C,
C++, Python, Go, .Net, …
* and counting!
→ IoT Standards
→ Services & Frameworks
Eclipse IoT Projects
End-to-end IoT?
End-to-end IoT?
End-to-end IoT?
End-to-end IoT?
CONNECT
CONNECT MANAGE
ANALYZECONNECT MANAGE
Connecting things to the IoT?
Network is often not reliable
Bandwidth == $$$
Different communication patterns
● CoAP
○ « HTTP over UDP »
○ Expose your device as a resource on the Internet of
Things
● MQTT
○ Publish/Subscribe model
○ TCP-based
Connecting things to the IoT
CoAP - RFC 7252
● RESTful protocol designed from scratch
○ URIs, Internet Media Types
○ GET, POST, PUT, DELETE
● Transparent mapping to HTTP
● Additional features for M2M scenarios
○ e.g Observe
CoAP: The web-of-things
/walk
/hand/left/raise
/eye/picture
/on
/red
/green
/blue
/mtbf
/on
/on
/buttons
/buttons/1/push
/bat-level
/engine/status
/position
/fuel
/CO2
/noise
/lights/on
Eclipse Californium
● Focus on scalability and usability
● To be used in IoT cloud servers or M2M/IoT
devices running Java
● Includes DTLS implementation (Scandium),
HTTP/CoAP bridge, Plugtests, …
http://eclipse.org/californium
Californium 101
oapSe e , oapResou e, oapEx han e
1. Implement custom resources
(extend oapResou e)
2. Add resources to the CoAP server
3. Start the server
import static org.eclipse.californium.core.coap.CoAP.ResponseCode.*;
public class MyResource extends CoapResource {
@Override
public void handleGET(CoapExchange exchange) {
exchange.respond("hello world"); // reply with 2.05 payload (text/plain)
}
@Override
public void handlePOST(CoapExchange exchange) {
exchange.accept(); // make it a separate response
if (exchange.getRequestOptions() ...) {
// do something specific to the request options
}
exchange.respond(CREATED); // reply with response code only (shortcut)
}
}
MQTT: Publish & Subscribe
Sub
KETTLE232/#Pub
KETTLE232/temp
Payload:
21°C
Pub
KETTLE232/temp
Payload:
21°C
BROKER
MQTT in 5 keywords
Pub-Sub
Wildcards
Quality of Service
Last Will & Testament
Retained Messages
Eclipse Paho
● Open-source MQTT clients
● Pick your language!
○ Java
○ JavaScript
○ C/C++, Objective C
○ Go, Lua, Python, .NET, WinRT, …
http://eclipse.org/paho
MqttClient c = new MqttClient("tcp://iot.eclipse.org:1883",
MqttClient.generateClientId());
mqttClient.setCallback(new MqttCallback() {
@Override
public void messageArrived(String topic, MqttMessage message)
throws Exception {
// process received message
// ...
}
});
mqttClient.connect();
mqttClient.subscribe("mygateway/#");
Open source MQTT brokers
● Eclipse Mosquitto (iot.eclipse.org)
○ C implementation
○ Pretty scalable (1000 clients == 3MB RAM)
● But also…
○ Moquette (Java, Based on Netty and LMAX disruptor)
○ VerneMQ (Erlang)
○ Mosca (Node.js)
⇒ https://github.com/mqtt/mqtt.github.io/wiki/servers
DEMO!
Cottage Monitoring
Orion
Tools for the Web
...on the web
CONNECT MANAGE
✔
ANALYZE
CONNECT MANAGE
✔ ???
ANALYZE
Yup, lots of aspects to manage
● Network
→ PPP cellular connection, WiFi hotspot, Zigbee
coordination, VPN, firewall …
→ offline/online mode
● Applications
→ Remote install, start, stop, configure, …
→ Sandboxing
● Hardware
Gateways to the rescue!
Gateway
Gateway
Java VM
OSGi Application Container
Device Abstraction
Gateway Basic Services
Network Configuration
Network Management Field
Protocols
Connectivity and Delivery
AdministrationGUI
Operation&Management
Linux
Hardware
App 1 App 2 App n. . . .
Applications
Eclipse Kura
Installing Kura
cd ~
sudo apt-get update
wget https://s3.amazonaws.com/kura_downloads/raspbian/release/
1.3.0/kura_1.3.0_raspberry-pi-2_installer.deb
sudo dpkg -i kura_1.3.0_raspberry-pi-2_installer.deb
sudo apt-get install -f
sudo reboot
First steps with Kura
● Network management
○ Cellular Modem, WiFi
○ Firewall
○ NAT
● OSGi and system administration
● IoT server communication settings
First steps with Kura (DEMO!)
Kura API
● OSGi services that you can re-use in your own
components
○ o Se e
○ Da aSe e, oudSe e
○ p oSe e (AES, base64, SHA-1)
○ Pos onSe e (geolocation)
○ … and many others
● And of course you can leverage a huge
ecosystem of Java and OSGi libraries
Device Management is also...
LightweightM2M
● LWM2M is an Open Mobile Alliance Standard
● Device Management on top of CoAP
● Eclipse Leshan and Wakaama are two
implementations
DEMO!
CONNECT MANAGE
✔ ✔
ANALYZE
End-user interaction
● JavaFX Charts
● Eclipse BIRT
● Smartphone app (e.g Android)
○ https://www.eclipse.org/paho/clients/android
● MQTT + WebSockets = ♡
○ https://www.eclipse.org/paho/clients/js
MQTT + WebSockets
var client = new Paho.MQTT.Client("ws://iot.eclipse.org/ws",
"client-" + new Date().getTime());
client.onMessageArrived = function(message) {
// my stuff
}
client.connect({
onSuccess: function() {
client.subscribe("myRootTopic/#");
}
});
DEMO!
CONNECT MANAGE
✔ ✔ ✔
ANALYZE
Eclipse IoT is also…
● Flexible Framework
● Based on Java and OSGi
● Huge number of “bindings”:
KNX, Nest, Philips HUE, …
Eclipse IoT is also...
Server Platform
● Software provisioning
○ https://projects.eclipse.org/proposals/hawkbit
● Uniform service interface for Telemetry and Command &
Control
○ https://projects.eclipse.org/proposals/hono
Eclipse IoT is also…
Industrial IoT
● Open source implementations of IEC standards
○ Eclipse neoSCADA: Siemens S7 PLC, IEC 60870-4-105, …
○ 4DIAC: 61499
○ Rise V2G: IEC 15118
Eclipse IoT is also...
Information Models
● Eclipse Vorto allows to create and manage
device descriptions + associated toolchains
(code generators)
Eclipse IoT is also...
Secured Service Discovery
● Eclipse Tiaki
● Leveraging DNS-SEC and DNS-SD for
retrieving a device configuration parameter, or
its public key for establishing secured
communications
Kura is awesome!
Go download it now!
http://eclipse.org/kura
If you had to remember only 3 things...
#1
Build your own greenhouse &
follow the tutorial
http://iot.eclipse.org/java/tutorial
If you had to remember only 3 things...
#2
Eclipse IoT is much more than
Kura and Java!
http://iot.eclipse.org/
If you had to remember only 3 things...
#3
Get Involved!
● Open bugs / fix bugs
● Request new features
● Write articles, tutorials
● Participate on the mailing
lists
● Come to EclipseCon/IoT!
● Propose your project!
Thank you! Questions?
mike@eclipse.org
@mmilinkov
http://mmilinkov.wordpress.com
http://iot.eclipse.org

Eclipse IoT Talk (Montreal JUG)

  • 1.
    Building the Internet ofThings with Eclipse IoT* Mike Milinkovich – Eclipse Foundation @mmilinkovich February 10, 2016 © Eclipse Foundation – Made available under the EPL v1.0 * and more!
  • 2.
    Agenda ● Eclipse Foundation ●IoT: “State of the Union” ● Eclipse IoT Vision ● Key projects ● Community aspects ● Getting engaged
  • 3.
  • 4.
  • 6.
  • 9.
  • 10.
    Eclipse IoT bythe numbers ● 2 Million Lines of Code ● 20 projects ● 125 developers from 30+ organizations ○ Bosch, Eurotech, IBM, Sierra Wireless, LAAS-CNRS, Deutsche Telekom, Cisco, ... ● 95K+ unique websites visitors per month ● 50K+ monthly downloads for Eclipse IoT projects ● 3 developer sandboxes (MQTT, CoAP, LWM2M)
  • 11.
    Eclipse IoT MarketingActivities ● Tutorials ● IoT Days ● Developer Challenges ○ http://iot.eclipse.org/open-iot-challenge ● Virtual IoT meetup ○ Bi-weekly webinars with IoT experts ○ 700 members ○ http://www.meetup.com/Virtual-IoT ● Developer survey
  • 12.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 27.
    ● Founded in2011 by IBM, Eurotech, Sierra Wireless
  • 28.
    ● 20 open-sourceprojects* ● Lots of Java but also C, C++, Python, Go, .Net, … * and counting! → IoT Standards → Services & Frameworks
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
    Connecting things tothe IoT? Network is often not reliable Bandwidth == $$$ Different communication patterns
  • 38.
    ● CoAP ○ «HTTP over UDP » ○ Expose your device as a resource on the Internet of Things ● MQTT ○ Publish/Subscribe model ○ TCP-based Connecting things to the IoT
  • 39.
    CoAP - RFC7252 ● RESTful protocol designed from scratch ○ URIs, Internet Media Types ○ GET, POST, PUT, DELETE ● Transparent mapping to HTTP ● Additional features for M2M scenarios ○ e.g Observe
  • 40.
  • 41.
    Eclipse Californium ● Focuson scalability and usability ● To be used in IoT cloud servers or M2M/IoT devices running Java ● Includes DTLS implementation (Scandium), HTTP/CoAP bridge, Plugtests, … http://eclipse.org/californium
  • 42.
    Californium 101 oapSe e, oapResou e, oapEx han e 1. Implement custom resources (extend oapResou e) 2. Add resources to the CoAP server 3. Start the server
  • 43.
    import static org.eclipse.californium.core.coap.CoAP.ResponseCode.*; publicclass MyResource extends CoapResource { @Override public void handleGET(CoapExchange exchange) { exchange.respond("hello world"); // reply with 2.05 payload (text/plain) } @Override public void handlePOST(CoapExchange exchange) { exchange.accept(); // make it a separate response if (exchange.getRequestOptions() ...) { // do something specific to the request options } exchange.respond(CREATED); // reply with response code only (shortcut) } }
  • 44.
    MQTT: Publish &Subscribe Sub KETTLE232/#Pub KETTLE232/temp Payload: 21°C Pub KETTLE232/temp Payload: 21°C BROKER
  • 45.
    MQTT in 5keywords Pub-Sub Wildcards Quality of Service Last Will & Testament Retained Messages
  • 46.
    Eclipse Paho ● Open-sourceMQTT clients ● Pick your language! ○ Java ○ JavaScript ○ C/C++, Objective C ○ Go, Lua, Python, .NET, WinRT, … http://eclipse.org/paho
  • 47.
    MqttClient c =new MqttClient("tcp://iot.eclipse.org:1883", MqttClient.generateClientId()); mqttClient.setCallback(new MqttCallback() { @Override public void messageArrived(String topic, MqttMessage message) throws Exception { // process received message // ... } }); mqttClient.connect(); mqttClient.subscribe("mygateway/#");
  • 48.
    Open source MQTTbrokers ● Eclipse Mosquitto (iot.eclipse.org) ○ C implementation ○ Pretty scalable (1000 clients == 3MB RAM) ● But also… ○ Moquette (Java, Based on Netty and LMAX disruptor) ○ VerneMQ (Erlang) ○ Mosca (Node.js) ⇒ https://github.com/mqtt/mqtt.github.io/wiki/servers
  • 49.
  • 50.
  • 51.
    Orion Tools for theWeb ...on the web
  • 54.
  • 55.
  • 56.
    Yup, lots ofaspects to manage ● Network → PPP cellular connection, WiFi hotspot, Zigbee coordination, VPN, firewall … → offline/online mode ● Applications → Remote install, start, stop, configure, … → Sandboxing ● Hardware
  • 57.
  • 58.
  • 59.
  • 60.
    Java VM OSGi ApplicationContainer Device Abstraction Gateway Basic Services Network Configuration Network Management Field Protocols Connectivity and Delivery AdministrationGUI Operation&Management Linux Hardware App 1 App 2 App n. . . . Applications Eclipse Kura
  • 61.
    Installing Kura cd ~ sudoapt-get update wget https://s3.amazonaws.com/kura_downloads/raspbian/release/ 1.3.0/kura_1.3.0_raspberry-pi-2_installer.deb sudo dpkg -i kura_1.3.0_raspberry-pi-2_installer.deb sudo apt-get install -f sudo reboot
  • 62.
    First steps withKura ● Network management ○ Cellular Modem, WiFi ○ Firewall ○ NAT ● OSGi and system administration ● IoT server communication settings
  • 63.
    First steps withKura (DEMO!)
  • 64.
    Kura API ● OSGiservices that you can re-use in your own components ○ o Se e ○ Da aSe e, oudSe e ○ p oSe e (AES, base64, SHA-1) ○ Pos onSe e (geolocation) ○ … and many others ● And of course you can leverage a huge ecosystem of Java and OSGi libraries
  • 65.
    Device Management isalso... LightweightM2M ● LWM2M is an Open Mobile Alliance Standard ● Device Management on top of CoAP ● Eclipse Leshan and Wakaama are two implementations
  • 66.
  • 67.
  • 68.
    End-user interaction ● JavaFXCharts ● Eclipse BIRT ● Smartphone app (e.g Android) ○ https://www.eclipse.org/paho/clients/android ● MQTT + WebSockets = ♡ ○ https://www.eclipse.org/paho/clients/js
  • 69.
    MQTT + WebSockets varclient = new Paho.MQTT.Client("ws://iot.eclipse.org/ws", "client-" + new Date().getTime()); client.onMessageArrived = function(message) { // my stuff } client.connect({ onSuccess: function() { client.subscribe("myRootTopic/#"); } });
  • 70.
  • 71.
  • 72.
    Eclipse IoT isalso… ● Flexible Framework ● Based on Java and OSGi ● Huge number of “bindings”: KNX, Nest, Philips HUE, …
  • 74.
    Eclipse IoT isalso... Server Platform ● Software provisioning ○ https://projects.eclipse.org/proposals/hawkbit ● Uniform service interface for Telemetry and Command & Control ○ https://projects.eclipse.org/proposals/hono
  • 75.
    Eclipse IoT isalso… Industrial IoT ● Open source implementations of IEC standards ○ Eclipse neoSCADA: Siemens S7 PLC, IEC 60870-4-105, … ○ 4DIAC: 61499 ○ Rise V2G: IEC 15118
  • 76.
    Eclipse IoT isalso... Information Models ● Eclipse Vorto allows to create and manage device descriptions + associated toolchains (code generators)
  • 77.
    Eclipse IoT isalso... Secured Service Discovery ● Eclipse Tiaki ● Leveraging DNS-SEC and DNS-SD for retrieving a device configuration parameter, or its public key for establishing secured communications
  • 78.
    Kura is awesome! Godownload it now! http://eclipse.org/kura If you had to remember only 3 things... #1
  • 79.
    Build your owngreenhouse & follow the tutorial http://iot.eclipse.org/java/tutorial If you had to remember only 3 things... #2
  • 80.
    Eclipse IoT ismuch more than Kura and Java! http://iot.eclipse.org/ If you had to remember only 3 things... #3
  • 81.
    Get Involved! ● Openbugs / fix bugs ● Request new features ● Write articles, tutorials ● Participate on the mailing lists ● Come to EclipseCon/IoT! ● Propose your project!
  • 83.