Giter Site home page Giter Site logo

motioneye-pir's Introduction

PIR motion detection

This is a short script to control motionEye (or just plain motion) using a PIR motion sensor connected via GPIO to a Raspberry Pi.

Installation

MotionEyeOS is taken as base for this description. However, it should be straight forward to apply these steps also on another installation.

On the camera, the root filesystem has to be mounte Read/Write to install the script

[root@cam1 ~]# mount -o remount,rw /

Download the script

[root@cam1 ~]# mkdir /data/pir
[root@cam1 ~]# curl -o /data/pir/pir_motion_detector.py https://raw.githubusercontent.com/avanc/motioneye-pir/master/pir_motion_detector.py

and make your config changes

[root@cam1 ~]# vi /data/pir/pir_motion_detector.py

At least change the GPIO (PIR_GPIO) according your hardware setup. Alternatively, you can also set the physical pin number (PIR_PIN).

Most PIR sensors have defined logic values (0V and 3.3V). However, if you are not using a PIR sensor and want to connect a button for manually start recording (e.g. for testing), connect the button between the pin and 3.3V and activate the internal pull-down resistor (INTERNAL_RESISTOR="pull-down").

Activate script on boot by addinf following line to /data/etc/userinit.sh

python /data/pir/pir_motion_detector.py

motioneye-pir's People

Contributors

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