Coder Social home page Coder Social logo

afcarl / slack-doorbell-camera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joebullard/slack-doorbell-camera

0.0 0.0 0.0 54 KB

Small office doorbell system using Slack Incoming Webhooks

License: GNU General Public License v3.0

Python 100.00%

slack-doorbell-camera's Introduction

slack-doorbell-camera

Small office doorbell system using a Slack Incoming Webhooks, triggered by motion detection using Motion, and evaluated by Google Cloud Vision API.

Hardware Setup

I am using a Raspberry Pi with a cheap USB webcam, but any system with any attached camera should be fine.

TODO: add pictures

Software and Dependencies

The current setup depends on Motion, a popular program for motion detection in webcams (also does streaming).

To install Motion in Ubuntu (or Raspbian):

sudo apt-get install motion

Follow the Motion configuration guide, or modify motion.conf.example in this repo (which has been stripped down to bare minimum settings for clarity).

Run motion with your edited config file:

motion -c ./motion.conf.example

Create a Slack Incoming Webhook

Follow the guide on Creating Incoming Webhooks for your Slack team.

Customize it how you like. But you need to use the URL you are given on that page.

Would be nice if this repo was transformed into a bot, so the team owner doesn't have to configure it themselves, but I don't feel like hosting this or submitting it to the app registry, etc. (maybe someday).

Enable Cloud Vision API

Currently this only supports the use of a Service Account credentials file, or if none is provided, your gcloud default credentials.

Follow the guide on Service Accounts, and make sure to enable Cloud Vision API in your project.

Python dependencies

Use a virtualenv as usual:

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Running the "bot"

Not an actual Slack Bot, but you can host this wherever you want and have it read from your camera.

python main.py \
    --motion-output-dir /mycam \
    --stream-addr myExternalIP:8081 \
    --json-keyfile /path/to/service-account-credentials.json \
    --webhook-url https://hooks.slack.com/services/my/webhook/url

For full list of arguments, run python main.py -h

slack-doorbell-camera's People

Contributors

joebullard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.