MQTT Integration

Any broker. Any platform that speaks MQTT.

Car 2 Home is a fully featured MQTT client. Every sensor your vehicle exposes — standard OBD, enhanced PIDs, calculated metrics, GPS, TPMS, diagnostic state — gets published to your broker. You pick the publishing format: Home Assistant auto-discovery (the default), Homie 4.0, simple per-sensor topics, unified JSON, or a ThingsBoard preset.

If you already run Mosquitto, EMQX, HiveMQ, or any other broker, you're a couple of fields away from a working setup. Car 2 Home does not depend on our servers for any of this, telemetry goes directly from the app to your broker.


MQTT vs. native Home Assistant

Both paths carry the same sensors. The difference is that MQTT carries continuous state, while the native Home Assistant integration also carries events (trip started, DTC found, harsh acceleration). If you only need MQTT, you'll get all the live data, but the discrete moments that drive the most interesting automations only exist in the native integration.

CapabilityMQTTNative HA
Continuous state
Sensor values published as they change.
Events
trip_started, trip_ended, dtc_found, harsh_event, ecu_online/offline.
Bidirectional commands
Home Assistant can ask the car to scan for DTCs or re-announce sensors.

How data is published

  • Auto-discovery payloads are sent with retain=true so any broker subscriber that comes online later sees the entity catalog immediately.
  • Delta updates only: values are republished only when they change, with optional throttling, to avoid flooding the broker.
  • Enumerated PIDs are decoded: Fuel Type "1" becomes "Gasoline", commanded equivalence ratio is reported as a fraction, etc. Both raw and human-readable values are exposed as attributes.
  • Material Design icons are included in discovery payloads, so dashboards render correctly out of the box.
  • Configurable QoS per topic class. Sensor state defaults to QoS 0; lifecycle messages use QoS 1.
  • TLS and authentication supported; credentials stored in iOS Keychain / Android Keystore.

Works with

Anything that speaks MQTT, paired with the right publishing format (see above). We test regularly against:

  • Home Assistant via the MQTT integration with the Home Assistant Discovery format (auto-detected).
  • OpenHAB and ioBroker with the Homie 4.0 format (MQTT Homie binding / MQTT Client adapter).
  • Hubitat, Node-RED, Domoticz with the Simple Topics format.
  • Grafana + Telegraf / InfluxDB and custom dashboards with the Unified JSON format.
  • ThingsBoard CE / Cloud with the ThingsBoard preset; ESPHome bridges and any DIY MQTT consumer with Simple Topics or Unified JSON.

Publishing formats

Pick the format that matches your destination platform. The default Home Assistant Discovery covers HA out of the box; switch to one of the others for OpenHAB, Hubitat, generic dashboards, or ThingsBoard.

Home Assistant Discovery

Default. Auto-discovery payloads under homeassistant/<component>/<deviceId>/<sensor>/config. The car shows up in HA Settings → Devices & Services → MQTT automatically. Continuous state is published as a JSON batch on <prefix>/<deviceId>/state.

Homie 4.0

Open standard with discovery via a homie/<deviceId>/$nodes topology and per-property $datatype / $unit / $format metadata. Native target for OpenHAB (MQTT Homie binding) and ioBroker (MQTT Client adapter). Also fits ESPHome ecosystems.

Simple topics

One MQTT topic per sensor, no discovery. Payload toggles between the raw value (e.g. 1850) or {value, ts} JSON. Works with Hubitat, Node-RED, Domoticz and any generic MQTT consumer.

Unified JSON

Every sensor in a single JSON payload to a configurable topic, retained for late subscribers. Good fit for Grafana, InfluxDB / Telegraf and custom dashboards that prefer to subscribe to one topic and parse the full vehicle snapshot.

ThingsBoard

Native preset for ThingsBoard CE and ThingsBoard Cloud. Publishes telemetry to v1/devices/me/telemetry and static sensors (VIN, fuel type, CalID) to v1/devices/me/attributes. Your access token goes in the Username field; leave Password empty.

Switch formats anytime in Settings → MQTT → Format. When you change away from Home Assistant or Homie, the app offers to clean up retained discovery topics left on the broker so you don't see ghost devices on the consumer side.


Choosing a broker

If you don't already run one, here's a starting point:

  • Mosquitto: the simplest option. Runs as a Home Assistant add-on with one click, or stand-alone in Docker. Enough for a household.
  • EMQX: clustered, scales well, has a clean web UI. Worth it if you have many devices or want detailed monitoring.
  • HiveMQ: solid commercial / cloud option if you don't want to self-host.

Quick setup

  1. 1. Have a broker reachable from your phone

    Either on your local network or via a tunnel (Tailscale, Cloudflare Tunnel, Nabu Casa). MQTT must be reachable while you're driving for telemetry to flow live.

  2. 2. Open Settings → MQTT in the app

    Enter host, port, username, password, optional TLS settings. The app validates the connection and shows status in real time.

  3. 3. Subscribe and watch the entities arrive

    Auto-discovery payloads are published immediately. In Home Assistant, the device shows up under Settings → Devices & Services → MQTT. In Node-RED or any MQTT explorer, browse the topic tree under your configured prefix.

See the step-by-step setup guide

Matter / SmartThings / Google Home / Alexa

We're building a Matterbridge plugin that re-exports the same MQTT data as Matter devices, making your car discoverable in Apple Home, Google Home, SmartThings and Alexa with zero broker on the consumer side. Coming soon.