Top Banner
Building the Internet of Things with Eclipse IoT* Benjamin Cabé Eclipse Foundation @kartben October 26, 2015 © Eclipse Foundation – Made available under the EPL v1.0 * and more!
65

Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Mar 23, 2018

Download

Documents

dodiep
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: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Building the Internet of Things with Eclipse IoT*Benjamin Cabé – Eclipse Foundation@kartben

October 26, 2015© Eclipse Foundation – Made available under the EPL v1.0

* and more!

Page 2: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 3: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 4: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 5: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 6: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 7: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 8: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 9: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

● 19 open-source projects*● Lots of Java but also C,

C++, Python, Go, .Net, …

* and counting!

→ IoT Standards→ Services & Frameworks

Page 10: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

End-to-end IoT?

Page 11: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

End-to-end IoT?

Page 12: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

End-to-end IoT?

Page 13: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

End-to-end IoT?

Page 14: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

What you will learn today

CONNECT

Page 15: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

What you will learn today

CONNECT MANAGE

Page 16: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

What you will learn today

VISUALIZECONNECT MANAGE

Page 17: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Connecting things to the IoT?Network is often not reliableBandwidth == $$$Different communication patterns

Page 18: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

● CoAP○ « HTTP over UDP »

○ Expose your device as a resource to the Internet of Things

● MQTT○ Publish/Subscribe model○ TCP-based

Connecting things to the IoT

Page 19: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 20: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 21: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Californium 101oapSe e , oapResou e, oapEx han e

1. Implement custom resources (extend oapResou e)

2. Add resources to the CoAP server

3. Start the server

Page 22: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 23: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

MQTT: Publish & Subscribe

Sub KETTLE232/#Pub KETTLE232/temp

Payload: 21°C

Pub KETTLE232/temp

Payload: 21°CBROKER

Page 24: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

MQTT in 5 keywordsPub-SubWildcardsQuality of ServiceLast Will & TestamentRetained Messages

Page 25: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Eclipse Paho● Open-source MQTT clients

● Pick your language!○ Java○ JavaScript○ C/C++, Objective C○ Go, Lua, Python, .NET, WinRT, …

http://eclipse.org/paho

Page 26: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...
Page 27: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Open source MQTT brokers● Eclipse Mosquitto

○ 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

Page 28: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Oh, and by the way… Amazon just announced support for MQTT in their new AWS IOT cloud platform

Page 29: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

VISUALIZECONNECT MANAGE

Page 30: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

VISUALIZECONNECT MANAGE

✔ ???

Page 31: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 32: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Gateways to the rescue!

Page 33: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Gateway

Page 34: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Gateway

Page 35: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Java VMOSGi Application Container

Device Abstraction

Gateway Basic Services

Network ConfigurationNetwork Management Field Protocols

Connectivity and Delivery

Adm

inis

trat

ion

GUI

Ope

ratio

n &

Man

agem

ent

LinuxHardware

App 1 App 2 App n. . . . Applications

Eclipse Kura

Page 36: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Installing Kura

Page 37: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura● Network management

○ Cellular Modem, WiFi○ Firewall○ NAT

● OSGi and system administration

● IoT server communication settings

Page 38: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 39: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 40: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 41: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 42: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 43: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 44: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 45: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

First steps with Kura

Page 46: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 47: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

VISUALIZECONNECT MANAGE

✔ ✔

Page 48: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 49: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

MQTT + WebSockets

Page 50: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

DEMO!

Page 51: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Data Analytics for IoT?

Page 52: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Apache Spark Streaming● Stream processing in Java, Python & Scala

● Built-in connectors for Kafka, Twitter, ZeroMQ, Flume, Kinesis & ... MQTT!

● A nice programming model for consolidating time-series data

● Awesome combo when used with Spark MLlib!

Page 53: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

DEMO!

Page 54: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

VISUALIZECONNECT MANAGE

✔ ✔ ✔

Page 55: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Eclipse IoT is also… Industrial IoT

● Open source implementations of IEC standards● Eclipse SCADA, 4DIAC, Rise V2G, ...

Page 56: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Eclipse IoT is also...Device Management

● LWM2M is an Open Mobile Alliance Standard● Device Management on top of CoAP● Eclipse Leshan and Wakaama are two

implementations

Page 57: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

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

Page 58: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Eclipse IoT is also…

● Flexible Framework● Based on Java and OSGi

● Huge number of “bindings”:KNX, Nest, Philips HUE, …

Page 59: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Kura is awesome!Go download it now!

http://eclipse.org/kura

If you had to remember only 3 things...

#1

Page 60: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Build your own greenhouse &follow the tutorial

http://iot.eclipse.org/java/tutorial

If you had to remember only 3 things...

#2

Page 61: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Eclipse IoT is much more thanKura and Java!

http://iot.eclipse.org/

If you had to remember only 3 things...

#3

Page 62: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Get Involved!

● Open bugs / fix bugs● Request new features● Write articles, tutorials● Participate on the mailing

lists● Propose your project!

Page 63: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

One more thing...

Page 64: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

One more thing...

http://iot.eclipse.org/open-iot-challenge

Page 65: Building the Internet of Things with Eclipse IoT* - Huihoodocs.huihoo.com/javaone/2015/CON5624-End-to-End-IoT-Solutions-with...Building the Internet of Things with Eclipse IoT* ...

Thank you! Questions?

[email protected] @kartben

http://blog.benjamin-cabe.com

http://iot.eclipse.org