Integrate OBD-II Data into Home Assistant via Bluetooth & WebSockets

Hi everyone,

I wanted to share a project I've been working on to bring real-time vehicle OBD-II data straight into Home Assistant.

It consists of an Android app that reads OBD data via Bluetooth and bridges it to Home Assistant using WebSockets.

Here are the components that make it work:

  • hassble-android: The Android application that connects to your OBD-II Bluetooth adapter and fetches the data.

  • hass-ws-bridge: The Home Assistant custom component that communicates with the app via WebSockets and exposes the data as sensors.

  • hassble-config: A configuration repository to help you set up and customize your sensors easily.

How it works

  1. The Android app connects to your car's OBD-II Bluetooth dongle.

  2. It sends the data to Home Assistant via the WebSocket bridge.

  3. Your car's metrics are exposed as native Home Assistant sensors for your dashboards and automations.

7 Likes

This is great. Are we able to have the OBD PIDs as loadable pairs in some form of JSON file, with the values and descriptors loaded at run time, so different vehicle manufacrurers PIDs can be loaded, not just the generic ones? Maybe select by GUI, ticking them off.

I'm thinking battery charge time and distance remaining, etc for electric vehicles where I don't think standard PIDs exist.

People could add to the database of PIDs for different vehicles, and you could select for which to use based on your preferences.

A central depository of PIDs would be ideal.

Yes, the app uses https://github.com/eigger/hassble-config as its default repository. Users can also fork it or use their own personal repositories. Right now, the repository only has predefined PIDs, but the configuration format allows for manual setup. So, as long as the PID and formula are known, it can be configured right away—and once those items are set up in the repository, users can add them in the app with just a single click.

For people that look up or discover the PIDs that are specific for their vehicles, do you want them to post them here in this thread to share with everyone else?

That sounds good. I can't track down every single PID on my own, so it would be great if we could all share them here. For reference, I’ve also opened a dedicated issue on GitHub for sharing them.