Giter VIP home page Giter VIP logo

motioneyealert's Introduction

MotionEyeAlert

Scripts to provide notifications when MotionEye spots activity. Integration uses:

  • Slack - For delivering the notifications.

Installation

  • Install MotionEye on your Raspberry Pi (https://github.com/ccrisan/motioneye/wiki/Installation)
  • Clone this project into the home directory on the Pi
  • Add the required 3rd party modules to the python installation (See External Dependencies section below)
  • Add the following command on the MotionEye in Preferences > Motion Notifications > Command /root/MotionEyeAlert/alert.sh 1 MyCamera

Where:

MyCamera - is the Camera Name and 1 - is the Camera ID

Configuration

Environment variables must be set for the application to run:

export MOTION_EYE_SERVER_URL=http://motioncam.somewhere.com
export MOTION_EYE_USER=admin
export MOTION_EYE_SIGNATURE=xxxxxxxxxxxxxxxxxx
export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXXXXXX/XXXXXX/XXXXXXXXXX
export SLACK_CHANNEL=alert

These should be located in your .profile on the Pi itself.
If they are specified for the default admin user they should be located in a profile file you should create called /admin/.profile. These will then be automatically set when the alert.sh script runs.

MOTION_EYE_SIGNATURE can be obtained by looking at the Video Streaming > Snapshot URL

##Slack

##External Dependencies Communication with Slack is carried out using the requests module. Because the default MotionEye image does not contain much in the way of utilities this can just be lifted from a local install and copied into the default python install directory on the pi. This is obviously not the best method but is more convenient than installing MotionEye on top of a default Pi image.

scp -r /Library/Python/2.7/site-packages/requests [email protected]:/usr/lib/python2.7/requests

Testing

Run the tests using nosetests

motioneyealert's People

Contributors

nathan-cashmore avatar

Watchers

Nate 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.