Creating a High-Performance Home and Developer Life With Apple Shortcuts and NFC Stickers
By: Mats Bauer
Tags: Automation, Programming, iOS, Mobile, Smart Home

Welcome to NFC Tags in Shortcuts

NFC tags are everywhere and have been around on the iPhone for a while. But they weren’t beneficial until Apple introduced the support for background tag reading with the iPhone XS in September 2018. This ability meant users wouldn’t have to actively tell their iPhone to look for a nearby NFC tag any longer. This made NFC tags become a useful household accessory.

Let me give a few examples of how NFC tags and Shortcuts made my home even smarter!

Automatic gym routine

As NFC tags are often used in membership cards (for college, gyms, coworking spaces, or office doors), we can tap into that and create our first automation! You can read my full tutorial on how to create an NFC automation in Shortcuts. I used my gym membership card to automate my arrival at the gym:

“Set Do Not Disturb on until I leave.” “Start Functional Strength Training Workout with Open Goal” — On “Turn Bluetooth on” — To connect to my AirPods “Open Spotify” — So I can get my workout music started.

Oven preheat timer

I often start preheating my oven and wait far too long until I check if it is preheated. Now I have an NFC sticker on my oven panel. When I tap it with my phone, a timer for nine minutes starts automatically. This is the time my oven takes to preheat to 180°C.

Car Mode

Another really cool place for another NFC sticker is the phone holder in my car. When I put my phone into the holder, Shortcuts automatically starts playback with Apple Music and sets Cinema Mode on my Apple Watch to on (to avoid it always turning on when steering). Secondly, I check how far away from home I am using Maps. If the distance is greater than one mile, I open Google Maps with navigation home. Of course, you could add even more scenarios. If it is between 7 and 8 a.m., I am home, and I enter Car Mode, activate navigation to work.

Start-of-workday (techy) routine

To improve my start-of-workday routine, I added another NFC tag to my work table. When I get to my desk in the morning, I quickly tap my phone on the table and run the following automations:

Check if it is morning (otherwise, run end-of-workday routine below). “Set Do Not Disturb on until I leave.” “Open Spotify.”

Secondly, I run some techy routines. For that, I created a Run script over SSH (see the tutorial). This script runs:

open -a "Google Chrome"

open -a "XCode.app" (if I closed it yesterday) cd [directory of code]

git pull (in case someone played with the repo)

With the SSH connection to your Mac, the options are pretty much unlimited! You could even run an Automator script that logs you into websites, checks your mails, sends automated birthday greetings to your colleagues, and adds the current time to an Excel sheet (for work time tracking). The options are limitless!

End-of-workday (techy) routine

To improve my end-of-workday routine, I quickly tap my phone on the same table NFC tag as above and run the following automations:

First, I send a Whatsapp home saying, “Leaving work now” and set the thermostat at home to 22°C so it is warm when I get there.

Secondly, we get back to our SSH script. This is what I run before leaving the office (without touching my computer!)