#wwdc2019: Siri Shortcuts awakes
June 4, 2019
As a lover of automation on the Mac who sometimes attempts timid experiments with Siri Shortcuts, yesterday was more than interesting.
For many, the “conversational part” (the possibility to add paramenters to the request and have Siri ask follow-up questions) is the most interesting news, because it will lead to a more natural experience; for me the game-changer is the introduction of automatic triggers that will allow to perform multi-steps shortcuts when something external / planned occurs.
The possibility are endless, because there are already lots of different triggers (specific time, arriving or leaving at a location, launching a specific app, changing the state of the device like enabling Wifi, etc…) and we can already imagine that more will follow:
- When I leave home, send an SSH command to my computer to start running some operations, turn off the lights and enable DND on the phone;
- Every Friday at 7 p.m. blast “The Final Countdown” at maximum volume and trigger an AppleScript via SSH to copy some files to a specific location;
- When I launch Tweetbot after 10 p.m., automatically search Google for “productivity killers”;
- If I enable Airplane mode, also lower the device volume; when I disable it, send a message to a family member to tell I’m back online.
I could go on forever on the most implausible automations… it’s so freaking cool that we will finally have access to all that power without the need to manually start any action.
For now I can only dream, though: Shortcuts comes preinstalled with iOS 13 but I don’t plan to rush with the new operating system on my phone, so I tried playing with automatic triggers in the Simulator, where they don’t seem to cause any actions yet.
Siri, tell Alexa to connect my phone
May 24, 2019
I usually fall asleep listening to podcasts, which means that every night I have to tell the Echo Dot to connect to my phone via Bluetooth and ask Siri to resume playing Overcast while setting a sleep timer.
For a while now I have had the second part automated in Shortcuts, inside a night-time routine that involves other steps too, but a bug with the Echo forced me to ask twice for my phone to connect to the Echo, combining a futuristic automation on the phone with the actual human (me) forced to the following dance 👏every👏single👏night👏:
Me: “Alexa, connect my phone”
Alexa: Your phone is already connected
(it is not)
Me: “Alexa, connect my 🤬 phone!”
(the phone finally connects)
Yesterday, a miraculous over-the-air update to the Echo fixed this annoyance, and the phone now connects at first try.
The resulting joy motivated me to walk the final line and automate the Bluetooth connection with Shortcuts too… #thefuture
It wouldn’t make much sense to share the actual shortcut, because it is personalized with my apps and needs, but here are the steps, in case you want to make your ladies in the tubes talk to each other:
- Record yourself saying “Alexa, connect my phone”;
- Save the audio file into the Shortcuts folder in iCloud Drive;
- Edit your “Going to bed” shortcut to play the audio file outloud and then proceed with the podcast playback with a preconfigured sleep timer.
I also added the reverse “Alexa, disconnect my phone” recording to the morning routine shortcut for maximum laziness; about that, a warning: when the phone is actually connected, Alexa does not listen to herself speaking, so the shortcut includes a “disconnect Bluetooth -> wait 3 seconds -> reconnect Bluetooth” step before playing the disconnection audio file. Here’s a screenshot:
Another tool in my belt
November 19, 2018
Today I was asked for a way, maybe a small custom iOS app with bonus points if it had a CarPlay extension, to occasionally retrieve an audio file via HTTP and play it in the car. The path for the file is known and remains the same, but the file name changes every day and it corresponds to the date in yyyyMMdd format. No need to archive the file for posterity or retrieve previous days, the goal was just a quick way to fetch this MP3 and treat it like a podcast while being on the move.
Since I remembered CarPlay apps being limited by Apple to specific use cases, I immediately gave up the bonus points and focused on the quickest way to achieve the goal. I should also confess I’m trying to reduce the number of new apps I work on concurrently, so I wasn’t excited by the prospect of opening Xcode for this…
The next idea involved a cron job, Apple Script and iTunes, plus the existing Apple Music subscription of the person requesting my suggestion: I began imagining to write a script, schedule it for running every day and either add the file as a song to iTunes and have it uploaded to the Music library in the cloud or copy the file to iCloud to play it directly from the Files app when needed. Maybe Overcast Premium could have been a part for this and resurrect the CarPlay part, but it seemed overly complicated: I was thinking of repeating an operation every day on a different device for just an occasional need.
Then I thought of Shortcuts, and boy it was easy, effective and elegant to achieve a functional solution with it!
I actually made two alternatives, spending less than 10 minutes total: one saves the file to iCloud and the other opens it directly in VLC, where playback starts automatically. Both have 3 steps and a variable to format the date, and couldn’t be simpler.
Every time I have the chance to use it, Siri Shortcuts stands out as an amazing tool for automation, with great flexibility and an outstanding approachability. It truly deserves a spot in my tool belt, and you should think of it more often too!
P.S. In the ongoing effort to add tools to my belt, I should point out that this post has been written, committed and published using only an iPad and an iPhone. This includes the screenshots placed in the device frames, made using this Shortcut made by Viticci that is pure witchcraft.
P.P.S. The more I work on an iPad, the more I believe the worst limit to productivity here is not iOS, it is the Smart Keyboard not having backlighting and switching between locales by accidentally pressing the dedicated button… but this is a post for another day.