Skip to main content

Privacy-first motion surveillance that runs on your laptop. Detects motion, captures snapshots, streams live — all local, no cloud.

Project description

RoomieWatch

Privacy-first motion surveillance that runs on your laptop. Detects motion, captures snapshots, streams live — all local, no cloud.

Built because I don't trust my roommate.

Features

  • Motion detection — OpenCV-based frame diffing with configurable sensitivity
  • Live dashboard — MJPEG stream + stats + recent captures in a dark-themed web UI
  • Privacy-first — no cloud, no third-party servers, all data stays on your machine
  • Remote access — E2E encrypted via Tailscale (or self-hosted with Headscale)
  • Runs locked — keeps working when your screen is locked (macOS caffeinate)
  • Auto-restart — launcher script recovers from crashes automatically
  • Zero config — works out of the box with your laptop webcam

Install

pip install roomiewatch

Or from source:

git clone https://github.com/xghostient/roomiewatch.git
cd roomiewatch
pip install .

Quick Start

# Motion detection only — captures saved to ./roomiewatch_captures/
roomiewatch

# With live web dashboard
roomiewatch --stream

# Full setup — stream + prevent sleep
roomiewatch --stream --caffeinate

# Custom settings
roomiewatch --stream --port 9090 --sensitivity 5 --cooldown 10

Lock your screen (Ctrl+Cmd+Q) and leave. Do NOT close the lid.

Remote Access (Tailscale)

View your feed from anywhere on your phone — E2E encrypted, no middleman.

# On your machine
brew install tailscale
sudo brew services start tailscale
tailscale up

# Install Tailscale on your phone, sign in with the same account
# Then open: http://<tailscale-ip>:8080
tailscale ip -4  # shows your machine's Tailscale IP

Why Tailscale over Cloudflare Tunnel? Cloudflare terminates TLS at their edge — your images pass through their servers in plaintext. Tailscale is direct device-to-device WireGuard encryption. Nobody sees your footage.

For full self-hosted setup with zero third-party trust, use Headscale.

Launcher Script

For long-running sessions with auto-restart and sleep prevention:

chmod +x start_roomiewatch.sh
./start_roomiewatch.sh             # stream + Tailscale
./start_roomiewatch.sh --no-stream # motion detection only

CLI Options

Flag Default Description
--stream off Enable live web dashboard
--port 8080 Web server port
--sensitivity 3 Motion threshold % (higher = less sensitive)
--cooldown 5 Seconds between captures
--duration unlimited Auto-stop after N minutes
--camera 0 Camera index
--no-sound off Disable alert beep
--no-snapshots off Stream only, don't save to disk
--caffeinate off Prevent system sleep (macOS + Linux)

How It Works

  1. Captures frames from your webcam at ~15 FPS
  2. Converts to grayscale, applies Gaussian blur
  3. Computes absolute difference from previous frame
  4. If changed pixels exceed the sensitivity threshold — saves a timestamped JPEG and logs the event
  5. Flask serves a live MJPEG stream and a dashboard with stats and recent captures

Files Created

roomiewatch_captures/
├── motion_20260302_143022.jpg   # snapshots with timestamp overlay
├── motion_log.txt               # text log of all motion events
└── launcher.log                 # launcher/restart log

Troubleshooting

  • Camera not opening — Grant Terminal camera access in System Settings > Privacy & Security > Camera
  • Stream not loading — Check if port 8080 is in use: lsof -i :8080
  • Too many false alerts — Increase sensitivity: roomiewatch --stream --sensitivity 5
  • macOS sleeping — Don't close the lid. Use the launcher script which runs caffeinate

Requirements

  • Python 3.9+
  • A webcam
  • macOS or Linux (Windows: untested but should work)

License

MIT

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

roomiewatch-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

roomiewatch-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file roomiewatch-0.1.0.tar.gz.

File metadata

  • Download URL: roomiewatch-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roomiewatch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69188614ec9b6dc8ccbcd7bc9130df85de6f2f38a1c7819097dd9bb459780ed0
MD5 d6c7e9ef18219ca3125ac8b48f3e7711
BLAKE2b-256 8abc38bb12a096ae9f4fd1f8d178b5479258c50f7cb87f239df74664a8c77a1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for roomiewatch-0.1.0.tar.gz:

Publisher: publish.yml on xghostient/roomiewatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file roomiewatch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: roomiewatch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roomiewatch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4fe9b0065d01d2c9a7c0f5749ac57c3b36d6f8bd1f5e2adb9e44cf63deedc75
MD5 445ff15f08261b976795ce379f59e6b0
BLAKE2b-256 1667eaaa72b7a2b95a8ecbe5021fae01be8c6c529076bc25b8794081e33bc460

See more details on using hashes here.

Provenance

The following attestation bundles were made for roomiewatch-0.1.0-py3-none-any.whl:

Publisher: publish.yml on xghostient/roomiewatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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