Code Monkey home page Code Monkey logo

motion-eye-bot's Introduction

Motion eye bot

This is a small script that monitors motion from your webcam and sends you images and videos via a Telegram bot if motion is detected. To use it, you need to register a bot on Telegram and also know your Telegram ID (which you can obtain from the @userinfobot).

Installation

  1. Clone the repository. 2a. Run install.bat to automatically set up venv, install dependencies, and perform initial program configuration (be sure to specify your Telegram bot token, your Telegram ID for receiving messages, and choose a camera; you can leave other parameters at their default values). 2b. Set up a virtual environment and manually install dependencies from the requirements.txt file. Modify the settings in the config.ini file or by using the settings.py script.

Usage

Option 1: Launch using start.bat. Option 2: Launch the main.py script.

Settings

[BotSettings]

token - Your Telegram bot token from @BotFather

chat_id - Your Telegram ID (You can obtain it from @userinfobot)

time_to_first_photo - Number of seconds to delay before sending the first photo upon motion detection

time_to_next_photo - Number of seconds to wait before sending subsequent photos if motion continues

time_to_send_videos - Delay before sending a video after motion has stopped; if motion resumes before this time elapses, recording will continue

[MotionDetectionSettings]

threshold_area - Size of the detected object area, depending on script usage; smaller values detect smaller objects (e.g., a human face in a laptop camera frame is roughly 40000)

frame_rate - Number of frames per second in the recorded video

camera_index - Camera number in the system; default is 0 and depends on the number of connected cameras

windows_visible controls whether to display a window with a view from the camera. The default value is 1, which is used to set up the camera's position or view the image coverage.

motion-eye-bot's People

Contributors

rezovsky avatar

Watchers

 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.