Trigger actions on OS X using NFC on Android

Having recently started using a treadmill desk, I wanted to automate actions on OS X as I switched from the regular desk to the treadmill. For example, turn on Bluetooth, switch the audio output device, etc. Sure, I can do that by creating an Automator script I’d run somehow, but I was curious to see if I could make it happen just by placing my phone on the treadmill desk.

Here’s how I do that using a few apps and utilities.

Requirements:

Setup

IFTTT

  1. Connect to the Maker and Dropbox channels.
  2. Note your Maker channel secret key
  3. Create a recipe with Maker’s receive a web request trigger and Dropbox’s create a text file action. You can use this recipe as a template. The file name’s and contents don’t matter. Choose a meaningful event name.
  4. Test your maker trigger url in the terminal with
    curl -X POST https://maker.ifttt.com/trigger/{event}/with/key/{key}
    

Android

  1. Launch Trigger and add a new task.
  2. Add an NFC trigger and (in the following screen) any applicable restrictions.
  3. Add an action, and select “Open a URL/URI” under Applications & Shortcuts.
  4. Enter your trigger url, and mark “Open in background”.
  5. When prompted, program your sticker.
    Note: I’ve tried placing the sticker on the mac itself, but that didn’t work. I’m guessing there’s too much RF interference.

    This slideshow requires JavaScript.

OSX

Setup Hazel as follows:

  1. Add your new dropbox sub folder (in ifttt/maker/event_name, by default) to the Hazel folder list
  2. Add a folder rule for new files (see screenshot below). Add any actions you’d like to run: I move the file to the trash, and run an embedded shell script to launch some apps and command line utilities.
    SyF1T9pgqu-3000x3000

That’s it! Every time you’ll place your phone on the NFC sticker, it’ll make an HTTP request, which will cause a file to be created in a dropbox folder. After the brief sync delay, Hazel will recognize the file and launch any actions you’ve told it too.

 

From Runkeeper to Runtastic

I started running a few months ago, with Runkeeper as my running app. The UI made sense, the audio cues were useful, and I liked the fact that friends were using it too and sharing their efforts.

Yet, too often my runs appeared like this:

Screen Shot 2015-11-25 at 12.24.13.png
I can run on water

I’m inclined to blame the phone’s GPS, but I expect the app to be smart and average my position to figure out I didn’t make impossible jumps across the lake. This was especially confusing during runs when I was doing intervals.

After I’ve tested a bunch of the other available apps (Map My Run, Endomondo, Nike+ Running, Strava, and more), I’ve chosen Runtastic Pro, and I’m really happy with it. Not only has the GPS data been flawless, it also supports HR zones alerts which Runkeeper lacks.

While slightly more complex, Runtastic feels much more powerful too – it’s super configurable, and has a bunch of fun and interesting features.

The only downside for me is the lack of community, since all my friends are on Runkeeper. Luckily, there’s SyncMyTracks (and a limited free version) which can automatically sync activities between the different platforms.

 

 

Soluto’s Anti-Frustration Software is Brilliant

Soluto recently launched a private beta of their new web based PC “anti-frustration” software, and it’s brilliant.

The dashboard is simply gorgeous and filled with useful information and action items – here are a few screenshots:

After using it today to optimize my Mom’s laptop, I’m going to get the PC version installed in all my relatives computers. I wonder how useful the upcoming Mac version is going to be.

Mac App Store Update Error

To update this application, sign in to the account you used to purchase it.

If you’re signed in and still get this error message when trying to update an app in the Mac App Store, you can workaround it by removing the application completely, and doing a fresh install.

Laptop and Multiple Displays: Window Management on OS X

This is a followup to a previous post about window management tools for OS X.

I’ve recently started using a 2nd external monitor connected to my laptop (using Plugable’s DisplayLink Adapter). Since I was switching from laptop only to laptop + 2 external displays at least once a day, I needed to figure out a way to save/restore applications and windows positions.
I was really happy to discover Stay, a pretty good app that does just that (30 day trial, $15 for the full version).

Great window management tools for OS X

It took me some time to find these great apps, so I figured a mention might help others:

  • Shift It enables easy moving and resizing of windows using the keyboard (expands  the concept of Aero Snap)
    Shiftit app for mac screenshot
  • Afloat will let you keep windows on top, adjust window transparency and much more.
    Afloat app for mac screenshot

In case you’re wondering, they’re both free and open source.

Continued: Laptop and Multiple Displays: Window Management on OS X

Update 2014-02-03: The link to ShifIt has been updated and now points to the new repository on Github.