{"id":26194123,"url":"https://github.com/fl64/motion-detection-telegrambot","last_synced_at":"2026-04-26T07:33:37.501Z","repository":{"id":113953979,"uuid":"65622221","full_name":"fl64/Motion-detection-TelegramBot","owner":"fl64","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-13T15:27:17.000Z","size":2824,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T20:12:29.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fl64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-08-13T14:53:08.000Z","updated_at":"2021-01-14T03:07:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"895543b8-1944-4bf6-855f-89f40f5cab82","html_url":"https://github.com/fl64/Motion-detection-TelegramBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fl64/Motion-detection-TelegramBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl64%2FMotion-detection-TelegramBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl64%2FMotion-detection-TelegramBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl64%2FMotion-detection-TelegramBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl64%2FMotion-detection-TelegramBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fl64","download_url":"https://codeload.github.com/fl64/Motion-detection-TelegramBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl64%2FMotion-detection-TelegramBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32289926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T06:26:00.361Z","status":"ssl_error","status_checked_at":"2026-04-26T06:25:58.791Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-12T01:55:11.564Z","updated_at":"2026-04-26T07:33:37.496Z","avatar_url":"https://github.com/fl64.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motion-detection-TelegramBot\n\n![](https://raw.githubusercontent.com/fl64/Motion-detection-TelegramBot/c7db15d6ff2614820ebb2078b383b3e9edc3914a/pri2.JPG)\n\n## Intro\n- Телеграм-бот для получения фото с веб-камеры в случае фиксации ей какого-либо движения.\n- Тестировался и отлаживался на Rasberry Pi2 с Ubuntu Server 16.04. Описание установки Ubuntu Server доступно по ссылке: https://wiki.ubuntu.com/ARM/RaspberryPi\n\n## Install\n1. Производим установку ОС :)\n2. Подключаем камеру\n3. Установка motion:\n\t- Устанавливаем пакет motion: ```sudo apt install motion```\n\t- Производим корректировку настроек в ```/etc/motion/motion.conf``` (Пример настроек есть в репозитории). \n\t- По-умолчанию бот мониторинг фото в каталоге ```/tmp```\n\t- Для запуска motion в виде сервиса, в файле ```/etc/default/motion``` устаналиваем следующее занчение параметра: ```start_motion_daemon=yes```\n\t- Производим настройки сервиса motion:\n\t\t- ``` systemctl enable motion ```\n    \t- ``` systemctl start motion  ```\n4. Регистрация бота\n\t- Добавляем в телеграме бота @BotFather\n\t- Вводим ```/newbot```\n\t- Далее задаем имя бота и его username.\n\t- После завершения предыдущих шагов @BotFather выдаст токен для бота. Его необходимо будет задать в переменной token в bot.py.\n\t- Вводим ```/setcommands```, и добавляем команды (не обязательно)\n\t\t- start - start\n\t\t- stop - stop\n5. Установка бота\n\t- Устанавливаем pip3 и необходимые библиотеки:\n\t\t- ```sudo apt-get install python3-pip```\n\t\t- ```sudo pip3 install --upgrade pip```\n\t\t- ```sudo pip3 install telepot```\n\t\t- ```sudo pip3 install watchdog```\n\t- Создаем каталог ```mkdir /opt/bot``` и копируем в него ```bot.py```\n\t- Отредактируем ```bot.py```\n\t\t- **password** - пароль для подключения к боту\n\t\t- **monitor_path** - каталог, где мониторятся файлы \"*.jpg\"\n\t\t- **teletoken** - токен для бота, полученный на шаге 4.\n\t- В каталог ```/etc/systemd/system/``` копируем файл ```bot.service```\n\t- Регистрируем сервис бота\n\t\t- ```systemctl enable bot```\n\t\t- ```systemctl start bot```\n6. Проверка\n\t- В телеграм производим поиска бота по ранее заданному имени\n\t- Запускаем бота коммандой ```/start password```\n\t- Для остановки работы бота ввести: ```/stop```\n\nСозданно под впечатлением: https://github.com/Surzhikov/Telegram-Webcam-Home-Guard :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffl64%2Fmotion-detection-telegrambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffl64%2Fmotion-detection-telegrambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffl64%2Fmotion-detection-telegrambot/lists"}