Using Bluetooth Proximity Detection with Home Automation

In the movies, smart homes automatically greet you when you return after a hard day at work. And while that does sound like a neat trick, until recently it just hasn't been very easy to actually do. In reality, most home automation setups are based around button pushing.

That's because home automation, in its most basic form, is about re-locating switches. For example, instead of having to get up from your chair to turn off the porch light, you can press a button on a remote control instead. The continued popularity of the famous sonically-controlled switch, "The Clapper," gives testimony to the appeal of the simple remote control.

One step beyond button relocation is doing several things with one button press -- such as turning off all of the lights upstairs and adjusting the thermostat at the same time. This is possible when you use a home automation program to create macros that trigger a series of actions when you wield your remote control. But, in the end, you're still pressing a button to spur your home into action, and it just doesn't quite live up to the Hollywood vision.

Fortunately, technology and clever programmers are catching up with the fantasy. With the Mac you already have, your cell phone, and a little scripting, you can be living in a house that automatically does things for you when you arrive; no buttons required.

What's the new ingredient that makes this possible? Bluetooth. Although it wasn't designed for this use, it turns out that Bluetooth provides a way for your computer to know when you're home by inferring your presence from your cell phone or other Bluetooth-equipped device. And that's good enough to start putting the "smart" in smart homes.

The Hardware You Need

You need a Mac with Bluetooth and at least one Bluetooth device, such as a cell phone or PDA. Virtually any portable Bluetooth-equipped device will work. Unlike with iSync, no special Bluetooth support is necessary, since your Mac doesn't have to actually exchange any information with the device, it only has to be able to detect that it exists. I've used the technique described here with a Nokia 6600 phone, a Motorola Bluetooth Headset, and an Apple iPhone.

The Software You Need

There are several programs that allow you to trigger scripts from a Bluetooth device, including the venerable Salling Clicker ($23.95) and Home Zone (in Beta). But I think the one best suited for this project is Proximity (Donationware). It's not as complex as the others, it provides exactly the functions necessary for this project, and it is unobtrusive when running so you can continue to use your Mac for other tasks if you don't have a computer dedicated to home automation.

If the things you're interested in automating only happen on your Mac, such as automatically checking your personal email when you come home from work, you don't need anything else. But if you want to control the lights in your home, or otherwise reach out beyond your computer, you'll need home automation equipment and software. Setting up the equipment is beyond the scope of this article, but it's easier than you might think. See "Old Mac, New Tricks" for details.

For home automation software, you can use Indigo ($179), XTension ($149.95), or MisterHouse (freeware). In this example I'll use XTension, but the techniques can be used with the others, too.

Mac, Meet Phone

The first step is to formally introduce your Mac and your cell phone to each other, a process called "pairing." To do this, make sure your phone's Bluetooth support is switched on and the device is set to "discoverable" mode. (On my Nokia, this is done in the Communications settings. On the iPhone, it's in the General settings menu.) Next, go to your Mac and follow these steps:

  1. Choose System Preferences from the Apple menu, then click Bluetooth.
  2. In the Settings tab, select the Discoverable check box. This allows your phone to see that your Mac is available via Bluetooth.
  3. Click the Devices tab, then click Set Up New Device. The Bluetooth Setup Assistant opens.
  4. Use the setup assistant to pair your device with your Mac.

Depending on the device, this might involve entering a series of numbers to authorize the connection. If you have trouble with this, try changing the settings under Passkey Options.

For the purposes of this project, you don't need to set up Address Book sharing, syncing, or data access. You can ignore, or turn off, those options if the setup assistant presents them to you.

When you've finished the setup assistant, your device will be added to the list of Bluetooth Devices in the Bluetooth preferences pane.

Pages: 1, 2

Next Pagearrow