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

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 Michelmfrancis
 
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 InformixPradeep Muthalpuredathe
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkToby Corbin
 
(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 AWSAmazon Web Services
 
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 ...sparktc
 
Programming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.ioProgramming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.ioGünter Obiltschnig
 
20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_Chesnokov20160201_resume_Vladimir_Chesnokov
20160201_resume_Vladimir_ChesnokovVladimir 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 ObiltschnigWithTheBest
 
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 PoutanenWithTheBest
 
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-ShmaSpark Summit
 
Web-controlled Christmas Lights
Web-controlled Christmas LightsWeb-controlled Christmas Lights
Web-controlled Christmas LightsSakir Temel
 
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 SummitAmazon Web Services
 
BigData in IoT #iotconfua
BigData in IoT #iotconfuaBigData in IoT #iotconfua
BigData in IoT #iotconfuaAndy Shutka
 
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 KuehneMichael Kuehne-Schlinkert
 
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 workflowsAniruddha Chakrabarti
 
Real time analytics in Azure IoT
Real time analytics in Azure IoT Real time analytics in Azure IoT
Real time analytics in Azure IoT Sam Vanhoutte
 

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 Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdfkeithzhangding
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
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 2024APNIC
 

Recently uploaded (20)

Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
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
 

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