Skip to content

Prometheus exporter for automotive sensor metrics exposed by OBD-II using ELM327 based USB-devices.

Notifications You must be signed in to change notification settings

rzetterberg/obd_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Version
0.2.1

Prometheus exporter for automotive sensor metrics exposed by OBD-II using ELM327 based USB-devices.

Using this exporter you can collect metrics from your car, metrics such as:

  • Engine RPM
  • Coolant temperature
  • Intake manifold pressure
  • Engine load
  • Etc.

Uses my Go library elmobd to handle the heavy lifting.

Usage

To simplify testing how obd_exporter works there is a docker-compose.yaml file in this project that when used sets up Prometheus to store the metrics that obd_exporter exposes and Grafana to visualize the metrics from Prometheus.

All Dockerfiles are based on official images, you can verify this by looking in the containers directory.

Before starting the Docker containers, you need to plugin your ELM327 device into your car and your computer, then turn on the cars ignition. After that you need to get the path of your ELM327 device.

You can plugin the device and check dmesg, this is what I get on my computer:

$ dmesg | tail
[359720.858480] usb 6-2: Manufacturer: FTDI
[359720.858482] usb 6-2: SerialNumber: A503GJEX
[359720.897717] usbcore: registered new interface driver usbserial
[359720.897733] usbcore: registered new interface driver usbserial_generic
[359720.897748] usbserial: USB Serial support registered for generic
[359720.901755] usbcore: registered new interface driver ftdi_sio
[359720.901767] usbserial: USB Serial support registered for FTDI USB Serial Device
[359720.901839] ftdi_sio 6-2:1.0: FTDI USB Serial Device converter detected
[359720.901913] usb 6-2: Detected FT232RL
[359720.904481] usb 6-2: FTDI USB Serial Device converter now attached to ttyUSB0

After that, if your device has another path other than /dev/ttyUSB0 you need to change the devices value of the obd_exporter in the docker-compose.yaml file.

After that you can just start the Docker containers:

docker-compose up

Then open http://127.0.0.1:3000 in your web browser and log into Grafana with:

User
admin
Password
dev

There will be a predefined dashboard called “Basic metrics”.

Supported sensors

PIDName
4Engine load
5Coolant temperature
10Fuel pressure
11Intake manifold pressure
12Engine RPM
13Vehicle speed
14Timing advance
15Intake air temperature
16MAF air flow rate
17Throttle position

About

Prometheus exporter for automotive sensor metrics exposed by OBD-II using ELM327 based USB-devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published