Bluetooth Proximity Setup
Revision as of 07:44, 3 May 2010 by Wierdbeard65
|Version||Status||Date Updated||Updated By|
I will clean this up and make it a full how-to later, just wanted to get this out there for now, feel free to beat me to the clean-up
- Using the bluetooth signal from a phone or some other device that you routinely carry in your pocket, the computer can automatically detect when you enter and leave the room (or at least the general vicinity)
- This method isn't so good when multiple Media Directors are being used, because bluetooth can only connect and monitor signal strength between one pair at a time
- Upon insertion of the bluetooth dongle, MCE should automatically recognize it and set bluetooth up for you
- After this, it may ask to reload, regen, etc
- If any bluetooth devices are in the area and visible, MCE will ask you if you want to use them, etc
- My phone is not supported as a mobile orbiter, so I clicked "do not use"
- Once all that is done and the dongle is setup, go to the KDE desktop
- Web Admin > Wizard > Devices > Security
- Click "Add Device"
- Under Device Template, select "Generic Sensor" and click "Pick Device Template"
- Select "Bedroom(Master)" from the drop down menu on the left
- Click Update at the bottom
- Make note of the device number at the top left corner
- In terminal run 'sudo apt-get install blueproximity'
- Run BlueProximity by going to K menu > Applications > Utilities > BlueProximity
- Right click the BlueProximity icon (bluetooth icon with key) and click preferences
- Put your bluetooth phone or device in discoverable/visible mode (See device's documentation)
- Click on "Scan for Devices"
- When it has finished scanning, click the desired device and then "Use Selected Device"
- A pairing request should then appear on the phone, accept it and enter a passkey
- Enter that same pass key on the computer when it asks
- If your phone gives the option, choose "Always Connect" (This will automatically connect the phone and media center when they are in range of each other)
- The sliders in the "Proximity Details" tab can be adjusted to the proper settings for being outside the room (Locking) and inside the room (Unlocking)...this takes some trial and error to get the right setting, but be patient and it will work
- In the "Locking" tab, replace the "Locking command" with "/usr/pluto/bin/MessageSend localhost 62 -1000 2 9 25 0" replacing 62 with the device code of the generic sensor you created
- Replace the "Unlocking command" with "/usr/pluto/bin/MessageSend localhost 62 -1000 2 9 25 1" again replacing 62 with the device code of the generic sensor
- Erase the "Proximity Command"
- The generic sensor will now be tripped when the phone is in range, and untripped when it is out of range
- Web Admin > Events Handler > Respond to Events
- Set the description to "Bluetooth enters room"
- Choose "A sensor is Tripped" in the drop down menu
- Click Add
- Set what device to "= Generic Sensor"
- Set trigger state to "tripped = 1"
- Click update
- Choose "Lighting Wizard" from the drop down and select the lights you would like to turn on/off/set level/leave unchanged when you enter the room
- Repeat the last 8 steps, with the description "Bluetooth leaves room" and the trigger state "tripped = 0" for the lights you want to turn on/off, etc when you leave the room
- After a reload router/orbiter regen...and possibly a full reboot...you should have proximity set up for you to leave the room and come back in
- Fine tune the sliders in BlueProximity to avoid lights turning off unintentionally