Version 1.0
OpenECU Specification & API
YAML-based specifications for ECU adapters and CAN protocols, accessible via public REST API.
Public API Endpoints
Access specs programmatically via REST API. All endpoints return JSON by default, with raw YAML available via *-raw endpoints.
| Method | Endpoint | Description | Response |
|---|---|---|---|
| GET | /api/specs/adapters | List all available adapters with summary info | Array of adapter objects (JSON) |
| GET | /api/specs/adapters/:vendor/:id | Get full adapter specification with all channels | Complete adapter object (JSON) |
| GET | /api/specs/adapters-raw/:vendor/:id | Download raw YAML adapter file | Raw YAML file |
| GET | /api/specs/protocols | List all available CAN protocols with summary info | Array of protocol objects (JSON) |
| GET | /api/specs/protocols/:vendor/:id | Get full CAN protocol specification | Complete protocol object (JSON) |
| GET | /api/specs/protocols-raw/:vendor/:id | Download raw YAML protocol file | Raw YAML file |
API Usage Examples
JavaScript / TypeScript
javascript
// Fetch all adapters
const response = await fetch('https://openecualliance.org/api/specs/adapters');
const adapters = await response.json();
// Fetch specific adapter
const adapter = await fetch('https://openecualliance.org/api/specs/adapters/haltech/haltech-nsp');
const haltechSpec = await adapter.json();
// Download raw YAML
const yaml = await fetch('https://openecualliance.org/api/specs/adapters-raw/haltech/haltech-nsp');
const yamlText = await yaml.text();cURL
bash
# List all adapters
curl https://openecualliance.org/api/specs/adapters
# Get specific adapter (parsed JSON)
curl https://openecualliance.org/api/specs/adapters/haltech/haltech-nsp
# Download raw YAML
curl https://openecualliance.org/api/specs/adapters-raw/haltech/haltech-nspContent Types
Common Structure
All content types share these root-level fields:
| Field | Description | Required |
|---|---|---|
openecualliance | Spec version (currently "1.0") | |
type | Content type: adapter or protocol | |
id | Unique identifier (lowercase, hyphens) | |
name | Human-readable display name | |
version | Semantic version (e.g., 1.0.0) | |
vendor | ECU vendor or manufacturer | |
description | Detailed description | |
website | URL for more information | |
branding | Logo, icon, colors | |
metadata | Author, license, changelog |
Example Adapter
yaml
openecualliance: "1.0"
type: adapter
id: haltech-nsp
name: "Haltech NSP"
version: "1.0.0"
vendor: haltech
description: "Haltech NSP CSV log format"
website: "https://haltech.com"
branding:
logo: haltech-logo.svg
color_primary: "#FFBE1A"
file_format:
type: csv
delimiter: ","
header_row: 0
data_start_row: 1
channels:
- id: rpm
name: "Engine RPM"
category: engine
data_type: float
unit: rpm
source_names:
- "Engine RPM"
- "RPM"Canonical Channel IDs
Standardized identifiers for common ECU channels. Use these in adapters for cross-format compatibility.
rpmEngine RPMtpsThrottle PositionmapManifold Absolute Pressurecoolant_tempCoolant TemperatureiatIntake Air TemperatureafrAir-Fuel RatiolambdaLambdaboostBoost Pressurebattery_voltageBattery Voltagevehicle_speedVehicle Speedignition_advanceIgnition Timingduty_cycleInjector Duty CycleUnits Reference
Temperature
celsiusfahrenheitkelvin
Pressure
kpapsibarmbar
Speed
rpmkphmph
Ratio
afrlambdapercent
Time
secondsmilliseconds
Electrical
voltsamps
Validation
Validate your YAML files against the JSON Schema:
bash
# Using ajv-cli (Node.js)
npx ajv-cli validate -s schema/adapter.schema.json -d your-adapter.yaml
# Using check-jsonschema (Python)
check-jsonschema --schemafile schema/adapter.schema.json your-adapter.yaml