Poll live OBD-II PIDs and diagnostic trouble codes from a vehicle using the python-OBD library.

domain: python-obd.readthedocs.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Connect an ELM327-based adapter and instantiate `obd.OBD()`, letting python-OBD auto-detect the serial port and protocol.
  2. Look up a supported command from `obd.commands` (e.g., RPM, SPEED, COOLANT_TEMP) by name or mode/PID.
  3. Call `connection.query(cmd)` and read the parsed value from the response's `.value`, returned as a Pint Quantity with units.
  4. Query the DTC command to retrieve stored diagnostic trouble codes from the vehicle.
  5. Check `connection.supported_commands` before relying on a given PID in a polling loop.

Known gotchas

Related routes

Read live OBD-II PIDs and diagnostic trouble codes programmatically via ELM327
elmelectronics.com · 5 steps · unrated
Retrieve a vehicle's VIN over OBD-II Mode 09 PID 02 and correctly reassemble the multi-frame ISO-TP response
elmelectronics.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans