Sends Tesla vehicle location and status to the APRS-IS.
Note that you can also get this app as a Home Assistant addon.
python -m venv env
On Linux/MacOS:
source env/bin/activate
On Windows:
.\env\Scripts\activate
pip install -r requirements.txt
The script asks for a Tesla refresh token when run for the first time. You will need an application to generate a refresh token:
- Android: Tesla Tokens
- iOS: Auth App for Tesla
- Chromium/Edge: Chromium Tesla Token Generator
Login session data is stored into the file cache.json
, so you don't need to
enter the refresh token every time the script runs. Make sure the current
working directory is set to the script's directory, so cache.json
can be
found by the script.
You don't need to activate the virtual environment to run the script.
Use env/bin/python
instead of the system Python binary.
Get the command line arguments using -h
Example usage:
env/bin/python main.py -e nonoo@nonoo.hu -c HA2NON-12 -m "LOAD\"*\",8,1 ~ github.com/nonoo/tesla-aprs"
You can set the following environment variables to avoid passing them as command line arguments:
TESLAAPRS_EMAIL
: Tesla account email addressTESLAAPRS_CALLSIGN
: APRS callsignTESLAAPRS_MSG
: APRS messageTESLAAPRS_SILENT
: Suppress loggingTESLAAPRS_INTERVAL
: APRS message interval in secondsTESLAAPRS_VEHICLE_NR
: Tesla vehicle numberTESLAAPRS_REFRESH_TOKEN
: Tesla refresh token