Bluetooth Proximity Detection on OS X

Hey I’m pretty new to Mac. I got my first mac this year (3 months ago). I came across a very interesting post. http://hollington.ca/technocrat/?p=44 . I want to make some type of Bluetooth Proximity Detection on my MacBook, i want it to do the following: when i leave my house my screen will dim fully(turn screen off) and my volume will mute. I have never done any mac coding, i did a little coding in highschool but not much. any help or a guide would be amazing. Thank you very much.

Did you download and run the free Proximity? Does it successfully detect your phone as you move it farther and farther from your laptop toward the door?

Try this:

Make sure Bluetooth is running, icon in menu bar, and that you have registered the device with Bluetooth in its drop down menu.

Start Proximity. An X should appear in the menu bar. Click it and choose “Preferences”. Decide what you want under General, then go to the Device pane, click “Change Device”, and choose your phone. With your phone in range, click “Check Connectivity”, repeat with the phone off or a long way away (for me that’s about 30 feet).

Click the link at the top of the applescript box below and save the script (on your desktop will do).

display dialog "I see you, sahib"

Repeat with this one:

display dialog "I can't find the phone, dammit"

Remember what you call them.

In the Proximity Scripts pane choose the second script after clicking “Change” in the top section, and the first after choosing “Change” in the second.

Close the Proximity preference pane.

Do some experiments - see whether you are getting the messages. If all that works, we’ll work on real scripts. The reason for all this who-ha is that I don’t find it very reliable, but your mileage may vary. If you’re impatient, you can set the time (in the General pane) to less than every 15 minutes (time in seconds).

Addendum: I’ve determined that it’s not Proximity that’s flaky; it’s my phone.

Ya works perfectly :smiley: now how do i do the following

Leave Bluetooth Proximity:
-pause itunes song
-turn off screen light
-Msn Messenger status to away

Enter Bluetooth Proximity
-turn screen on
-sign on MSN messenger if I’m not already signed in. (if this is hard to code, its not necessary)

This mutes the sound volume

set volume with output muted

This un-mutes it

set volume without output muted

I don’t own a Mac laptop, so I don’t know how to blank it’s screen with AppleScript, nor even if that’s possible. You might try this to see if it does what you want:

do shell script "sudo pmset displaysleep 1" user name "YourUName" password "YourAdminPW" with administrator privileges

The time (1) is in minutes, and that is the smallest setting. Setting displaysleep to 0 means never. The problem with that solution is that it is not permanent - anyone tapping your keyboard will wake the screen - and that you have to put your password in the script.

Ya i got the muting and un-muting to work perfectly, is there anyway to change the proximity distance ie, instead of when I’m 30 feet away, to change it to 5-10 feet? I want music to mute when i leave the room.