I modified it slightly to send a message to a Spark room when the Raspberry Pi detects my iPhone bluetooth mac address:
print "Home Attendance"
currenttime=time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())
print "Checking " + currenttime
result = bluetooth.lookup_name('ff:ff:ff:ff:ff:ff', timeout=5)
if (result != None):
print "Danny: in"
resp_dict = pyCiscoSpark.post_message(accesstoken,roomid,"BT: Danny is at home now - " + currenttime)
print "Danny: out"
resp_dict = pyCiscoSpark.post_message(accesstoken,roomid,"BT: Danny is NOT at home now - " + currenttime)
Replace ff:ff:ff:ff:ff:ff with your phone Bluetooth mac address. I've also used the pyCiscoSpark.py in Github for posting a message to the Spark room:
So this is how it looks like when the script is running: