Skip to main content

A webcam security monitoring system with Telegram notifications

Project description

Webcam Security

A Python package for webcam security monitoring with Telegram notifications. This package provides motion detection capabilities with configurable monitoring hours and automatic video recording.

Features

  • 🎥 Real-time motion detection using webcam
  • 📱 Telegram notifications with snapshots and device identification
  • ⏰ Configurable monitoring hours (default: 10 PM - 6 AM)
  • 🔧 Telegram bot commands for remote configuration
  • 🚨 Force monitoring on/off via Telegram
  • 🎬 Automatic video recording on motion detection
  • 🎵 Audio recording with video (combined MP4 format)
  • 🧹 Automatic cleanup of old recordings
  • 🖥️ Live preview with monitoring status
  • 🚀 Easy-to-use CLI interface
  • 🔄 Self-update mechanism
  • ⚡ UV-powered for faster builds and dependency management

Telegram Bot Commands

Once the monitoring is running, you can control it remotely via Telegram commands:

Status & Control

  • /start - Welcome message and command list
  • /status - Show current configuration and monitoring status
  • /help - Show detailed help and command reference
  • /force_on - Force monitoring ON (ignores time schedule)
  • /force_off - Force monitoring OFF (returns to normal schedule)

Configuration

  • /set_hours <start> <end> - Set monitoring hours (24h format)
    • Example: /set_hours 22 6 (10 PM to 6 AM)
    • Example: /set_hours 0 24 (24/7 monitoring)

System

  • /update - Check for software updates

Usage

Quick Start

  1. Initialize configuration:

    webcam-security init --bot-token "YOUR_BOT_TOKEN" --chat-id "YOUR_CHAT_ID" --device-id "MyCamera"
    
  2. Start monitoring:

    webcam-security start
    
  3. Control remotely via Telegram:

    • Send /start to your bot for command list
    • Use /force_on to enable monitoring immediately
    • Use /set_hours 22 6 to set monitoring hours

Device Identification

All media sent to Telegram includes a device identifier:

  • If you specify --device-id during init, that name will be used
  • Otherwise, the system hostname will be used automatically
  • This helps identify which camera sent the alert when you have multiple systems

Available Commands

  • webcam-security init - Initialize configuration
  • webcam-security start - Start monitoring
  • webcam-security status - Show current configuration
  • webcam-security clean - Manually clean old recordings
  • webcam-security update - Check for and install updates

Installation

Using pip (traditional)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webcam_security-0.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webcam_security-0.3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file webcam_security-0.3.tar.gz.

File metadata

  • Download URL: webcam_security-0.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for webcam_security-0.3.tar.gz
Algorithm Hash digest
SHA256 7e5b3981072f3b591605cabba66c51ea80bf3c6b7530c85fcef0d0270e6da3e1
MD5 05a31cbf295bacf9ed5b8cb5f1ddf25f
BLAKE2b-256 97501c856615d3d55e3e5b002bccf91751f4219c5a0f8d51e0569cfa101fbbe1

See more details on using hashes here.

File details

Details for the file webcam_security-0.3-py3-none-any.whl.

File metadata

  • Download URL: webcam_security-0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for webcam_security-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a1b833dda587cfd0ccb379b2e4ef363d726968253d4a6ad0a381f0bcc53437c
MD5 aa1b7814680ea2cd485c29d8447e3b91
BLAKE2b-256 fb1f061ada733f895c7ea3832b322c6058e358ced08f46124e058ee9940b8240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page