https://github.com/leogr/obdflux
An agent for collecting automotive metrics from OBD-II system on InfluxDB
https://github.com/leogr/obdflux
automotive elm327 influxdb obd
Last synced: 3 months ago
JSON representation
An agent for collecting automotive metrics from OBD-II system on InfluxDB
- Host: GitHub
- URL: https://github.com/leogr/obdflux
- Owner: leogr
- License: mit
- Created: 2018-11-26T14:13:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T15:16:08.000Z (about 2 years ago)
- Last Synced: 2025-04-11T18:40:46.341Z (6 months ago)
- Topics: automotive, elm327, influxdb, obd
- Language: Go
- Homepage:
- Size: 579 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# obdflux
> An agent for collecting automotive metrics from [OBD-II](https://en.wikipedia.org/wiki/On-board_diagnostics) system on InfluxDB
*Currently, this project is a **WORK IN PROGRESS**, so consider it useful for experimentation. Use at your own risk.*
## Building
```
GO111MODULE=on go build
```## Configuration
`obdflux` requires a running instance of InfluxDB to connect to. You can use your own installation or just use the provided `docker-compose.yml` by:
```
docker-compose up -d
```Once your InfluxDB is up and running, create a new database by running:
```
docker-compose run influxdb-cli
```
then
```
CREATE DATABASE obdflux
```Finally, create the `.env` file:
```
cp .env.example .env
```and modify it if needed (or just leave it as is, if you're using the included `docker-compose.yml`).
## Usage
To start, you need an `ELM327` compatible device connected to your system and get the path to the device.
For futher information on how to get the device path, please refer to the Go library [elmobd](https://github.com/rzetterberg/elmobd) which is used by `obdflux` to handle the underlying OBD-II specs and device serial communication.Once you know the your device path (e.g. `/dev/ttyYOUR_USB_DEVICE`), run `obdflux`:
```
./obdflux --serial=/dev/ttyYOUR_USB_DEVICE
```## Testing
In order to test `obdflux` without a real device you can use the `--test=true` option.
Finally, if you need a more verbose output, you can turn on debugging mode by setting `--debug=true` option.Example:
```
./obdflux --test=true --debug=true
```## Demo
## License
MIT