def __init__(self):
logging.getLogger('garage').info('Butler is starting...')
logging.getLogger('garage').info('AWS: region=%s, topic=%s' % (REGION, TOPIC))
self.camera = Camera()
self.notify = Notify(self)
GPIO.add_event_detect(button_pin, GPIO.FALLING, callback=self.door_check, bouncetime=1000)
scheduler.start()
scheduler.add_job(self.status_check, 'interval', minutes=1)
self.last_notification = datetime.datetime.strptime('Jun 1 2005 1:00PM', '%b %d %Y %I:%M%p')
self.last_status = GPIO.input(button_pin)
评论列表
文章目录