Shortcuts for Tesla working again (but here’s what you should use instead)

Thanks to Kim Hansen and their Auth app for Tesla iOS app, I’ve been able to update all my Tesla shortcuts and make them operational again. This free app handles Tesla’s latest authentication flow to generate the access token required for API usage.

Back in January 2021, Tesla changed how authentication with their API works. Instead of performing a single API call that passed along the username and password, the new authentication flow is a redirect-based sign-on (SSO) approach using OAuth 2.0. This is the same sort of process as signing into an app or website using your Twitter or Google account—you are redirected to a web page that you log in and then grant permission to access. It’s an additional layer of security that keeps your account safe and supports multi-factor authentication (MFA).

Developers building third-party Tesla apps have been able to support this and build the functionality needed to authenticate, and therefore access your car. However, Shortcuts is much more limited and, for now at least, can’t be used to complete this flow. Thankfully, developer Kim Hansen launched a free app, Auth app for Tesla, specifically to generate access tokens using Tesla’s new authentication process. This app handles authentication and provides a shortcut action that shortcuts can use to get the access token.

I’ve updated all my Tesla shortcuts to use this app. While it does mean you need to install the app and sign in to your Tesla account first, my shortcuts no longer need to handle authentication. The Tesla Settings shortcut is no longer required and is now deprecated.

Even though my Tesla shortcuts work again, I actually recommend using Kim’s other app, Watch for Tesla ($9.99), and its support for Shortcuts instead. The app originally started out as an Apple Watch app but, after Tesla’s API changes, Kim launched a companion iPhone app so users could log in. Since then, the iOS app has added useful features like widgets and shortcut actions.

As a result, what requires multiple steps in my shortcuts can be done in a single action. For example, my Tesla Battery Status shortcut has 38 actions. A similar shortcut using Watch app for Tesla can do it in just a single action.

I’ve been using the app for several months to control my Tesla from an Apple Watch and find myself using the iOS app and its available shortcut actions instead of my own shortcuts.

I intend to keep my shortcuts around and update them as necessary but I recommend using Watch for Tesla instead. Trust me, ten bucks for this app is a steal and it supports a developer who made it possible for me to make these shortcuts functional again.

Tesla Shortcuts and Scriptable Widgets

Update 2021-03-28: Thanks to Kim Hansen and their Auth app for Tesla iOS app, I’ve updated all Tesla shortcuts so they are operational again. This free app is required and handles Tesla authentication to generate the access token required for API usage.

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.

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.

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.


Despite my keen interest in iOS automation apps like Shortcuts, I must admit that I hadn’t spent any meaningful time with Scriptable, a powerful automation app that uses JavaScript. It’s far more versatile than Shortcuts though requires knowledge and experience with JavaScript to really take advantage of it.

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.

I’ve created a set of shortcuts to to control and get details about my Tesla, along with some Scriptable widgets to provide at-a-glance information on my iPhone’s home screen.

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.


The Dodged Charger

There’s been a lot of talk recently about the rumor that the next iPhone might ship without a charger in the box:

According to well-connected analyst Ming-chi Kuo, Apple is planning to stop including a power adapter and EarPods in the box with 2020 models, and will even remove the power adapter from the new iPhone SE’s packaging later this year.

Sam Byford at The Verge

If this is true, I’m very much in favor of this.

Dieter Bohn at The Verge argues that the environmental impact of e-waste is a very good reason for Apple, a company that often boasts about its efforts to help the environment, to drop the charger:

The International Telecommunications Union estimates that “one million tons of external power supplies are manufactured each year.” Whatever the number that actually turns into waste ends up being, it’s unnecessarily high. […]

To me, the scale of the e-waste problem outweighs the potential frustration that Apple is getting one over on consumers by making them buy a charger separately.

I agree with Bohn here and my opinion is that Apple is driven more by the environmental impact these chargers have than trying to nickel-and-dime their customers (the ludicrously priced $699 Mac Pro wheels kit is a topic for another time). Sure, saving a couple bucks on each iPhone is a nice bonus but this is a company that manufactures $1,000+ phones which sell like hot cakes—no matter what price Apple sells iPhones for, people will buy them.

While the cost of producing and including these power adapters is likely insignificant to Apple, the carbon footprint required and the eventual e-waste they generate is something I suspect they’re taking seriously.

Almost every electronic device that is capable of charging comes with a USB charger that we usually just toss into a drawer, only to dig them out when someone drops by and has forgotten their own. I checked my stash of power adapters earlier today and have no less than a dozen different USB chargers not currently in use, most of which are manufactured by Apple. That isn’t even taking into account the ten or so adapters I dropped off at an e-waste facility last year.

