Leveraging Android for the Internet of Things with Eclipse M2M

13,700 views

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

Leveraging Android for the Internet of Things with Eclipse M2M

  1. Leveraging Android for the Internet of Things with Eclipse M2M Droidcon London 24-27th October 2013 Benjamin Cabé | Sierra Wireless
  2. Who I am •  Benjamin Cabé •  Open Source M2M Evangelist at Sierra Wireless •  Eclipse M2M WG chairperson
  3. M2M?
  4. M2M? IoT?
  5. ❝ Technology that supports wired or wireless communication between devices
  6. Typical architecture Healthcare example
  7. IOT
  8. IOT
  9. However… It’s not as easy as it looks
  10. Network is unreliable
  11. Network is unreliable Objects need to be ID’d
  12. Network is unreliable Objects need to be ID’d Embedded is complex
  13. When all you want to do…
  14. POST /turnOn GET /temperature
  15. Eclipse M2M building blocks
  16. Eclipse M2M building blocks protocols frameworks tools
  17. Network is unreliable
  18. MQTT
  19. MQTT?
  20. MQTT? M = Messaging
  21. MQTT? M = Messaging Publish/subscribe protocol
  22. MQTT? M = Messaging Publish/subscribe protocol Lightweight (bandwidth, battery, …)
  23. 72.2 72.2
  24. Show me the code! embedded device
  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. 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. 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. 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. Show me the code! Android device
  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. 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. 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. 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. 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. 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. 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. More about MQTT http://eclipse.org/paho http://mqtt.org
  38. Network is unreliable Objects need to be ID’d
  39. So… now my objects talk … to me?
  40. NFC RFID QR Code Bluetooth LE
  41. How about * *? AR Augmented Reality
  42. Demo! Connected greenhouse
  43. Raspberry Pi + NodeJS MQTT client
  44. Raspberry Pi + NodeJS MQTT client
  45. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client
  46. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client
  47. MQTT broker m2m.eclipse.org Raspberry Pi + NodeJS MQTT client Nexus 10 + Java MQTT client + metaio SDK
  48. Network is unreliable Objects need to be ID’d Embedded is complex
  49. Simplifying embedded for home automation with . http://www.deviantart.com/art/Android-Version-Cupcake-150995350
  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. Ready to Play?
  52. Ready to Play? Data consolidation
  53. Ready to Play? Data consolidation Alerting
  54. Ready to Play? Data consolidation Alerting User management
  55. Ready to Play? Data consolidation Alerting User management etc.
  56. Management dashboards
  57. System diagnostics
  58. (Big!) Data history
  59. Register for a free trial! http://airvantage.net
  60. Get a greenhouse kit! http://airvantage.github.io/devkit
  61. http://m2m.eclipse.org
  62. Thanks! Benjamin Cabé bcabe@sierrawireless.com | @kartben Liked it? … Share it!

×