ControlPlane: Automation Cockpit For Your Mac

Computers should be so smart today, and yet, it feels like we have to babysit them, performing menial tasks, instead of putting the computer’s own power to work. We’re blown away by voice command apps like Siri, and yet our MacBooks that are far faster take more effort to use. There should be a way to automate it more.

ControlPlane is an open-source context-sensitive automation application. In short, what this means is actions can be triggered based on where you are, what you’re doing or when you’re doing it. There’s a vast number of ways you could put it to use, and it’s limited only by your imagination. So if your curiosity is already piqued, read on while I take you on a small tour.

The Building Blocks

ControlPlane can runs as a menubar app or completely hidden

ControlPlane can be thought of as having two main blocks: Contexts and Actions. A context can be a place, a time or even a running application. It all depends on what your needs are and what rules you later define. Actions are what is executed once a context is triggered.

Once you get to know it, ControlPlane is rather simple and easy to use. However, it does have a few “moving” parts that will help to break it down into its various components. Let’s take a look first at all of the main features and parts of ControlPlane, and then we’ll look at ways you can put it to use to simplify your own life.

Contexts

You can nest your Contexts to create structure.

Creating a context is a simple matter of deciding upon a name, and hierarchy if so desired. Click the + and type in a name. Drag to reorder or nest to create a folder-like hierarchy. Once created, you use Evidence Sources and Rules to define when they are activated. It is possible to have more than one context active at the same time, thus allowing for great granularity in terms of triggering actions.

Evidence Sources

Remember to disable unused Evidence Sources.

There are many available Evidence Sources with which to define rules and due to constant updates by the developer and community the list of both Evidence Sources and Actions keeps growing. Having said that however, it is possible to disable Sources you don’t need or use in order to unclutter the list of available options when creating new rules (Owners of Macs without FireWire can disable that source, for example). Another advantage of disabling Sources that aren’t needed or used is that ControlPlane won’t “scan” them looking for context triggers which should lower the performance hit (which is already very minimal).

Rules

Pay close attention to Confidence Level of each rule.

Rules are how you tell ControlPlane what,where or when your context is. You can use any enabled Evidence Source to define a Rule. Simply choose what type you wish to create, fill in the available configuration parameters, choose the context and finally the confidence level. A Context is only triggered when the Confidence Level is higher than that of the threshold defined in the General tab. One rule can have a very high Confidence Level (say Current Location, provided by Apple’s CoreLocation) while other rules may have a lower Confidence Level (assigned IP for example).

Actions

This is where all the action takes place.

Actions, as the name rightfully implies, this is where all the action takes place. This is where you define what you want to happen when a specific Context is triggered. At the time of writing, there are over 30 available actions, one of which is the ability to trigger scripts (AppleScript or shell) vastly increasing what can be done with ControlPlane. The full list is available on the site but here’s a little glimpse of what’s possible:

Change the default printer

Change the display brightness

Change Incoming/outgoing servers in Mail.app

Mount/Unmount external and network drives

Open any file, including starting Applications

Run a script, such as AppleScript or shell script

Change Time Machine backup destination

Enable/Disable Notification Center (Mountain Lion only)

Enable/Disable Bluetooth

Enable/Disable WiFi

Start or stop a VPN connection

To create a new action, click the + and choose the action you want. Depending on what type you choose, the configuration parameters will vary. There are however a few that are global to all actions, namely:

Context that should trigger the action;

When you want to trigger the Action, on Arrival, Departure or Both;

Delay before triggering the Action;

Description for your Action.

Putting ControlPlane to Good Use

Now that you know the building blocks and how they piece together you can start putting this to good use. You may or may not be feeling overwhelmed or not quite sure what you could do with this so I’ll give you a few personal examples to get you started.

My Time Contexts

I’m fortunate enough to be a telecommuter and therefore, some days I work from home and some days I work from the office. Regardless of where I am though, during the weekdays I always have a set few apps that I need for work.

That’s where my “Weekdays” Context comes into play, opening all apps I’m going to need for work. Now if I so happen to use my MacBook on the weekends, none of these apps open up and bother me.

A “Work Hours” context opens my Work Tasklist in TaskPaper and an “After Work Hours” Context opens my Projects & Hacks Tasklist. Having this automated is a boon for focus because until it opens I know it’s all work and no play.
Although I’m a user of F.lux I also have a “Late Night” context that automatically dims the display brightness so as not to strain my eyes when working late hours.

My Places Contexts

As said earlier, I move around a lot and this is where my Places Contexts shine. A “Work” context sets my default printer to the one closest to me at the office, turns off Bluetooth and Wifi (no need for either at work) and finally connects to my most used network drives.

A “Home” context sets the default printer to my own and turns on Bluetooth and Wifi. It also changes my Adium status message so that my colleagues know immediately that I working from home that day.

Final Thoughts

As you can see from these few examples, the granularity that I mentioned earlier allows for a great deal of customisation with regards to actions. You can mix and match Contexts to fit your needs. You can find other interesting ways of using ControlPlane on its Wiki Page.