The market for chargers from companies like Anker is massive. You can buy more powerful and versatile power adapters from third-party companies than what Apple provides.

The reaction across the internet has been quite critical of Apple. The thought of not including a power adapter seems to be a particularly hot topic among us nerds (let’s face it, no-one else really cares). I understand why though. I bought a Nintendo 3DS Lite several years ago and vividly remember finding out that a power adapter was not provided once I got it home. Since the 3DS charger was a proprietary connector, I had to go back to the store to pick up a charger.

So how would Apple actually do this? Based on the reaction to the rumor, simply announcing that “no adapter in the box, starting at $799” is going to ruffle some feathers. One possible way Apple could spin handle this is to, well, include a power adapter, but not in the box.

One way I can think of is for Apple to announce that the iPhone 12 comes with a separate USB-C power adapter included in the price. However, customers can opt to skip the power adapter and save $29 (the retail cost of a USB-C adapter). Apple could even make it the default so that every iPhone they sell, it’s “discounted” because the power adapter isn’t provided. Still need a power adapter? Sure, you just pay full price.

Making the power adapter optional

Apple could then argue that they aren’t dropping the power adapter for cost reasons since “the cost of the iPhone includes the adapter”, so it becomes less of a cost-cutting measure and more an incentive for customers to help the environment. Win-win, right?

It’s also worth noting that Apple’s iPhone Upgrade Program and most phone recycling services only require the device—power adapters, earphones, and cables are kept by the owners. We’re already accumulating perfectly functional power adapters, do we really need to get them every time we upgrade our phones?

WWDC 2020’s Honorable Mentions

Some of the more interesting features of iOS, iPadOS, macOS, watchOS, and tvOS aren’t shown during the keynote, but they are briefly referenced in summary slides. After the keynote is finished, I like to dig through the information on Apple’s website and developer documentation to see what else of note is coming.

There’s going to be a lot more we’ll find out over the coming days as WWDC continues. For now, here’s a list of some features either not covered or only hinted at during the keynote.

Resources consulted:

iOS 14 and iPadOS 14

  • General
    • iOS and iPadOS will support system-wide default browser and email apps.
    • VoiceOver supports text recognition and can detect text within images.
    • Apple demonstrated smart Widget stacks but iOS 14 will let you create custom stacks using the widgets of your choice.
    • Translations can be performed completely offline—no internet connection required.
    • Even more privacy and control over the data shared with apps. You can share an approximate location—not an exact one—when an app asks you for your location. You can also restrict photo sharing so that apps can’t have full access to your photo library, only part of it.
    • Family Sharing will extend purchased app sharing to subscriptions from participating developers.
  • Apple apps
    • Maps will show the location of speed and red-light cameras and warn you along your route.
    • CarKey will continue to function for up to five hours after an iPhone has run out of battery. This is the same behavior that Express Transit uses on supported phones.
    • Reminders can be assigned to shared list participants.
    • Messages supports up to nine pinned conversations.
    • Weather is getting much more granular information, likely leveraging their acquisition of Dark Sky. There’s a lot more precipitation information, and the app and its widget will display severe weather warnings.
  • FaceTime
    • FaceTime video quality on supported devices is increased to 1080p
    • FaceTime will also detect if a participant of a group call is using sign language and increase the size of their video.
  • Camera and Photos
    • QuickTake will be available on iPhone XR, iPhone XS, and iPhone XS Max.
    • Exposure compensation can be locked for the duration of a camera session but you can continue to set exposure and focus lock for individual photos.
    • Apple is finally making better use of the volume buttons with the Camera app. Volume Up can be used to take burst photos, Volume Down can be used for QuickTake video.
    • All devices can now toggle the video resolution settings directly from the Camera app.
    • Photos can have captions to add some descriptive information.

watchOS 7

  • Apple Watch will support spoken translations on the fly.
  • Dictation is going to be handled on the watch directly and should result in quicker and more accurate voice recognition.

Shortcuts

  • The Shortcuts app is getting a redesign. iPadOS will see it include the new sidebar that many of Apple’s apps are getting.
  • Folder support is coming to iOS 14 and iPadOS 14. Finally.
  • Shortcuts are finally/again on the Apple Watch. Before it was acquired and relaunched as Shortcuts, Workflow had a pretty great Apple Watch app and complication. Good to see this return.

Other notable mentions

Migrating from Instagram to Micro.blog or WordPress

