#!/usr/bin/python import bluetooth import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) RELAY = 17 GPIO.setup(RELAY, GPIO.OUT) while True: print "Checking " + time.strftime("%a, %d %b %Y %H:%M:%S", time.gmtime()) result = bluetooth.lookup_name('78:7F:70:38:51:1B', timeout=5) if (result != Non...