Fork notice: This repository is a fork of sunnypilot/sunnypilot, which is a fork of commaai/openpilot. Built for the purpose of adding Tesla Hardware 1 support to sunnypilot. The HW1/AP1 work is based on xnor, is the successor of Tinkla (Unity).
This project was initially meant to support StarPilot, but due to the time it took to swap between OS even with the new op fork tool, sunnypilot with its recent update v2026.001.000 (2026-05-06) adding support for both comma 3X & 4 became an easy target for porting.
- Device: comma 3X or comma 4
- Harness: xnor harness
- Vehicle: Tesla HW1/AP1 (Model S 2015, Model X 2016 tested). HW2 may work, untested. Pre-AP unsupported until AP1/AP2 reach feature parity with other cars.
When requested for a custom install URL, use:
P6g9YHK6/master
Generate an SSH key (ssh-keygen -t ed25519), add it to GitHub, then on the device go to Settings > Developer > SSH Keys and enter your GitHub username.
SSH into the device (ssh comma@<device-ip>) and run:
cd /data && rm -rf openpilot
git clone --depth 1 --shallow-submodules --recurse-submodules -b master https://github.com/P6g9YHK6/SunnyPilot-TeslaHW1.git openpilot
cd openpilot
op setup
op build -j2 2>&1 | tee /data/build.log
sudo rebootIf AGNOS versions differ, op fork <N> updates the OS automatically before reboot. No fork after swap? Run /data/forks/P6g9YHK6_SunnyPilot-TeslaHW1/tools/op.sh fork list.
| Upstream | Branch | Last Commit |
|---|---|---|
| sunnyhaibin/sunnypilot | master |
78007e82e (2026-05-11) |
| sunnyhaibin/opendbc | master |
4dad7b09 (2026-05-09) |
| sunnyhaibin/panda | master |
0a9ef7ab (2026-04-26) |
| xnor-tech/openpilot | xnor-dev |
eae878da2 (2026-04-25) |
| xnor-tech/opendbc | master-xnor |
78039539 (2026-04-25) |
| xnor-tech/panda | master-xnor |
56920ec6 (2026-04-11) |
| File | Purpose |
|---|---|
imports_to_maintain.md |
Tracks all HW1 changes from xnor-tech/StarPilot that must be preserved across upstream merges, with diff commands and merge checklist |
todo_HW1.md |
Comprehensive improvement TODO list for Tesla HW1 (AP1) (Model S/X 2014-16) covering missing signals, safety, longitudinal/lateral control, UI, and more |
The following goals are in no particular order:
- Feature parity with other openpilot-supported cars
- HW2/AP2 support
- Pre-AP support
- Local web UI independent from SunnyLink
- Prototype replacement of Tesla app
- commaai/openpilot wiki - Tesla — Official commaai documentation on Tesla hardware compatibility, flashing, and general openpilot/Tesla usage. Useful reference for HW1/HW2 support setup and troubleshooting.
- CARS.md — Official list of supported vehicles and their feature coverage in openpilot.