Receive motion/person/sound notifications from Google Nest cameras and watch live video in a small always-on-top desktop window on KDE Plasma.
Technical Hurdles Project Demonstrates:
- Software rendering video to plasma compositor overlay layer in real time. Perfect high frames even while gaming.
- WebRTC + SDP video signaling. Signal upgrade and downgrade on the fly.
- WebRTC -> v4l2loopback
- Opens a live video stream from Google Home in a floating overlay window. The window draws on top of everything — including full-screen games and videos — and doesn't appear in the taskbar or Alt+Tab. It can be pinned to any screen corner.
- A tray icon lets you show or hide the window with a single click.
- The stream reconnects automatically if it drops.
- Can also stream to a virtual webcam you can use in any program that consumes video streams like OBS.
You'll need a few libraries installed before building. On Debian/Ubuntu:
sudo apt install build-essential pkg-config \
libcurl4-openssl-dev libssl-dev \
libdatachannel-dev \
libwayland-dev \
libavcodec-dev libavutil-dev libswscale-dev \
libayatana-appindicator3-devOn Arch Linux:
pacman -S base-devel pkgconf curl openssl \
libdatachannel wayland ffmpeg libayatana-appindicatormakeThe binary is written to build/camera-notif.
Before running, you need to register with Google's device API. This is a one-time process.
Go to the Device Access Console, create a project (one-time $5 fee), and note the Project ID.
- In the Google Cloud Console, enable the Smart Device Management API and the Cloud Pub/Sub API.
- Go to APIs & Services → Credentials, create an OAuth 2.0 client ID (Desktop app type), and note the client ID and secret.
- On the OAuth consent screen, add yourself as a test user with these scopes:
https://www.googleapis.com/auth/sdm.servicehttps://www.googleapis.com/auth/pubsub
- Create a Pub/Sub topic and subscription for receiving events:
gcloud pubsub topics create camera-events --project YOUR_GCP_PROJECT gcloud pubsub subscriptions create camera-sub \ --topic camera-events --project YOUR_GCP_PROJECT - Back in the Device Access Console, link the topic
(
projects/YOUR_GCP_PROJECT/topics/camera-events) to your project.
cp .env.example .envEdit .env and fill in your credentials:
CLIENT_ID=...
CLIENT_SECRET=...
SDM_PROJECT_ID=...
PUBSUB_SUBSCRIPTION=projects/YOUR_GCP_PROJECT/subscriptions/camera-sub
The first time you run, it will ask you to open a URL in your browser and paste back an authorization code. After that, it handles token refresh automatically.
./build/camera-notifLogs camera events as they arrive and saves clip images to clips/.
./build/camera-notif --widgetOpens a small video window in the corner of your screen. The window starts hidden — click the tray icon to show it. Right-click the tray icon to choose which corner to pin it to, or to exit.
If you have multiple cameras, pass the device number shown at startup:
./build/camera-notif --widget 1--stream-play Open the stream in an ffplay window
--stream-v4l2 DEV Feed the stream into a v4l2loopback device
--force-reauth Re-run the Google sign-in flow
--help Show all options
| Problem | Fix |
|---|---|
CLIENT_ID not set |
Make sure .env exists and is filled in |
Sign-in fails with invalid_client |
Double-check the client ID and secret in .env |
Sign-in fails with invalid_grant |
The code expires quickly — paste it immediately after copying |
HTTP 403 on startup |
Make sure both APIs are enabled in Google Cloud and your project IDs match |
| No events arriving | Check that the Pub/Sub topic is linked in the Device Access Console |
| No video overlay | Your build is missing the wayland or ffmpeg libraries — check the make output |
| No tray icon | The appindicator library is missing — install libayatana-appindicator3-dev |
| Stream disconnects | Normal — it reconnects automatically |
