{"id":16225766,"url":"https://github.com/macfja/obd2","last_synced_at":"2025-07-17T14:33:50.401Z","repository":{"id":60137811,"uuid":"139260856","full_name":"MacFJA/OBD2","owner":"MacFJA","description":"OBD2 Object interface for JAVA","archived":false,"fork":false,"pushed_at":"2020-03-29T13:28:13.000Z","size":149,"stargazers_count":41,"open_issues_count":2,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-28T00:37:34.493Z","etag":null,"topics":["dtc","elm327","obd","obd-ii","obd2","obdi","obdii"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MacFJA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-30T15:46:32.000Z","updated_at":"2025-05-23T05:59:43.000Z","dependencies_parsed_at":"2022-09-25T18:01:27.987Z","dependency_job_id":null,"html_url":"https://github.com/MacFJA/OBD2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MacFJA/OBD2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FOBD2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FOBD2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FOBD2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FOBD2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacFJA","download_url":"https://codeload.github.com/MacFJA/OBD2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacFJA%2FOBD2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265617002,"owners_count":23798944,"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","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":["dtc","elm327","obd","obd-ii","obd2","obdi","obdii"],"created_at":"2024-10-10T12:46:17.609Z","updated_at":"2025-07-17T14:33:50.384Z","avatar_url":"https://github.com/MacFJA.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OBD for JAVA\n\n## Supported commands\n\nAlthough any commands can be send with this lib, the list of pure object command does not cover all existing commands.\n\nSome commands are missing, because I didn't find documentation about it or because my car is pretty old and doesn't support many OBD-II commands.\n\nHere are the list of all known command and there status (implemented or not):\n\n - [For ELM327 interface](src/main/java/io/github/macfja/obd2/elm327/command/Commands.md)\n - [For OBD](src/main/java/io/github/macfja/obd2/command/Commands.md)\n\n## Usage\n\n### Basic example\n\n```java\nimport io.github.macfja.obd2.elm327.Commander;\nimport io.github.macfja.obd2.elm327.command.*;\nimport io.github.macfja.obd2.command.livedata.*;\n\npublic class Example {\n    Commander commander = new Commander();\n\n    public static void main(String[] args) {\n        new Example();\n    }\n\n    public Example() {\n        commander.setCommunicationInterface(OBD2.getOutputStream(), OBD2.getInputStream());\n        System.out.println(commander.sendCommand(new DeviceDescription()));\n        // Should print something like \"OBDII to RS232 Interpreter\"\n        System.out.println(commander.sendCommand(new EngineRPM()));\n        // Should print something like \"875rpm\"\n    }\n}\n```\n\n### Sending custom command\n\n```java\nimport io.github.macfja.obd2.response.RawResponse;\nimport io.github.macfja.obd2.Commander;\nimport io.github.macfja.obd2.Command;\nimport io.github.macfja.obd2.Response;\nimport io.github.macfja.obd2.Unit;\nimport io.github.macfja.obd2.SimpleCommands;\n\nCommander commander;\n\n// Setup the `commander`\n// [...]\n\nCommand customCommand = new Command() {\n    @Override\n    public String getRequest() {\n        return \"MyCode\";\n    }\n\n    @Override\n    public Response getResponse(byte[] rawResult) throws ScriptException {\n        return new RawResponse(rawResult) {};\n    }\n};\ncommander.sendCommand(customCommand);\n\n// OR\n\nCommand customCommand2 = SimpleCommands.create(\"My Code\");\ncommander.sendCommand(customCommand2);\n```\n\n## Installation\u003ca id=\"installation\"\u003e\u003c/a\u003e\n\n### From the sources\n\nClone the project:\n```\ngit clone https://github.com/MacFJA/OBD2.git\n```\nInstall the project into your local Maven repository:\n```\ncd OBD2/\nmvn clean\nmvn install\n```\nRemove the source:\n```\ncd ..\nrm -r OBD2/\n```\nAdd the dependency in your Maven project:\n```xml\n\u003cproject\u003e\n    \u003c!-- ... --\u003e\n    \u003cdependencies\u003e\n        \u003c!-- ... --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.github.macfja\u003c/groupId\u003e\n            \u003cartifactId\u003eobd2\u003c/artifactId\u003e\n            \u003cversion\u003e1.1.0\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003c!-- ... --\u003e\n    \u003c/dependencies\u003e\n    \u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n\n### From a release\n\nGo to the [realase page](https://github.com/MacFJA/OBD2/releases), and download the **jar**.\n\nNext add the **jar** in your project classpath.\n\n### With JitPack\n\nThe library is available online for Gradle, Maven, Sbt and Leiningen with the help of [JitPack](https://jitpack.io/).\n\nSee installation instruction here: [![](https://jitpack.io/v/MacFJA/OBD2.svg)](https://jitpack.io/#MacFJA/OBD2) (Spoiler: it's easy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacfja%2Fobd2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacfja%2Fobd2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacfja%2Fobd2/lists"}