{"id":17838176,"url":"https://github.com/tntmeijs/pitona","last_synced_at":"2026-04-30T00:07:50.099Z","repository":{"id":63144290,"uuid":"525436932","full_name":"tntmeijs/pitona","owner":"tntmeijs","description":"An attempt at making my Triump Daytona 675 smart","archived":false,"fork":false,"pushed_at":"2023-05-20T09:05:29.000Z","size":584,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T04:46:15.212Z","etag":null,"topics":["ecu","go","golang","javascipt","motorcycles","obd2","raspberry-pi","serial","serial-communication","serial-port"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tntmeijs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-16T15:23:46.000Z","updated_at":"2023-09-20T21:40:55.000Z","dependencies_parsed_at":"2024-06-21T17:31:29.465Z","dependency_job_id":"86349c35-7854-4008-9312-5efbe2a9feb9","html_url":"https://github.com/tntmeijs/pitona","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fpitona","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fpitona/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fpitona/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fpitona/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tntmeijs","download_url":"https://codeload.github.com/tntmeijs/pitona/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246827758,"owners_count":20840464,"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":["ecu","go","golang","javascipt","motorcycles","obd2","raspberry-pi","serial","serial-communication","serial-port"],"created_at":"2024-10-27T20:52:38.952Z","updated_at":"2026-04-30T00:07:45.070Z","avatar_url":"https://github.com/tntmeijs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PiTona\n\u003ca title=\"NathanLee at English Wikipedia, Public domain, via Wikimedia Commons\" href=\"https://commons.wikimedia.org/wiki/File:TriumphDaytona675Side.jpg\"\u003e\u003cimg width=\"512\" alt=\"TriumphDaytona675Side\" src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/TriumphDaytona675Side.jpg/512px-TriumphDaytona675Side.jpg\"\u003e\u003c/a\u003e\n\nWelcome to the PiTona project! This project is an educational project to learn more about the\n[OBD-II](https://en.wikipedia.org/wiki/On-board_diagnostics#OBD-II) protocol and the\n[Raspberry Pi](https://www.raspberrypi.com/) microprocessor.\n\n## Prerequisites\n- Raspberry Pi with WiFi and USB connectivity.\n- Pre 2013 Triumph Daytona 675 (these ECUs are not encrypted).\n\n## Motivation\nWhen I'm not writing code, I enjoy being out and about on my Triump Daytona 675.\n\nUnfortunately, I recently saw the \"check engine\" light come on. Since I do not have access to any\nOBD2 tools to read the ECU, I figured it'd be fun to write a little something myself. And thus, the\n\"PiTona\" project was born!\n\nI don't know how far I'm going to take this, but ultimately I'd like to at least be able to read my\nbike's error code. Once I manage to do that, I'll see how far I can push it.\n\n## Goals\nThe main purpose of this project is to see if it is possible to read OBD2 data from the onboard\nECU. However, simply logging data to a console is rather boring and too easy. To make things a\nlittle more interesting, I'd like to eventually build an Android application that can display the\nreal-time data of the motorcycle's ECU.\n\nIf all goes well, I'd like to turn the application into a very neat tool to analyse my riding data.\nIt'd be awesome to have access to statistics such as lean angle, top speed, averge speed, GPS data,\nand fuel efficiency!\n\n## Technology stack\n- [Raspberry Pi](https://www.raspberrypi.com/): hardware on which this whole thing runs\n- [Go](https://go.dev/): host server programming language\n- [React](https://reactjs.org/): front-end framework\n- [Bulma](https://bulma.io/): super neat CSS framework to make everything look pretty\n\n## Endpoints\nThe following endpoints can be used to interface with the Daytona 675's ECU:\n- \u003cspan style=\"color:#27ae60\"\u003eGET\u003c/span\u003e `/api/v1/obdii/debug` - ⚠ **DANGER** ⚠ send raw data to the ECU (use with caution)\n- \u003cspan style=\"color:#27ae60\"\u003eGET\u003c/span\u003e `/api/v1/obdii/01` - Send a supported PID from [mode 01](https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_01_-_Show_current_data)\n- \u003cspan style=\"color:#27ae60\"\u003eGET\u003c/span\u003e `/api/v1/obdii/03` - Request active DTC  from [mode 03](https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_03_-_Show_stored_Diagnostic_Trouble_Codes_(DTCs))\n- \u003cspan style=\"color:#27ae60\"\u003eGET\u003c/span\u003e `/api/v1/system/status` - Show Raspberry Pi system information\n- \u003cspan style=\"color:#e74c3c\"\u003eDELETE\u003c/span\u003e `/server` - Gracefully stop the server\n\n## Supported PIDs\nThe list below contains all PIDs that have been confirmed to work on my 2008 Triumph Daytona 675.\n\n### Service 01 - show current data\n| PID (HEX) | Description                        | Comments |\n| --------- | ---------------------------------- | -------- |\n| 00        | List supported PIDs [0x01 to 0x20] |          |\n\n### Service 03 - show stored DTC\n| PID (HEX) | Description         | Comments                                                                                                      |\n| --------- | ------------------- | ------------------------------------------------------------------------------------------------------------- |\n| N/A       | List all stored DTC | Not implemented yet - need to implement the [ISO 15765-2](https://en.wikipedia.org/wiki/ISO_15765-2) protocol |\n\n## Help\n\u003e Services will not boot after updating the configuration files, even though the files are correct.\n\nCheck if your line endings are correct. The files should use `LF` line endings. If you save the\nfiles using a Windows machine, chances are they are using `CRLF` line endings.\n\n\u003e I do not see the Raspberry Pi's network after rebooting.\n\nConnect a keyboard and monitor to your Raspberry Pi to troubleshoot. The `journalctl` command might\ncome in handy to determine what exactly is failing.\n\n\u003e How can I SSH into my Raspberry Pi after installing PiTona?\n\nPiTona is built to run in an isolated local network. Simply connect to your Raspberry Pi and SSH\ninto it using your favourite SSH agent. If you have used the default settings, try to SSH into\n`pi@gw.wlan`.\n\n\u003e How can I change my DNS, AP, or other settings?\n\nEither modify the configuration files in `/install_pitona` before you run the installation\nscript, or SSH into your Raspberry Pi and manually update the relevant configuration file(s).\n\n## Disclaimer\nUse this project at your own risk. There is a very real possibility that sending OBD2 commands,\nwithout an understanding of what they do, will result in a broken ECU. This project is not\nmalicious in any way, shape, or form... however, I will not be held responsible for any damage,\nissues, or other problems that might arise from the use of this software.\n\n# Development log\n## September\n### 25\u003csup\u003eth\u003c/sup\u003e of September 2022\n- Add file serving capability to webserver\n- Add client React project boilerplate code\n- Add build script to automatically create a [tarball](https://en.wikipedia.org/wiki/Tar_(computing))\n\n### 24\u003csup\u003eth\u003c/sup\u003e of September 2022\n- Code clean-up\n- Update README to include endpoint and PID documentation\n- Add debug endpoint to send arbitrary data to the ECU\n\n### 10\u003csup\u003eth\u003c/sup\u003e of September 2022\n- Discovered that the `3033` \"DTC\" is not really a fault code. Instead, this response is most\n  likely the start of a ISO-TP frame. Parsing this data is relatively difficult, which is why I\n  will work on it once the application is a bit more mature.\n\n### 5\u003csup\u003eth\u003c/sup\u003e of September 2022\n- Major refactor of the codebase\n- New structure makes it easier to add new functionality\n\n### 4\u003csup\u003eth\u003c/sup\u003e of September 2022 🏆\n- Implemented simple serial communication logic\n- Implemented endpoints to communicate with the server\n- Managed to send commands to the ECU\n  - `0100` returns `30313030`, which indicates the PIDs supported by this ECU\n  - `03` returns `3033`, which refers to a status code, but I have not been able to decode it yet\n\n![first ECU response](media/first_time_reading_ecu.png)\n\n### 2\u003csup\u003end\u003c/sup\u003e of September 2022\n- Switched from Kotlin / Spring Boot to Go\n\n## August\n### 28\u003csup\u003eth\u003c/sup\u003e of August 2022\n- Switched from C# / .NET to Kotlin / Spring Boot\n\n### 21\u003csup\u003est\u003c/sup\u003e of August 2022\n- Add circular buffer implementation\n- Add unit tests\n\n### 20\u003csup\u003eth\u003c/sup\u003e of August 2022\n- Add serial port reading logic\n\n### 16\u003csup\u003eth\u003c/sup\u003e of August 2022\n- Project set-up\n- Simple .NET server\n- Tried to turn the Raspberry Pi into a local access point\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftntmeijs%2Fpitona","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftntmeijs%2Fpitona","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftntmeijs%2Fpitona/lists"}