Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Nächste SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Wird geladen in …3
×
1 von 26

Car Monitoring IoT Project

0

Teilen

Herunterladen, um offline zu lesen

A presentation about a project that we developed to create generate a colormap of urban traffic condition and vehicle diagnostic

Ähnliche Bücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Car Monitoring IoT Project

  1. 1. Car Monitoring Project Leonardo Sarra - Gabriele Cervelli - Giorgio De Magistris
  2. 2. Previously on… - Obtain data from multiple cars - Process locally the data and send them to a remote server - Provide meaningful infographics thanks to the aggregation of the data received The idea: Technologies & services: - OBD connector - Android SDK - Apache Edgent - IBM Watson IOT Platform - Kibana
  3. 3. OBD connector - Provide a bluetooth interface to the car’s on-board computer - Wide range of information: fuel, oil, distance, throttle, brake and error codes… - Available information may change depending on the car, the OEM and the revision of the OBD module.
  4. 4. The Android Application - Written in Kotlin using AndroidX support libraries - Modular design - Supports smartphones with Android 8+ - Painful spartan UI - Handle Bluetooth connection (and setup). - Join together OBD’s info and the GPS location - Send a stream data to IBM Watson IOT Role:
  5. 5. App’s modules - OBD Java API, a community-developed set of APIs to write queries for the OBD2/ELM327 module - Car-Monitoring-Edgent, our library to pack data and create a stream to a remote service
  6. 6. Code snippet - Setup OBD connection Before killing the connection remember it is important to remember to reset the OBD state using the “Close” command, otherwise you may fail connecting later on.
  7. 7. Code snippet - Get data from OBD
  8. 8. - Written in Java with Android in mind - Uses Apache Edgent to create a stream of data and send it over IBM Watson IOT - Uses a lightweight connectivity protocol (MQTT) - Provides a set of interfaces to read from the car’s sensors - Takes care of joining the data into a single JSON Object Car Monitoring Edgent library
  9. 9. Code snippet - Creating data stream
  10. 10. Code snippet - Sensors as objects (Edgent-side) We expect object that sensors that implement those interfaces in order to get the data with a fixed-interval schedule
  11. 11. Code snippet - Sensors as objects (Android side) On the Android side I will override interfaces’ methods
  12. 12. Technical difficulties: - No reliable a priori knowledge of the available sensors - Bluetooth interface may fail from time to time - Writing and testing code in the car is not a pleasant experience - I don’t have a driving license… yet Solution: OBDSim
  13. 13. IBM Bluemix Cloud Services IBM Cloudant Database Managing devices and storing data
  14. 14. IBM Bluemix Dashboard
  15. 15. Cloudant Database - NoSQL structure - 1 GB free data storage - JSON documents - Monthly bucket - Binding with Watson IOT Platform requires very few steps - Create an alias of your Cloudant instance into your Cloud Foundry project space through IBM CLI. - Then bind that through Watson dashboard.
  16. 16. - Message Hub Server - 200 MB IN/OUT traffic per month (free plan) - Role: Receives payloads from Apache Edgent devices and automatically stores data in Cloudant DB
  17. 17. Code snippet - Mirroring data to Elastic DB - DB feed fires the trigger. - Trigger is mapped to a chain (sequence) of actions through a rule. - Our first actionis to read last insertion and to pass it to a custom Python function. - The function will actually send a PUT request to Elastic DB.
  18. 18. Our IBM Cloud Function to mirror insertions
  19. 19. - Hard to find what you are looking for in IBM and Apache Edgent documentation (e.g. broken links, discrepancies, outdated docs) - IBM Documentation assumes you know things you couldn’t know about their services. (It gave to me headaches because i had no idea of what was missing) Technical difficulties:
  20. 20. - Powerful and open source search engine - Allows plain-text or structured queries over collections of JSON documents - Built on top of Elastic - Console to interact with Elastic - Wide choice of tools for visualizing data Managing data
  21. 21. Elastic Indices - Documents are organized in Indices - The definition includes the name of each field and its type - Allows complex type and nested fields - JSON format
  22. 22. Visualizing with Kibana- Visualizations in Kibana can shows either the result of a query or the entire database - Allow filtering - Aggregators group documents by a given attribute applying an aggregation function (Count, AVG . . . )
  23. 23. Infographics - Colormap to show real time traffic - Refresh rate each 5 seconds - Time range of 15 minutes - Speed ranges adapting to the current viewing area
  24. 24. Infographics II - Bar chart showing how many vehicles have engine temperature in a given range - This kind of diagnostic information could be used by car producer to improve their products
  25. 25. Contacts - Leonardo Sarra - LinkedIn, GitHub - Gabriele Cervelli - LinkedIn, GitHub - Giorgio De Magistris - LinkedIn, GitHub Source-code github.com/car-monitoring-sapienza-iot-2019
  26. 26. Thank You!

×