Skip to content
Arunish Rajput@arunishrajput

Hardware & signals

Motion Detection

A camera that only speaks when something changes, and messages you on Telegram when it does.

Archived2024Solo build
PythonOpenCVTelegram Bot API

ALERT PATH

Telegram



The problem

A security camera you have to watch isn't security, it's a chore. What I wanted was the inverse: something that stays completely silent until it has a reason not to be, and then reaches me wherever I am.


What I built

Frame differencing in OpenCV against a running background, contour filtering to drop noise, and a Telegram bot that sends the frame when something real moves.


How it works

Telegram as the alert channel is the choice that makes it usable — no app to build, no push infrastructure, no server to keep awake. The bot API is a single HTTPS call and the notification lands on a phone that already exists.

The tuning problem is the same one every motion detector has: a threshold low enough to catch a person is low enough to catch a curtain in a draught and a cloud changing the light. Contour area filtering plus a background that updates slowly does most of the work.


What I'd do differently

It alerts per frame, so one person walking through produces a burst of near-identical messages. A cooldown window after each alert would have made it something I would actually leave running.