SlideShare a Scribd company logo
1 of 26
Car Monitoring Project
Leonardo Sarra - Gabriele Cervelli - Giorgio De Magistris
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
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.
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:
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
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.
Code snippet - Get data from OBD
- 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
Code snippet - Creating data stream
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
Code snippet - Sensors as objects (Android side)
On the Android side I will
override interfaces’
methods
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
IBM Bluemix Cloud
Services
IBM Cloudant
Database
Managing devices and storing data
IBM Bluemix Dashboard
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.
- 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
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.
Our IBM Cloud Function to mirror insertions
- 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:
- 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
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
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 . . . )
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
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
Contacts
- Leonardo Sarra - LinkedIn, GitHub
- Gabriele Cervelli - LinkedIn, GitHub
- Giorgio De Magistris - LinkedIn, GitHub
Source-code
github.com/car-monitoring-sapienza-iot-2019
Thank You!

More Related Content

Similar to Car Monitoring IoT Project

20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_Chesnokov20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_Chesnokov
Vladimir Chesnokov
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
WithTheBest
 
Rapid IoT Application Development with IBM Bluemix - Mikko Poutanen
Rapid IoT Application Development with IBM Bluemix - Mikko PoutanenRapid IoT Application Development with IBM Bluemix - Mikko Poutanen
Rapid IoT Application Development with IBM Bluemix - Mikko Poutanen
WithTheBest
 

Similar to Car Monitoring IoT Project (20)

OSGi Technology in the Vehicle - H U Michel
OSGi Technology in the Vehicle - H U MichelOSGi Technology in the Vehicle - H U Michel
OSGi Technology in the Vehicle - H U Michel
 
IoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM InformixIoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM Informix
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdk
 
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
 
How Spark Enables the Internet of Things: Efficient Integration of Multiple ...
How Spark Enables the Internet of Things: Efficient Integration of Multiple ...How Spark Enables the Internet of Things: Efficient Integration of Multiple ...
How Spark Enables the Internet of Things: Efficient Integration of Multiple ...
 
Programming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.ioProgramming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.io
 
20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_Chesnokov20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_Chesnokov
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
 
Rapid IoT Application Development with IBM Bluemix - Mikko Poutanen
Rapid IoT Application Development with IBM Bluemix - Mikko PoutanenRapid IoT Application Development with IBM Bluemix - Mikko Poutanen
Rapid IoT Application Development with IBM Bluemix - Mikko Poutanen
 
How Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-ShmaHow Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-Shma
 
Web-controlled Christmas Lights
Web-controlled Christmas LightsWeb-controlled Christmas Lights
Web-controlled Christmas Lights
 
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS SummitDiscover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
 
Internet of Things and Big Data
Internet of Things and Big DataInternet of Things and Big Data
Internet of Things and Big Data
 
BigData in IoT #iotconfua
BigData in IoT #iotconfuaBigData in IoT #iotconfua
BigData in IoT #iotconfua
 
Cariot
CariotCariot
Cariot
 
Big Data Application Architectures - IoT
Big Data Application Architectures - IoTBig Data Application Architectures - IoT
Big Data Application Architectures - IoT
 
node.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehne
node.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehnenode.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehne
node.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehne
 
Using Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsUsing Node-RED for building IoT workflows
Using Node-RED for building IoT workflows
 
Real time analytics in Azure IoT
Real time analytics in Azure IoT Real time analytics in Azure IoT
Real time analytics in Azure IoT
 
Open source industrial IoT
Open source industrial IoTOpen source industrial IoT
Open source industrial IoT
 

Recently uploaded

Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 

Recently uploaded (20)

Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 

Car Monitoring IoT Project

  • 1. Car Monitoring Project Leonardo Sarra - Gabriele Cervelli - Giorgio De Magistris
  • 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. 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. 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. 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. 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. Code snippet - Get data from OBD
  • 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. Code snippet - Creating data stream
  • 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. Code snippet - Sensors as objects (Android side) On the Android side I will override interfaces’ methods
  • 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. IBM Bluemix Cloud Services IBM Cloudant Database Managing devices and storing data
  • 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. - 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. 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. Our IBM Cloud Function to mirror insertions
  • 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. - 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. 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. 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. 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. 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. Contacts - Leonardo Sarra - LinkedIn, GitHub - Gabriele Cervelli - LinkedIn, GitHub - Giorgio De Magistris - LinkedIn, GitHub Source-code github.com/car-monitoring-sapienza-iot-2019