More Bluetooth presence fun
Posted on 30. Aug, 2005 in SciTech
After initially getting Bluetooth working with automatic dial plan changes in Asterisk, I've linked Bluetooth presence event changes to a range of neat little tasks and spoken messages. I run a cron script every 5 minutes which grep's for the MAC address of mobile phone and then triggers off a number of tasks if detected or not. For example, when I leave for work in the morning, the script will detect that I have left and log an away time stamp. It will continue to poll every 5 minutes for my phone. When I get home several hours later and my phone is detected my status is changed to "home" in Asterisk PBX and on the anthonyjhicks.com Real-Time Tracker. The script then compiles a comprehensive welcome message to be spoken using Festival TTS. It calculates my time away, polls for waiting emails and voicemails, and checks TV shows recorded by GB-PVR. For example, within 5 minutes of getting home from work, I'll hear the following message spoken through the speakers on my Linux box:
My Bluetooth presence continues to be used the entire time I'm home, for example every time a TV program is recorded by GB-PVR, it will announce:
Where-as if my Bluetooth presence is not detected, it saves up the list of recorded shows until it detects my presence again and then plays back the list as above.
I plan to add more Bluetooth presence events, but for now automatic call diversion changes, web status, voice and email messages waiting, and an away time calculation is a nice start. Super geeky. All of this is home grown code, I'll post the scripts at some point.



