I’ve been trying for years to get a decent Bluetooth “proximity” setup going so that my iPhone can trigger lighting setups as I enter and exit a room. I think I’ve finally nailed it, though I’m sure there’s plenty more testing to do.
The biggest problem I kept running into was that I could get lights to go on when I entered a room, but while I sat–even when the phone was motionless on my desk–lights would randomly turn off and turn back on. So…
I took the original “Proximity” code and updated it for Lion, in the process modifying it to check for valid signal strength instead of just a device name in the active paired list. I also incorporated dxxb’s patch to check three times before declaring that a device has left the Bluetooth range. Spruced up the pref panel a little and added an RSSI indicator to the drop menu in the menubar.
I’m using this with Indigo and some X10 lamp modules to turn on my office lights when I enter and–more importantly–turn them off when I leave to prevent my wife from complaining about me always leaving my lights on.
This is “use at your own risk.” I don’t think there’s anything going on here that would harm your computer (or even crash it), but I haven’t tested it on any machines other than my Mac Pro.
The code with my mods is all up on github, and you can download a Lion-only binary below. I apologize for the menubar icon, the old one had jaggy edges so I wanted to update it. In the process I made an abomination. I’ll remedy that soon. The “Check for updates” button still polls the original author’s site, so that won’t get you far. If I continue to update this beyond new icons, I’ll swap that over to my own site.
Proximity mod v1.6
A mod for Proximity to make it more precise and less likely to get a false \"away\" reading.
Published 04/08/12.
Updated 04/08/12. Changelog