- Example implementation for the Tesla API 2024 in Python
- Uses the library tesla_api
- A Tesla account
- For commands: A registered domain for public key hosting with a valid SSL certificate
- Until Tesla fixes the registration for hobbyist users, you need a VAT ID number. This does not need to be an exisiting number, it just needs to adhere to the rules for a valid VAT number. Google for what a VAT number looks like in your country/region and use your home adress.
- A mobile phone with the Tesla app installed for key installation to the car
- A Tesla car helps a lot
- Set up a developer account at Tesla, see tutorial by Shankar
- generate a public/private key pair for Tesla Vehicle Commands
- instruct you, how to host your public key in the
/.well-known
section of your website - get a partner authentication token
- use this token to register a customer account (this may be the same as your developer account - you are your own customer)
- Check if Tesla has your public key recognized
- Request authorization permissions from a customer (for more than one customer, the library has to be extended)
- Install the public key to the customers car
- Get vehicle data
- Send commands to the car
- run main.py
- fix all import issues (libraries not installed yet)
- follow the instructions
- If all runs well, your car will honk at you.
- This is an implementation of tesla_api, please report issues there