sqs iot breakfast madrid -building the internet of things with eclipse iot
TRANSCRIPT
![Page 1: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/1.jpg)
Building the Internet of Things with Eclipse IoTBenjamin Cabé – Eclipse Foundation@kartben
IoT Breakfast Madrid - May 21, 2015
![Page 2: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/2.jpg)
![Page 3: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/3.jpg)
![Page 4: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/4.jpg)
![Page 5: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/5.jpg)
![Page 6: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/6.jpg)
![Page 7: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/7.jpg)
![Page 8: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/8.jpg)
![Page 9: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/9.jpg)
● 18 open-source projects*● Java – but also C, C++,
Python, etc.
* and counting!
→ IoT Standards→ Services & Frameworks
![Page 10: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/10.jpg)
Java for IoT?● 9+ million Java developers● Java 8 & embedded are fun● Lots of IoT devices running on ARM● Tooling
![Page 11: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/11.jpg)
End-to-end IoT?
![Page 12: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/12.jpg)
End-to-end IoT?
![Page 13: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/13.jpg)
End-to-end IoT?
![Page 14: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/14.jpg)
End-to-end IoT?
![Page 15: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/15.jpg)
Gateway
![Page 16: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/16.jpg)
Gateway
![Page 17: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/17.jpg)
Gateway
![Page 18: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/18.jpg)
Gateway
Connectsensors to the world
Manage the hardware and software running
at the edge
![Page 19: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/19.jpg)
Connect?● CoAP
○ « HTTP over UDP »
○ Expose your device as a resource to the Internet of Things
● MQTT○ Publish/Subscribe model○ More room for local processing
![Page 20: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/20.jpg)
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 21: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/21.jpg)
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 22: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/22.jpg)
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)
}
}
![Page 23: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/23.jpg)
MQTT: Publish & Subscribe
Sub KETTLE232/#Pub KETTLE232/temp
Payload: 21°C
Pub KETTLE232/temp
Payload: 21°CBROKER
![Page 24: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/24.jpg)
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 25: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/25.jpg)
MqttClient c = new MqttClient("tcp://m2m.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/#");
![Page 26: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/26.jpg)
MQTT brokers● Eclipse Mosquitto
○ C implementation
○ Scalable (1000 clients == 3MB RAM)
● Moquette○ Java implementation○ Based on Netty and LMAX disruptor
![Page 27: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/27.jpg)
Manage?● Gateway itself
○ wireless modem, firewall, …
● Applications○ Install/Uninstall software packages○ Start/Stop applications
● Sensors○ H/W abstraction layer
![Page 28: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/28.jpg)
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 29: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/29.jpg)
Installing Kura
cd ~
sudo apt-get update
wget https://s3.amazonaws.com/kura_downloads/raspbian/release/ \ 1.1.0/kura_1.1.0_raspberry-pi_armv6.deb
sudo dpkg -i kura_1.1.0_raspberry-pi_armv6.deb
sudo apt-get install -f
sudo reboot
![Page 30: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/30.jpg)
First steps with Kura● Network management
○ Cellular Modem, WiFi○ Firewall○ NAT
● OSGi and system administration
● IoT server communication settings
![Page 31: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/31.jpg)
First steps with Kura
![Page 32: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/32.jpg)
First steps with Kura
![Page 33: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/33.jpg)
First steps with Kura
![Page 34: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/34.jpg)
First steps with Kura
![Page 35: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/35.jpg)
First steps with Kura
![Page 36: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/36.jpg)
First steps with Kura
![Page 37: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/37.jpg)
First steps with Kura
![Page 38: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/38.jpg)
First steps with Kura
![Page 39: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/39.jpg)
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 40: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/40.jpg)
Your typical Kura component● Uses Modbus, CAN-Bus, etc. built-in device
abstraction services○ Or implement your own service
![Page 41: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/41.jpg)
Your typical Kura component (2)• Uses Kura built-in transport services to talk to
the cloud– TransportService – « raw » protocol– DataService – local storage, auto reconnect– CloudService – optimized binary payload, advanced
device management
![Page 42: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/42.jpg)
Your typical Kura component (3)• Implements ConfigurableComponent
– Enables configuration from the UI– … as well as from the cloud
![Page 43: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/43.jpg)
Your typical Kura component (4)• Bundled with other bundles/components in a
deployment package– Zip file containing a Manifest & OSGi bundles
• Can be deployed from Kura Web UI or over the air
Read more: http://eclipse.github.io/kura/doc/kura-setup
![Page 44: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/44.jpg)
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 45: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/45.jpg)
Eclipse IoT is also… Industrial IoT
● Open source implementations of IEC standards● Eclipse SCADA, 4DIAC, Rise V2G, ...
![Page 46: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/46.jpg)
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 47: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/47.jpg)
Eclipse IoT is also…
● Flexible Framework● Based on Java and OSGi
● Huge number of “bindings”:KNX, Nest, Philips HUE, …
![Page 48: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/48.jpg)
Kura is awesome!Go download it now!
http://eclipse.org/kura
If you had to remember only 3 things...
#1
![Page 49: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/49.jpg)
Build your own greenhouse &follow the tutorial
http://iot.eclipse.org/java/tutorial
If you had to remember only 3 things...
#2
![Page 50: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/50.jpg)
Eclipse IoT is much more thanKura and Java!
http://iot.eclipse.org/
If you had to remember only 3 things...
#3
![Page 51: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/51.jpg)
Get Involved!
● Open bugs / fix bugs● Request new features● Write articles, tutorials● Participate on the mailing
lists● Propose your project!
![Page 52: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/52.jpg)
Coming next?
![Page 53: SQS IoT Breakfast Madrid -Building the Internet of Things with Eclipse IoT](https://reader036.vdocuments.mx/reader036/viewer/2022062406/55c44e0fbb61eb321b8b46db/html5/thumbnails/53.jpg)
Coming next?● Device Management
○ LwM2M, LwM2M over MQTT, IPSO Smart Objects
● Security○ TinyDTLS
● Open-source IoT server○ Several members interested in defining and
implementing the OpenStack for IoT
○ See https://wiki.eclipse.org/IoT/IoTServerPlatform