Are you Home? The project takes shape…

Wow.

For a Long Time(tm) I’ve wanted some way to add “occupant awareness” to my fledgling home automation system.  There are some really cool things that you can do if you’ve got the hardware and software: announce missed calls and playback voicemails on your networked phone system; turn on the TV and list the shows that have been recorded; turn on the audio system and start some background mood music.

And so on and so forth.  Personally I’m not sure that I want that level of personalization, but one thing I’d really love to make occupant-aware is the networked surveillance system.

Currently the system has two macro states: Home and  Away.  There are various micro settings that can be configured; which cammies have audio monitoring enabled, the size of the detection field, the sensitivity of the detection field… but for the most part the system will switch between a set of Home micro settings and Away micro settings.  Those macro states also dictate how the system determines which events should trigger an alert.

The system currently changes states based on a hard-coded schedule.  It also considers sunset/sunrise, but again that only serves to change some micro settings.

The problem with a schedule is that we don’t always adhere to it, especially on weekends.  I’m pretty diligent about sending commands from my phone to change the state of the surveillance system, but I can’t expect the wifey to do so as well.

Soooo… I started looking at automated solutions, and those solutions would most certainly involve phones.  For the most part it’s a safe bet that we carry our phones with us when we leave the house so it would be great if we could use the phone locations to determine if we’re Home or Away.

I started off looking at some way to have the phones updated their location to the home system.  This can be done using some custom programming and tying into the GPS coordinates, but GPS is a power hog.  Okay, then we can use the cell towers to get an approximate fix, then turn on GPS when the phone is on the “home” cell tower.  That may work, but it’s still troublesome.

So I went back to Bluetooth.  “Back”, because I had done some reading about a year ago and thought it looked promising but had no clue how to write a solution.  The idea is simple – the phones have Bluetooth turned on 24/7 and a computer on the home network simply polls the Bluetooth radios to see who’s around and who isn’t.  Both myself and the wife leave Bluetooth turned on so that our phones can connect to our cars automatically.

So the hurdle then was to see if I could code a simple program that could detect when a Bluetooth is in range.  Any by George, I could!  It’s  a proof of concept, but it’s remarkably small and simple.  In my testing it takes 2-3 seconds to determine that a device is *not* in range.  I make an attempt to connect to the OBEX Push Service, since pretty much every phone supports this Bluetooth profile.

So the next step will be to install this program on a laptop and see what kind of detection range we can get.

Looking good!