I’ve been using this application for quite some time now and have yet to have had any problems. Having said that, when bugs are found, the developer and community are quick to come out with bug fixes and new features. While not as feature rich as apps such as Keyboard Maestro, you can’t beat the price and feature set it already has.

If you enjoy automating and tweaking your system then I strongly urge you to give ControlPlane a try. I’m confident you will be thankful you did.

Let me know in the comments what interesting ways you’re using ControlPlane and how its changed your workflow.

Popular Posts

Responses

I’m an avid ControlPlane user, but I’d have to object to you’re rating of 10/10. In everyday use, I notice two glaring problems with the app:

1. Interface -The app makes what should be simple tasks unduly complicated.
2. Performance – The app often fails to change contexts, sure, you can increase it’s likelihood of changing by lowering the “confidence” scale, but that also carries with it the chance of triggering changes too often.

So the long and short of this situation is that ControlPlane has huge potential, but it’s too buggy and complicated to use to merit a perfect 10.

Thanks for your feedback. I have had one or two performance hickups in the past but as of the last few updates this has been a non-issue for me.As with all things your mileage may vary.

With regards to interface, we should keep in mind that this is not something we toil in all day, every day but rather a set it and forget it app. Sure, the whole creation process could be simplified, but then again once you know your way around its all rather simple.

There is also another aspect that I take into consideration and that is the fact that this is an open-source app. Were it a paid app then yes, it would not merit a 10. I would be more demanding when it came to UI and attention to detail.

David Eglin

October 12th

ControlPlane is actually an open-source implementation of what used to be called MarcoPolo, and seems to suffer from all the same problems of its predecessor. Reports of contexts not changing when they should, or changing when they shouldn’t, were common back with MarcoPolo, too. The interface is also near-identical.

It looks distinctly like only a minimum of effort has gone into updating this in its open-source guise – MarcoPolo did not support newer versions of OS X and this appears to have been fixed, but I was never personally that impressed with MarcoPolo as an app. I currently use Sidekick instead, which only switches contexts based on location as opposed to other data sources, but it does seem to work more reliably (and the user interface is much prettier).

I’m aware that ControlPlane is the opensource Implementation of MarcoPolo and that the UI is almost identical.

As for reports of contexts not switching, Like I mentioned in my article I’ve not had these problems in the last few versions. especially when I set CoreLocation for a context switch.

I feel it is “unfair” to place ControlPlane and Sidekick in a balance and compare the two. I’m sure that if the Dev charged almost 24€ for the app he would have more time to pay attention to detail and work on the UI. As I already said, were it a paid app the rating would be different.

Stephen Tordoff

October 12th

> It is possible to have more than one context active at the same time, thus allowing for great granularity in terms of triggering actions.

Any chance you could explain how you managed to do this? As far as I can tell, once a “time context” triggers, the “place context” is left/disabled.

Sorry about that. I now see that my wording in th article was not very clear.

Basically you can have more than one context active (see http://cl.ly/image/150s211x292W as an example) but the context with the highest confidence level will the the “active” context.

What I do to circumvent this is play around with the confidence level. For place context I use core location and set confidence level to say 90, and then for time context I set 2-3 depending on my needs with confidence level of maybe 88 and offset them a couple of minutes. This way I guarantee that my place context triggers first and then a couple of minutes later the time context takes over. If I’m somewhere where no place context is triggered then the time context is triggered immediately.

You can also trigger the contexts manually but that does defeat the purpose of ControlPlane.

Hope this helps in some way.

Cheers,
Pedro

Heather

October 18th

I had gotten the same impression as Stephen- I thought I could essentially AND together three contexts.

For example, I want to toggle Time Machine on when all are true:
1.) I’m home
2.) it’s late at night
3.) my laptop is plugged in

Judging from your response, there’s no way to ensure all three are true using ControlPlane, correct?

I suppose I don’t understand this switching scheme with confidence levels that you’ve described. Isn’t it true that each context (i.e. Time and Home in your example) are completely independent of one another? So why do you need this transition from Home -> After Work Hours to occur? Even so, in the scenario that you’ve described, since your place context would be set to 90%, wouldn’t it always still win out over your time context?

First off, I apologise once again for my wording not being clear enough and I’m glad you found an answer you were looking for (maybe not the one you hoped for though).

I make use of multiple contexts and confidence rules to “bend” ContorlPlane to my needs and from what you describe it would be easy enough to do the same.

– Lets imagine you set in the Preferences that it’s needed a Confidence Level greater than 90% in order to switch.
– You can create a context “Time Machine”
– Create 3 rules for each of the conditions you desire and make sure that the sum of all three equals a confidence level greater than 90% (you’ll have to experiment or look in the help where it explains the math behind it and then do the math yourself)
– this way, if only 2 rules are true then the confidence level won’t be reached and you wont have “Time Machine” context triggered.