- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Raspberry Pi 5 Motion Detection Camera | Send Telegram Alerts with USB Webcam!
In this video, I show you how I built a real-time motion detection system using a Raspberry Pi 5 and a USB camera — complete with automatic Telegram notifications, instant video clips, and smart monitoring.
You’ll learn:
- How to connect and configure a USB webcam on Raspberry Pi 5
- Setting up motion detection using Python + motion feed detection
- Automatically recording video clips when motion is detected
- Sending alerts and video files directly to Telegram
- Tips for reliability, performance, and home surveillance use cases
- If you’re building a DIY security system or experimenting with Raspberry Pi automation, this tutorial is perfect for you.
🔧 Tools & Technologies Used:
Raspberry Pi 5
USB camera
Python + OpenCV
Telegram Bot API
Motion detection scripting
telegram helper:
https://t.me/userinfobot
Code:
import telegram
import os
import sys
# Configuration
BOT_TOKEN = 'HTTP API url'
CHAT_ID = 'xxxxxxxxxxxxxxxxxx'
VIDEO_DIR = '/var/lib/(dir name)'
def send_alert(video_file):
bot = telegram.Bot(token=BOT_TOKEN)
with open(video_file, 'rb') as f:
bot.send_message(chat_id=CHAT_ID, text="Motion detected!")
bot.send_video(chat_id=CHAT_ID, video=f)
if __name__ == '__main__':
latest_file = max([os.path.join(VIDEO_DIR, f) for f in os.listdir(VIDEO_DIR)], key=os.path.getctime)
send_alert(latest_file)
-------------------------------------------------------------------------------------------------
Delete videos from your Pi storage:
cd /var/lib/(your dir) || exit 1
find . -type f -name "*.mkv" -mmin +360 -delete
Видео Raspberry Pi 5 Motion Detection Camera | Send Telegram Alerts with USB Webcam! канала AronAyub
You’ll learn:
- How to connect and configure a USB webcam on Raspberry Pi 5
- Setting up motion detection using Python + motion feed detection
- Automatically recording video clips when motion is detected
- Sending alerts and video files directly to Telegram
- Tips for reliability, performance, and home surveillance use cases
- If you’re building a DIY security system or experimenting with Raspberry Pi automation, this tutorial is perfect for you.
🔧 Tools & Technologies Used:
Raspberry Pi 5
USB camera
Python + OpenCV
Telegram Bot API
Motion detection scripting
telegram helper:
https://t.me/userinfobot
Code:
import telegram
import os
import sys
# Configuration
BOT_TOKEN = 'HTTP API url'
CHAT_ID = 'xxxxxxxxxxxxxxxxxx'
VIDEO_DIR = '/var/lib/(dir name)'
def send_alert(video_file):
bot = telegram.Bot(token=BOT_TOKEN)
with open(video_file, 'rb') as f:
bot.send_message(chat_id=CHAT_ID, text="Motion detected!")
bot.send_video(chat_id=CHAT_ID, video=f)
if __name__ == '__main__':
latest_file = max([os.path.join(VIDEO_DIR, f) for f in os.listdir(VIDEO_DIR)], key=os.path.getctime)
send_alert(latest_file)
-------------------------------------------------------------------------------------------------
Delete videos from your Pi storage:
cd /var/lib/(your dir) || exit 1
find . -type f -name "*.mkv" -mmin +360 -delete
Видео Raspberry Pi 5 Motion Detection Camera | Send Telegram Alerts with USB Webcam! канала AronAyub
Комментарии отсутствуют
Информация о видео
11 декабря 2025 г. 11:15:02
00:11:23
Другие видео канала




















