Update 2020-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.
Scriptable popped up on my radar not long after the release of iOS 14 due to its rich support for widgets. Scripts have complete control over the widget’s appearance and can present whatever information you’d like. Scriptable even refreshes widgets in the background so they can be kept up-to-date.
I recently purchased a Tesla Model 3 and have been tinkering with the Tesla API in Shortcuts. (Although this is Tesla’s API, it’s not officially available to third-parties. The Tesla community has been reverse-engineering and documenting it for years). This was also a good opportunity to learn more about Scriptable.
Tesla’s API requires an access token for authentication. One of the shortcuts generates this token using your Tesla login credentials, then saves it to iCloud Drive for all shortcuts to reference. Your password is not saved at any point and is only used to create the token with Tesla’s API.
One notable feature of both the shortcuts and scripts is that, where necessary, it automatically converts distance and temperature based on your car’s preferred units of measurement. Tesla’s API uses miles and Celsius, an oddly British combination of metric and imperial, so any conversion is done for kilometers and Fahrenheit automatically.
I plan to spend more time with Scriptable and have set up a GitHub repository for my scripts.
Update 2020-12-20: I’ve updated all of the Tesla shortcuts to resolve an issue where they may try to look for a “Tesla Auth” shortcut. This was the original name for the Tesla Settings shortcut before release. The shortcuts had been updated but, for some reason, Shortcuts would override that.
I’ve since recreated the Tesla Settings shortcut and updated the rest to use this. If you’ve tried using these shortcuts, I recommend deleting them and downloading them again. You won’t need to generate a new access token if you already have one as these shortcuts will use the existing information.