EVMetricsOBD
Open Source EV Diagnostics
EVMetricsOBD is a specialized application designed for Electric Vehicles (EVs).
Unlike standard OBD2 scanners that focus on emissions (ICE) data, this tool interacts with
EV-specific gateways to read battery state, charging speed, and proprietary internal parameters
via the SwiftOBD2 library.
Designed as a macOS Unsandboxed application, it bypasses standard App Store restrictions to access the full Bluetooth stack and hardware communication channels needed for deep analysis.
Key Features
- Dongle Testing: Verify connection protocols (ISO 15765-4, SAE J1850) with your adapter.
- Reverse Engineering: Send manual HEX commands (e.g., UDS Service $22) to discover undocumented PIDs.
- DTC Scanner: Read and clear Diagnostic Trouble Codes from various ECUs.
- Car Templates: Pre-configured "Plug-and-Play" templates for major EVs.
Technical Architecture
The application follows a modern MVVM (Model-View-ViewModel) pattern using SwiftUI.
- SwiftOBD2 Integration: Serves as the core communication layer for BLE and Wi-Fi adapters.
- TemplateManager: dynamically manages vehicle-specific configurations (`CarTemplate`), allowing the app to adapt connection strategies (Simple polling vs active UDS vs passive sniffing).
- ConnectionManager: Handles the complex state machine of maintaining a stable link to hardware dongles.
Getting Started
To build and run the project locally:
- Clone the repository from GitHub.
- Open
evmetricsobd.xcodeprojin Xcode (14.0+ required). - Ensure you have a valid Development Certificate for the Unsandboxed entitlements.
- Build and run on your Mac or iOS device.