For anyone wanting to escape the misery machine of Facebook and permanently delete their Instagram account, I’ve created a couple of shortcuts so you can migrate your photos to either a Micro.blog-hosted site or a site that runs on WordPress.

Both shortcuts use a copy of your Instagram archive to upload photos and create the appropriate posts. The date for each post is set to the original upload date. The post itself includes the original caption and, if available, location name. You can choose whether to remove hashtags or keep them in the post. The WordPress shortcut has an additional option to convert hashtags to regular tags instead.

I’ve added some safeguards to both shortcuts to prevent a migration from going awry and to give those with lots of photos the option to migrate incrementally rather than all at once.

  • The shortcuts can be stopped and resumed without losing progress or duplicating what’s already been uploaded—especially useful if Shortcuts crashes for any reason. This is done by creating temporary files for each post and then deleting the file when the post has been created.
  • It’s also possible to incrementally migrate photos so you don’t have to commit to doing them all at once. Both shortcuts migrate photos in batches, such as five photos at a time. You can specify how many photos to migrate per batch. When a batch is done, the shortcut needs to be run again to continue with a new batch.

Although I’ve tested both of these shortcuts with Micro.blog-hosted and WordPress-powered sites, I encourage anyone using them to start with some small batches first to make sure everything looks ok. Instagram captions can contain @mentions and hashtags anywhere so the lack of consistent formatting means everyone can write captions differently. If you’ve done anything special with how you’ve written them, you may need to make some adjustments.

Shortcuts Wishlist

Shortcuts has gained plenty of features and functionality over the years, especially after Apple’s acquisition of Workflow, but how shortcuts are created and organized has remained almost unchanged since the app first launched back in 2015.

As a result, creating shortcuts like Mocktail is a painstaking and frustrating process. The app simply hasn’t scaled with the increasingly complex uses for shortcuts and the interface is still skewed towards simple shortcuts made up of only a few actions.

After spending what felt like an eternity updating Mocktail, I’ve come up with a wishlist of ten improvements I’d love to see in Shortcuts.

Copy actions

Shortcuts desperately needs a way to copy and paste actions across shortcuts—it’s almost criminal that it doesn’t have it already. There’s simply no way to reuse a set of actions from one shortcut in another or even just duplicate actions within the composer.

Copy action mockup

As I rewrote parts of Mocktail, I made use of a separate iPad to view a set of actions I had created in another shortcut, then manually add them to the shortcut I was working on.

Backup and versioning

There’s no way to easily back up shortcuts, which feels like a regression and something that was possible with Workflow (i.e., saving workflows as files). iCloud syncing helps keep devices in sync but it’s not a backup tool. I often duplicate shortcuts at various stages of development (Mocktail 1, Mocktail 2, Mocktail 3, etc.), all of which clutter the app.

This is even after I cleaned out older copies

One workaround is to create a shortcut that contains the Get My Shortcuts and the Get Link to File actions to create an iCloud link for every shortcut. This is time consuming as a new iCloud link is generated every time it’s run and the more shortcuts you have, the longer it takes.

A feature I’d really like to see is a macOS Time Machine approach to backups that supports versioning. I’ve lost count of how many times I’ve started to make changes to a shortcut, only to realize I want to revert some of my changes. I can’t do that and, unless I’ve duplicated the shortcut at a specific point in time, it’s too late. Being able to create a snapshot of a shortcut—or more easily back it up without the need to create an iCloud link—is something that’s sorely needed.

Versioned shortcuts mockup

Share shortcuts as files

As I mentioned above, Workflow previously supported sharing workflows as files. I used this extensively and it made hosting my workflows on GitHub possible—I didn’t have to rely on web links to share them. This also made it easy to back up workflows. At one time, I had a very simple workflow that would create a timestamped folder of all my workflows on iCloud Drive.

Shortcuts, however, cannot be shared as files and the only option is to create iCloud links. I understand the security concerns here and, honestly, I don’t see this feature ever returning. Nonetheless, it still something I wish it supported… again.

Revamped organization of shortcuts

Despite Shortcuts and Workflow improving significantly over the years, the way shortcuts are organized has barely changed. The most notable improvements I can think of were the addition of search and the ability to tap the Shortcuts button to jump to either the top or bottom of the list.

No way of grouping or organizing shortcuts is a significant user experience problem, one that gets worse the longer you use the app. Many of us seasoned Shortcuts users can easily have over 100 shortcuts, especially if you’re duplicating because there’s no versioning or backup support. Some form of navigable grouping, whether through folders or tags, for example, would improve things significantly.

Subroutines

