{"id":17668489,"url":"https://github.com/evanshortiss/obd-parser","last_synced_at":"2025-08-19T06:38:22.560Z","repository":{"id":57332204,"uuid":"52399024","full_name":"evanshortiss/obd-parser","owner":"evanshortiss","description":"Write commands to a generic OBDII connection and parse responses","archived":false,"fork":false,"pushed_at":"2017-10-19T17:10:21.000Z","size":86,"stargazers_count":39,"open_issues_count":2,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-09T12:43:47.668Z","etag":null,"topics":["bluetooth","ecu","elm327","obd","obd-ii","obd-parser","obd2","poll","serial","typescript","vehicle","vehicular-networks"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evanshortiss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-23T23:21:29.000Z","updated_at":"2025-07-28T06:55:51.000Z","dependencies_parsed_at":"2022-09-15T12:22:23.515Z","dependency_job_id":null,"html_url":"https://github.com/evanshortiss/obd-parser","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/evanshortiss/obd-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanshortiss%2Fobd-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanshortiss%2Fobd-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanshortiss%2Fobd-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanshortiss%2Fobd-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evanshortiss","download_url":"https://codeload.github.com/evanshortiss/obd-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanshortiss%2Fobd-parser/sbom","scorecard":{"id":385765,"data":{"date":"2025-08-11","repo":{"name":"github.com/evanshortiss/obd-parser","commit":"9aa4913a985fc81b1cf5a90296409de8ff09f79a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T16:34:38.245Z","repository_id":57332204,"created_at":"2025-08-18T16:34:38.245Z","updated_at":"2025-08-18T16:34:38.245Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271113829,"owners_count":24701614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bluetooth","ecu","elm327","obd","obd-ii","obd-parser","obd2","poll","serial","typescript","vehicle","vehicular-networks"],"created_at":"2024-10-23T23:22:44.828Z","updated_at":"2025-08-19T06:38:22.537Z","avatar_url":"https://github.com/evanshortiss.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"obd-parser\n==========\n\n[![Circle CI](https://circleci.com/gh/evanshortiss/obd-parser/tree/master.svg?style=svg)](https://circleci.com/gh/evanshortiss/obd-parser/tree/master)\n\n\nA module for interacting with the OBD (On Board Diagnostics) of vehicles\nvia ELM 327 connections.\n\n## Install\n\n```\nnpm install obd-parser --save\n```\n\nAfter this you will need to install a module that facilitates connecting to\nthe ECU. At present only _obd-parser-serial-connection_ is available - this \nrequires a USB to OBD connection such as [these](https://www.amazon.com/s/ref=nb_sb_noss/163-4411256-8552763?url=search-alias%3Daps\u0026field-keywords=obd+usb). \n\n```\nnpm install obd-parser-serial-connection --save\n```\n\n## Usage\nThis example uses TypeScript, but the examples folder has the JavaScript code,\nthe JavaScript code is also pasted below for reference.\n\n```ts\n\n// In your code this should be changed to 'obd-parser'\nimport * as OBD from 'obd-parser';\n\n// Use a serial connection to connect\nvar getConnector = require('obd-parser-serial-connection');\n\n// Returns a function that will allow us to connect to the serial port\nvar connectorFn:Function = getConnector({\n  // This might vary based on OS - this is the Mac OSX example\n  serialPath: '/dev/tty.usbserial',\n\n  // Might vary based on vehicle. This is the baudrate for a MK6 VW GTI\n  serialOpts: {\n    baudrate: 38400\n  }\n});\n\n// Need to initialise the OBD module with a \"connector\" before starting\nOBD.init(connectorFn)\n  .then(function () {\n    // We've successfully connected. Can now create ECUPoller instances\n    const rpmPoller:OBD.ECUPoller = new OBD.ECUPoller({\n      // Pass an instance of the RPM PID to poll for RPM\n      pid: new OBD.PIDS.Rpm(),\n      // Poll every 1500 milliseconds\n      interval: 1500\n    });\n\n    // Bind an event handler for anytime RPM data is available\n    rpmPoller.on('data', function (output: OBD.OBDOutput) {\n      console.log('==== Got RPM Output ====');\n      // Timestamp (Date object) for wheb the response was received\n      console.log('time: ', output.ts);\n      // The bytes returned from the ECU when asked from RPM\n      console.log('bytes: ', output.bytes);\n      // A value that's usuall numeric e.g 1200\n      console.log('value: ', output.value);\n      // This will be a value such as \"1200rpm\"\n      console.log('pretty: ', output.pretty);\n    });\n\n    // Start polling (every 1500ms as specified above)\n    rpmPoller.startPolling();\n  });\n\n```\n\n\n## Supported PIDs\nCurrently the module has support for a limited number of PIDs. PID support can\neasily be added by adding a new PID definition in _lib/pids/pid.ts_. You can find\ninformation that will assist PID implementation on\n[this Wiki](https://en.wikipedia.org/wiki/OBD-II_PIDs).\n\nFor the most up to date list see this\n[directory](https://github.com/evanshortiss/obd-reader/tree/master/lib/pids/pid.ts),\nor the below list:\n\n* ENGINE_COOLANT_TEMPERATURE (05)\n* FUEL_LEVEL_INPUT (2F)\n* ENGINE_RPM (0C)\n* VEHICLE_SPEED (0D)\n\nIf using TypeScript you can also type \"OBD.PIDS\" and intellisense will display\navailable options.\n\n\n## API\n\n### OBD.init(connectorFn)\nInitialise the parser. _connectorFn_ should be a connector function\ngenerated by a module such as obd-parser-serial-connection.\n\n### OBD.ECUPoller(args: PollerArgs) (Class)\nA class that can be used to create ECUPoller instances. These must be passed\nan args Object that contains:\n\n* pid - An instance of any PID, e.g _new OBD.PIDS.Rpm()_\n* interval - The number of milliseconds two wait bewteen polling if\n_startPolling()_ is called.\n\nYou should only create one instance of a given ECUPoller and PID combination\nat a time unless you're sure about what you're doing. \n\n#### ECUPoller.poll()\nSends a poll to the ECU for this ECUPoller's PID. Returns Promise that will\nresolve with an Object matching the OBDOutput interface. If you want you can\nignore the Promise and instead bind a \"data\" listener like the example in this\nREADME file.\n\n#### ECUPoller.startPolling() and ECUPoller.stopPolling()\nStarts a constant poll loop that queries as near to the _args.interval_ passed\nto this ECUPoller. If it is not receiving responses it will not send new polls\neven if it reaches the interval since we want to prevent flooding the ECU.\n\n### OBD.PIDS\nThis is an Object with PID Classes attached, currently valid options are\ndemonstrated below:\n\n```ts\nimport * as OBD from 'obd-parser';\n\nnew OBD.PIDS.FuelLevel();\nnew OBD.PIDS.Rpm();\nnew OBD.PIDS.VehicleSpeed();\nnew OBD.PIDS.CoolantTemp();\n\n// This is the base class used by all above PIDS. You might want to extend\n// this to create your own PIDs (don't forget to contribute them here!)\nnew OBD.PIDS.PID();\n```\n\n### OBD.OBDOutput\nUsed in TypeScript environments to apply typing to poll \"data\" events and\nPromise results.\n\n\n## Pure JavaScript Example\n\nPure JavaScript example. It is almost identical to the TypeScript version from\nabove in this README.\n\n```javascript\n'use strict';\n\nvar OBD = require('obd-parser');\n\nvar getConnector = require('obd-parser-serial-connection');\n\nvar connect = getConnector({\n  serialPath: '/dev/tty.usbserial',\n  serialOpts: {\n    baudrate: 38400\n  }\n});\n\nOBD.init(connect)\n  .then(function () {\n    var rpmPoller = new OBD.ECUPoller({\n      pid: new OBD.PIDS.Rpm(),\n      interval: 1500\n    });\n\n    rpmPoller.on('data', function (output) {\n      console.log('==== Got RPM Output ====');\n      console.log('time: ', output.ts);\n      console.log('bytes: ', output.bytes);\n      console.log('value: ', output.value);\n      console.log('pretty: ', output.pretty);\n    });\n\n    rpmPoller.startPolling();\n});\n```\n\n# CHANGELOG\n\n* 0.2.1\n  * Ensure definition files are included in published code\n\n* 0.2.0\n  * Rewrite using TypeScript and Classes (inner conflict regarding Classes)\n  * Simplify getting and creating ECUPollers and PIDS\n  * Upadted documentation and example\n\n* \u003c 0.2.0 - (ಠ_ಠ)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanshortiss%2Fobd-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanshortiss%2Fobd-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanshortiss%2Fobd-parser/lists"}