PIR_interrupt_picamera.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Sample-Code 作者: meigrafd 项目源码 文件源码
def send_push(file):
    try:
        urllib3.disable_warnings()
        pb = Pushbullet(API_KEY)
        #push = pb.push_note(pb.devices[3]['iden'],'Alarm', 'Motion detected')
        push = pb.push_note('Alarm', 'Motion detected')
        print "push-uploading file.."
        with open(file, 'rb') as vid:
            file_data = pb.upload_file(vid, 'video.mkv')
        push = pb.push_file(**file_data)
        # only for debug:
        #pushes = pb.get_pushes()
        #latest = pushes[0]
        #print latest
    except Exception, error:
        print "Error in send_push: " + str(error)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号