Picture this scenario: Arriving home after work, you drive slowly to your front gate, and the gate door opens automatically. The lamps are turned on and the garage door is opened – also automatically – while your car is approaching the garage.
A minute later you lock the car, enter the house, the garage door is closing behind you, the home stereo system starts playing soft jazz music, then your Mac greets you “Welcome home. There are 15 new mails waiting. Should I read them for you?”
Amazing as it sounds, you too can have that kind of automation for your house. And while there might be some hardware work involved – it depends on the complexity of the system – the heart of everything is an old (last updated in December 2007), small (less than 150KB) and free (donationware) application called Proximity. Just add your Mac and a Bluetooth device to the ingredients.
How does the system work?
Every latest edition Mac has a built-in Bluetooth transceiver that can communicate with your Bluetooth device(s). Owners of older Macs without the Bluetooth capability should add one (USB types should be sufficient) if they want to have the automation feature.
Here’s how the system works: Using Proximity, Mac users can set their machine to detect the availability of any Bluetooth devices within range. Then the user can set Proximity to run one or more AppleScripts every time the device moves in or out of range. This is a simple but cool idea.
One of the modest examples of utilizing Proximity could be something like “Set the Mac to sleep” every time the Bluetooth device goes out of range and “wake the Mac” every time the Bluetooth device goes inside the detection range. After that, with the combination of various AppleScripts, a little hardware work and imagination; anybody can build a complex home automation just based on the existence of the Bluetooth device(s).
The best choice of Bluetooth device would be a Bluetooth-capable cell phone. It’s one of those things that always goes wherever the user goes. Modern people may forget their wallets but not their cell phones.
Setting Up The System – The Basics
The first thing to do is obviously to turn on Bluetooth on your Mac. Then you can start the Proximity app and open the preferences.
Go to the “General” tab, check the “Enable monitoring of device proximity….” option and set the checking interval. The default value is every 15 minutes (900 seconds), but it can be set effectively to anything above 5 seconds (due to the hardware limits).
The next step is setting up the device. Choose the “Device” tab and click on the “Change Device” button. Any Bluetooth devices that have been paired with the Mac will show up and can be chosen, but it’s also possible to add a new one.
And now we come to the main course: the script. After choosing the “Scripts” tab, users will have the option to add scripts to be executed everytime the device moves out of range (or powered off) and everytime the device moves in range (or powered on). Pick the scripts and you’re ready to go.
Searching for the scripts
I made the process sound too easy, didn’t I? The problem is, most of us (myself included) are not “scripters”. Even though Apple brags that AppleScript language is easier than most other programming languages it doesn’t change the fact that it’s still a programming language. The thought of compiling a script gives me a goose bump. For me, it’s even scarier than watching “Ju-On“.
But fret not. We can always use ready made scripts, can’t we? After a little Googling, I found several interesting scripts that we could use (credits go to the writers). Here are a couple of the many (you can find more with the help of Google):
All you have to do is open the Script Editor (/Applications/AppleScript/Script Editor.app); copy and paste the scripts (one script at a time); push the “Compile” button, and save the script.
As I’ve said before, the limit to this system is the user’s imagination. You can set anything from turning on the screensaver to starting the coffee machine to opening the garage door. But of course, anything beyond the Mac would require you to build the hardware or buy the ready-made product.
Surely, doing the hard stuff is not my style. The wildest imagination I could think out of this system is turning the Mac into an alarm system that would warn the unfaithful husband everytime the wife comes home! But if you feel adventurous, try to peek at these sites:
- How To: DIY Home Automation Tutorial
- Cocoon Tech
- Do-It-Yourself Home Automation
- DIY Home Automation
Have you tried to automate your Mac and home using this method? Or do you have an opinion on this app? Share everything using the comment section below.
More articles about: