Update 2021-02-01: It looks like Tesla have deprecated their authentication endpoint so these shortcuts won’t work for new users. I’m working to update the shortcuts to support Tesla’s new authentication flow. Existing users who have already generated token information can continue to use them until their access token expires.
A collection of shortcuts to control and get information about your Tesla. These are especially useful when run from the home screen as widgets.
Setup and usage
These shortcuts use Tesla’s (unofficial) API to get information about your car and send commands to it. An access token is required for authentication when making these API requests, along with a specific car’s ID. This is initially generated using your Tesla login credentials.
I recommend creating a Tesla folder in Shortcuts to organize the Tesla shortcuts and show them on the home screen.
There are three “configuration” shortcuts required by each of the Tesla shortcuts. These shortcuts perform specific actions and are run within each of the Tesla shortcuts so they must be installed to work.
These configuration shortcuts are also used to set up Scriptable Widgets for Tesla. You only need to install them once to use these Tesla shortcuts or Scriptable widgets.
The Tesla Settings shortcut passes the access token needed by the shortcut in progress to perform requests. On its first run, the Tesla Settings shortcut prompts for your Tesla login credentials so it can generate required token information for your account. Your password is not saved at any point and is only used to create the token with Tesla’s API.
Once the token is generated, the access token information is saved to iCloud Drive for future use by these shortcuts. The Tesla Settings shortcut then only refers to the saved information and passes the token to the shortcut in progress so it can do so successfully. This keeps your token information safe as you don’t need to add it to the shortcut itself.
Access tokens expire after 45 days. Once it expires, the Tesla Settings shortcut automatically generates a new one using a refresh token—this was generated along with the access token. This avoids the need for you to enter your login credentials again. If there’s a problem with the access token and it doesn’t work, the shortcut falls back to generating new token information by prompting for your login credentials.
Tesla Car Select
Each shortcut needs the ID of the car to send the command to or get information about. The Tesla Car Select shortcut gets the ID of your Tesla and passes it to the shortcut in progress. If you have more than one Tesla associated with your account, the Tesla Car Select shortcut displays a list to select from.
Tesla Wake Car
Teslas go to sleep after a certain amount of time and need to be woken up before it can be interacted with. The Tesla Wake Car shortcut wakes the car before the chosen shortcut runs.
Tesla Battery Status
Get the charging status, battery level, and estimated range of your Tesla in miles and kilometers. Also gets the estimated charge time if the car is currently charging.
Tesla Security Status
Check if the doors are locked. Sentry Mode is armed or disarmed, and if either the frunk or trunk are open.
Tesla Flash Lights
Command your Tesla to flash its lights.
Tesla Honk Horn
Command your Tesla to honk its horn.
Command your Tesla to open the frunk.
Tesla Actuate Trunk
Command your Tesla to open the trunk. If you have a car with a powered tailgate, this command also closes the trunk.
Tesla Sentry Mode
Command your Tesla to arm or disarm Sentry mode.
Tesla Charge Port
Command your Tesla to open or close its charge port.
Find My Tesla
Locate your Tesla and get directions to it.
Tesla Revoke Token
Revokes your access token and deletes the saved information from iCloud Drive. You will need to enter your username and password information the next time you run one of these shortcuts.
Want to buy me a coffee?
I enjoy creating shortcuts and sharing them for everyone to enjoy. If you’d like to show your appreciation and help keep me caffeinated, consider sending a few bucks my way.
Any contribution is greatly appreciated.Donate
- Resolved issue where some shortcuts couldn’t access token information on iCloud Drive
- Updated all shortcuts to resolve an issue where the “Tesla Auth” shortcut was reportedly missing. This was originally a name of what became the Tesla Settings shortcut. Despite renaming it before release, there seems to be a bug in Shortcuts that was causing some of these shortcuts to ignore the newer name. I’ve manually updated every shortcut to resolve this. I recommend deleting the existing shortcuts and installing them again.