Shortcuts for Tesla

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.

You must install the Auth app for Tesla iOS app to generate this token. This app handles authentication using your Tesla credentials and provides it to these shortcuts. Your credentials are not stored anywhere and the app handles refreshing the token when needed.

I recommend creating a Tesla folder in Shortcuts to organize the Tesla shortcuts and show them on the home screen.

Configuration shortcuts

There are two “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.

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.

Tesla Open Frunk

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.

Credits

My thanks to Tim Dorr for the unofficial Tesla API documentation and to Kim Hansen for Auth app for Tesla.

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.

$3.00
$5.00
$10.00

Any contribution is greatly appreciated.

Donate

Changelog

  • 2021-03-28
    • Updated all shortcuts to use Auth app for Tesla iOS app to handle Tesla authentication. These shortcuts no longer handle token generation and Tesla Settings has been deprecated.
  • 2020-12-29
    • Resolved issue where some shortcuts couldn’t access token information on iCloud Drive
  • 2020-12-20
    • 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.

25 Comments

  1. Hi Jordan. The Tesla Car Select shortcut it sent to first run the “Tesla Auth” shortcut but I don’t see that one on your site. Am I missing something? Thanks for any assistance you can provide.

    Like

    1. Did you download the shortcuts recently or a while ago? I originally published one of them with an incorrect shortcut reference but that has since been fixed. Try deleting the shortcuts and downloading them again. The Car Select shortcut should run “Tesla Settings” (“Tesla Auth” was my work-in-progress name for it).

      Like

      1. Hi Jordan. i tried your new scripts today but it gets stuck on the wake up subroutine with this message: the value at ‘response’ is an array, but ‘state’ is not a valid index when I run just the wake car routine.
        Running the battery script the error message is: Could not evaluate the key path. In key path ‘response.state’, you referenced a value ‘state’ inside of ‘response’ which is not an array or dictionary.

        Like

      2. Either it’s taking a while for the car to wake up or it has a weak internet connection and Tesla’s API can’t get an accurate read. Try waiting a minute or two and running again. This error happens if the car doesn’t report back it’s woken up in a small amount of time (some cars can take up to 90 seconds to wake depending on what state they were in). Also, don’t run the Wake Car shortcut on its on, it doesn’t work—it only works as a subroutine for another shortcut that passes relevant information to it.

        Like

    2. Hi Jordan, thank you for these shortcuts! I keep getting a “conversion error: failed because Shortcuts couldn’t convert from Text to Dictionary” whenever I try to run Tesla Settings. Any idea on what that is? Thank you in advance!

      Like

      1. 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 but it’ll take a bit of time.

        Like

  2. Hi. I downloaded the 3 shortcuts first, and changed “auth” to “settings”. The open frunk shortcut works until the prompt “open frunk?” And when I select OK I get an error message that says “shortcut not found”. Please help?

    Like

    1. When did you download the shortcuts? I updated them not long after release so they shouldn’t be trying to run “Tesla Auth”. Can you delete the shortcuts and try downloading them again? You shouldn’t need to enter your username and password again.

      Like

  3. Don’t mind my last comment, I had an Auth I hadn’t replaced in Car Select, it works now, thanks very much! Now how do I launch this shortcut with Siri?

    Like

    1. Thanks for confirming. With your help, I was able to dig into the problem and fix the underlying issue with all the shortcuts. I’ve updated them all so they don’t need tweaking like you had to do.

      To run shortcuts with Siri, you can usually just say the name of the shortcut you want. So “Hey Siri, Tesla Flash Lights”. If you want something more natural, either rename the shortcut or create a new one that contains an action to run your desired shortcut. For example, create a shortcut named “Flash the lights” that contains the action “Run Shortcut” to run the Tesla Flash Lights shortcut.

      Like

  4. Hi Jordan, i tried a few shortcut, like the Sentry Mode one, is not working, returning with error message “The file “settings.json” couldn’t be opened because there is no such file.”

    Some others are working fine

    Like

    1. Thanks for flagging, Charles. I’ve fixed the issue with a couple of shortcuts. You’ll need to redownload the shortcuts you had trouble with. Let me know if any of them still aren’t working.

      Like

  5. I am getting an error of incorrect credentials
    My email for the car (including .com) and password are entered in exactly as they are when I login do I still need to charge something in the script? I downloaded these again today

    Like

    1. 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 but it’ll take a bit of time.

      Like

    1. Yeah this is the documentation I’ve been using to build these shortcuts and scripts. For the time being, handling authentication seems to require functionality beyond what Shortcuts is capable of.

      Like

  6. Hi Jordan, I was wondering if you could post what the json file should look like so that I could just enter my auth code, car id and anything else. This will allow me to get the shortcuts to work for now. I’m not very knowledgeable in regards to coding but I could definitely edit the file and save it back to the right spot in iCloud. Thanks in advance for your help.

    Like

    1. I don’t have an old copy of the JSON file handy to provide structure, unfortunately. That said, the access tokens will eventually expire and can’t be refreshed using the old authentication method. So anyone who can use these shortcuts will be on borrowed time until it’s possible to find a way to support the new process.

      Like

  7. I’ve followed this post with great interest, sadly I cannot retrieve a token, I have checked the log file on my iCloud and get the following

    {“error”:”Endpoint deprecated: Please update your App.”,”response”:null,”error_description”:””}

    It appears at least to me that Tesla may have changed something at their end which makes this process no longer valid.

    Like

    1. I recently added an update to the top of this post about this. Tesla deprecated their original authentication process and it requires something much more complex (similar to how you would sign into apps with your Twitter or Google account). For now, it’s not possible to work around this with Shortcuts alone.

      That said, I recommend Watch App for Tesla https://apps.apple.com/us/app/watch-app-for-tesla/id1512108917 as it provides some Shortcuts and widgets, and can support the newest Tesla authentication process.

      Like

    1. I hope to update this one day but the newest Tesla authentication process is beyond what Shortcuts can currently do. I’m sure there’ll be a way to make it work but it seems like Shortcuts can’t do that currently.

      Like

Leave a Reply to Jordan Merrick Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s