Categories
Posts Scriptable Shortcuts

Tesla Shortcuts and Scriptable Widgets

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.

Categories
Posts

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.

Categories
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.

Categories
Posts Shortcuts

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.