Your SlideShare is downloading. ×
Leveraging Android for
the Internet of Things
with Eclipse M2M

Droidcon London
24-27th October 2013

Benjamin Cabé | Sier...
Who I am

•  Benjamin Cabé
•  Open Source M2M
Evangelist at Sierra Wireless
•  Eclipse M2M WG chairperson
M2M?
M2M?
IoT?
❝

Technology that supports
wired or wireless
communication
between devices
Typical architecture
Healthcare example
IOT
IOT
However…
It’s not as easy as it looks
Network is unreliable
Network is unreliable
Objects need to be ID’d
Network is unreliable
Objects need to be ID’d
Embedded is complex
When all you want to do…
POST /turnOn

GET /temperature
Eclipse M2M
building blocks
Eclipse M2M
building blocks
protocols
frameworks
tools
Network is unreliable
MQTT
MQTT?
MQTT?
M = Messaging
MQTT?
M = Messaging
Publish/subscribe protocol
MQTT?
M = Messaging
Publish/subscribe protocol
Lightweight (bandwidth, battery, …)
72.2

72.2
Show me the code!
embedded device
Show me the code!
var mqtt = require('mqtt');	
var c = mqtt.createClient(1883, 

	 	 	 	 	 	 	 	 	'm2m.eclipse.org');	
cli...
Show me the code!
var mqtt = require('mqtt');	
var c = mqtt.createClient(1883, 

	 	 	 	 	 	 	 	 	'm2m.eclipse.org');	
cli...
Show me the code!
var mqtt = require('mqtt');	
var c = mqtt.createClient(1883, 

	 	 	 	 	 	 	 	 	'm2m.eclipse.org');	
cli...
Show me the code!
var mqtt = require('mqtt');	
var c = mqtt.createClient(1883, 

	 	 	 	 	 	 	 	 	'm2m.eclipse.org');	