Shortcuts technically supports this in some fashion as a shortcut can run another shortcut within itself by using the Run Shortcut action. But to do this, another shortcut has to exist. This is problematic for two reasons:

  • You can’t share just the main shortcut, you have to also share any other shortcuts it references or else it won’t work.
  • It’s not something that scales well. The more shortcuts you create like this, the more cluttered Shortcuts becomes (there’s a theme about organization developing here).

I have a few shortcuts for image manipulation and each one runs additional shortcuts to resize and optimize the images (using TinyPNG) passed to it. I’d much rather have a subroutine for optimizing images with TinyPNG than a normal shortcut that isn’t used independently.

Subroutines could be mini-shortcuts that don’t exist within the standard set of shortcuts, instead they could be accessed like actions. Sharing a shortcut should also include a full copy of the subroutine. This type of reuse would, I think, be highly useful.

Breakpoints

There are times during shortcut development that I’d like to stop or pause a shortcut at a particular place. I currently do this with the Show Alert action but would prefer an option to do this without having to tap cancel.

Beyond this, having the ability to pause a shortcut, see what the input and output of the previous action, and even changing subsequent actions before resuming would rapidly speed up my work.

Sandbox

Sometimes I just need a shortcut for a one-off task or I want to try something out. This slowly results in a litter of untitled shortcuts that are either empty or were needed only once. Although Shortcuts does provide an option to either save or delete shortcuts that haven’t yet been named, I wish there was a sandbox for these quick one-off needs instead of creating a new shortcut first. Once I’m finished, I could then choose to save the shortcut or just clear the sandbox.

Improved dictionary support

Dictionary support is pretty good in Shortcuts but it’s hindered by limited functionality and a lack of flexibility. I’d like to see things like:

  • a collapsible tree view for nested dictionaries.
  • the ability to copy and paste keys and values.
  • an option to populate or load a dictionary from a JSON file.

Exit to home screen

The Exit Shortcut action is limited to stopping the current shortcut and then dismissing it. This is fine but sometimes I run a shortcut and would prefer an option to exit the app entirely and return to the Home screen.

Don’t show in Widget by default

Oh boy, do I hate this behavior. I’ve stopped using the Widget entirely because it’s full of duplicate shortcuts. Perhaps this wouldn’t be so bad if there was a better way to back up and version shortcuts?

Major Update to My Mocktail Shortcut

I’ve made a significant update to Mocktail, my shortcut for creating device-framed screenshots. It now (finally) includes base images for:

  • iPhone 11
  • iPhone 11 Pro
  • iPhone 11 Pro Max
  • iPhone SE
  • iPad Pro Magic Keyboard

There are also more base images available for a number of supported devices. The shortcut has also been updated to be much more reliable and efficient, with around 30 fewer actions than before.

Finally, the shortcut and its required base images are now hosted here. If you have any questions, problems, or feedback, please leave a comment on the shortcut’s page or let me know.

An Update on My Shortcuts

One of my favorite features of Workflow was its ability to share workflows as files. It was this functionality that made it possible for me to start Workflow Directory and create my own GitHub repository of workflows. Unfortunately, Shortcuts doesn’t support this functionality and I suspect it never will again.

Although it’s possible to jump through some hoops to import workflow or shortcut files, lack of file support makes it impossible to maintain my GitHub repository. Instead, I’ve started the long overdue process of creating iCloud links to my shortcuts and publishing them here instead.

All of my shortcuts are being made available on my site and can be found at a dedicated Shortcuts page. Although I’ve written about some of them in more detail, there are plenty of shortcuts I’ve never blogged about. I will publish any shortcuts I think are useful and continue to write about some of them in more detail.

I’m also using this opportunity to clean up my shortcuts, fix any broken ones, and remove any that are no longer functional. I’ve already gone through my blog posts to update them all with iCloud links and have identified a few that rely on APIs or functionality that’s no longer available (e.g., all my IFTTT-based workflows can’t be used anymore).

Resolving Shortcuts Sync Issues in iOS 13

I’ve been having some troublesome sync issues with Shortcuts since upgrading to iOS 13. None of my devices would stay in sync and shortcuts I’d delete would reappear moments later. In some cases, shortcuts would even be duplicated.

A helpful tip on the Shortcuts subreddit has provided a simple solution for my syncing woes: delete the app and reinstall it. I did this on each of my devices and now shortcuts sync perfectly.

Apollo 11

For the 50th anniversary of the moon landing, Todd Douglas Miller’s breathtaking film of the Apollo 11 mission that’s comprised entirely of archive footage is essential viewing for all mankind.