cli...
Show me the code!
Android device
Show me the code!
MqttClient c = new MqttClient

	 	 	 	(

	 	 	 	 "tcp://m2m.eclipse.org:1883",

	 	 	 	 MqttClient.gener...
Show me the code!
MqttClient c = new MqttClient

	 	 	 	(

	 	 	 	 "tcp://m2m.eclipse.org:1883",

	 	 	 	 MqttClient.gener...
Show me the code!
MqttClient c = new MqttClient

	 	 	 	(

	 	 	 	 "tcp://m2m.eclipse.org:1883",

	 	 	 	 MqttClient.gener...
Show me the code!
MqttClient c = new MqttClient

	 	 	 	(

	 	 	 	 "tcp://m2m.eclipse.org:1883",

	 	 	 	 MqttClient.gener...
Show me the code!
Callback code:
mqttClient.setCallback(new MqttCallback() {	
	@Override	
	public void messageArrived(Stri...
Show me the code!
Callback code:
mqttClient.setCallback(new MqttCallback() {	
	@Override	
	public void messageArrived(Stri...
Simple but not Stupid
•  QoS
–  at most once, at least once, exactly once, …

•  “Last will & Testament”
–  automatically ...
More about MQTT

http://eclipse.org/paho

http://mqtt.org
Network is unreliable
Objects need to be ID’d
So… now my objects talk
… to me?
NFC

RFID

QR Code

Bluetooth LE
How about
*

*?
AR

Augmented Reality
Demo!
Connected greenhouse
Raspberry Pi +
NodeJS MQTT client
Raspberry Pi +
NodeJS MQTT client
MQTT broker
m2m.eclipse.org

Raspberry Pi +
NodeJS MQTT client
MQTT broker
m2m.eclipse.org

Raspberry Pi +
NodeJS MQTT client
MQTT broker
m2m.eclipse.org

Raspberry Pi +
NodeJS MQTT client

Nexus 10 +
Java MQTT client +
metaio SDK
Network is unreliable
Objects need to be ID’d
Embedded is complex
Simplifying embedded for
home automation
with
.

http://www.deviantart.com/art/Android-Version-Cupcake-150995350
Eclipse Smart Home
•  A flexible framework for smart home
and ambient assisted living (AAL)
solutions.
•  Easy to extend (...
Ready to Play?
Ready to Play?
Data consolidation
Ready to Play?
Data consolidation
Alerting
Ready to Play?
Data consolidation
Alerting
User management
Ready to Play?
Data consolidation
Alerting
User management
etc.
Management dashboards
System diagnostics
(Big!) Data history
Register for a free trial!

http://airvantage.net
Get a greenhouse kit!

http://airvantage.github.io/devkit
http://m2m.eclipse.org
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
Upcoming SlideShare
Loading in...5
×

Leveraging Android for the Internet of Things with Eclipse M2M

6,340

Published on

The Eclipse M2M (Machine-to-Machine) open source initiative delivers a stack of open source building blocks that accelerate the development of connected solutions.

In this session, you’ll be briefly introduced to the Eclipse M2M projects and discover cool end-to-end examples (Augmented Reality anyone?) combining the use of Android API with Open Hardware platforms (Arduino, Raspberry Pi…) for doing fleet tracking, remote monitoring, home automation, and much more.

Published in: Technology

Transcript of "Leveraging Android for the Internet of Things with Eclipse M2M"

  1. 1. Leveraging Android for the Internet of Things with Eclipse M2M Droidcon London 24-27th October 2013 Benjamin Cabé | Sierra Wireless
  2. 2. Who I am •  Benjamin Cabé •  Open Source M2M Evangelist at Sierra Wireless •  Eclipse M2M WG chairperson
  3. 3. M2M?
  4. 4. M2M? IoT?
  5. 5. ❝ Technology that supports wired or wireless communication between devices
  6. 6. Typical architecture Healthcare example
  7. 7. IOT
  8. 8. IOT
  9. 9. However… It’s not as easy as it looks
  10. 10. Network is unreliable
  11. 11. Network is unreliable Objects need to be ID’d
  12. 12. Network is unreliable Objects need to be ID’d Embedded is complex
  13. 13. When all you want to do…
  14. 14. POST /turnOn GET /temperature
  15. 15. Eclipse M2M building blocks
  16. 16. Eclipse M2M building blocks protocols frameworks tools
  17. 17. Network is unreliable
  18. 18. MQTT
  19. 19. MQTT?
  20. 20. MQTT? M = Messaging
  21. 21. MQTT? M = Messaging Publish/subscribe protocol
  22. 22. MQTT? M = Messaging Publish/subscribe protocol Lightweight (bandwidth, battery, …)
  23. 23. 72.2 72.2
  24. 24. Show me the code! embedded device
  25. 25. Show me the code! var mqtt = require('mqtt'); var c = mqtt.createClient(1883, 
 'm2m.eclipse.org'); client.on('message’, cb); client.subscribe('/kettle232/switch'); client.publish('/kettle232/temp’, '72.2'); var cb = function(topic, message) { // turn the kettle on/off }
  26. 26. Show me the code! var mqtt = require('mqtt'); var c = mqtt.createClient(1883, 
 'm2m.eclipse.org'); client.on('message’, cb); client.subscribe('/kettle232/switch'); client.publish('/kettle232/temp’, '72.2'); var cb = function(topic, message) { // turn the kettle on/off }
  27. 27. Show me the code! var mqtt = require('mqtt'); var c = mqtt.createClient(1883, 
 'm2m.eclipse.org'); client.on('message’, cb); client.subscribe('/kettle232/switch'); client.publish('/kettle232/temp’, '72.2'); var cb = function(topic, message) { // turn the kettle on/off }
  28. 28. Show me the code! var mqtt = require('mqtt'); var c = mqtt.createClient(1883, 
 'm2m.eclipse.org'); client.on('message’, cb); client.subscribe('/kettle232/switch'); client.publish('/kettle232/temp’, '72.2'); var cb = function(topic, message) { // turn the kettle on/off }
  29. 29. Show me the code! Android device
  30. 30. Show me the code! MqttClient c = new MqttClient
 (
 "tcp://m2m.eclipse.org:1883",
 MqttClient.generateClientId()
 ); mqttClient.setCallback(…); mqttClient.connect(); mqttClient.subscribe("/teapot24232/#"); // the rest of your app
  31. 31. Show me the code! MqttClient c = new MqttClient
 (
 "tcp://m2m.eclipse.org:1883",
 MqttClient.generateClientId()
 ); mqttClient.setCallback(…); mqttClient.connect(); mqttClient.subscribe("/teapot24232/#"); // the rest of your app
  32. 32. Show me the code! MqttClient c = new MqttClient
 (
 "tcp://m2m.eclipse.org:1883",
 MqttClient.generateClientId()
 ); mqttClient.setCallback(…); mqttClient.connect(); mqttClient.subscribe("/teapot24232/#"); // the rest of your app
  33. 33. Show me the code! MqttClient c = new MqttClient
 (
 "tcp://m2m.eclipse.org:1883",
 MqttClient.generateClientId()
 ); mqttClient.setCallback(…); mqttClient.connect(); mqttClient.subscribe("/teapot24232/#"); // the rest of your app
  34. 34. Show me the code! Callback code: mqttClient.setCallback(new MqttCallback() { @Override public void messageArrived(String topic, 
 MqttMessage message) throws Exception { // process received message
 // e.g. display temperature value } // ... });
  35. 35. Show me the code! Callback code: mqttClient.setCallback(new MqttCallback() { @Override public void messageArrived(String topic, 
 MqttMessage message) throws Exception { // process received message
 // e.g. display temperature value } // ... });
  36. 36. Simple but not Stupid •  QoS –  at most once, at least once, exactly once, … •  “Last will & Testament” –  automatically publish a message when a client goes offline
  37. 37. More about MQTT http://eclipse.org/paho http://mqtt.org
  38. 38. Network is unreliable Objects need to be ID’d
  39. 39. So… now my objects talk … to me?
  40. 40. NFC RFID QR Code Bluetooth LE
  41. 41. How about * *? AR Augmented Reality
  42. 42. Demo! Connected greenhouse
  43. 43. Raspberry Pi + NodeJS MQTT client
  44. 44. Raspberry Pi + NodeJS MQTT client
  45. 45. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client
  46. 46. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client
  47. 47. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client Nexus 10 + Java MQTT client + metaio SDK
  48. 48. Network is unreliable Objects need to be ID’d Embedded is complex
  49. 49. Simplifying embedded for home automation with . http://www.deviantart.com/art/Android-Version-Cupcake-150995350
  50. 50. Eclipse Smart Home •  A flexible framework for smart home and ambient assisted living (AAL) solutions. •  Easy to extend (based on OSGi) •  Smooth Android integration
  51. 51. Ready to Play?
  52. 52. Ready to Play? Data consolidation
  53. 53. Ready to Play? Data consolidation Alerting
  54. 54. Ready to Play? Data consolidation Alerting User management
  55. 55. Ready to Play? Data consolidation Alerting User management etc.
  56. 56. Management dashboards
  57. 57. System diagnostics
  58. 58. (Big!) Data history
  59. 59. Register for a free trial! http://airvantage.net
  60. 60. Get a greenhouse kit! http://airvantage.github.io/devkit
  61. 61. http://m2m.eclipse.org
  62. 62. Thanks! Benjamin Cabé bcabe@sierrawireless.com | @kartben Liked it? … Share it!

×