Control Nest smart home devices (thermostat, cameras, doorbell) via the Device Access API. Use when asked to check or adjust home temperature, view camera feeds, check who's at the door, monitor rooms, or set up temperature schedules.
Control Nest smart home devices (thermostat, cameras, doorbell) via the Device Access API. Use when asked to check or adjust home temperature, view camera feeds, check who's at the door, monitor rooms, or set up temperature schedules.
Nest Device Access
Control Nest devices via Google's Smart Device Management API.
Add https://www.google.com as an authorized redirect URI
Link your Nest account to the Device Access project
2. Get Refresh Token
Run the OAuth flow to get a refresh token:
# 1. Open this URL in browser (replace CLIENT_ID and PROJECT_ID):
https://nestservices.google.com/partnerconnections/PROJECT_ID/auth?redirect_uri=https://www.google.com&access_type=offline&prompt=consent&client_id=CLIENT_ID&response_type=code&scope=https://www.googleapis.com/auth/sdm.service
# 2. Authorize and copy the 'code' parameter from the redirect URL# 3. Exchange code for tokens:
curl -X POST https://oauth2.googleapis.com/token \
-d "client_id=CLIENT_ID" \
-d "client_secret=CLIENT_SECRET" \
-d "code=AUTH_CODE" \
-d "grant_type=authorization_code" \
-d "redirect_uri=https://www.google.com"
Staleness filter: Events older than 5 minutes are logged but never alerted. This prevents notification floods if queued Pub/Sub messages are delivered late.
Image Capture
When a doorbell or person event triggers an alert:
Primary: SDM GenerateImage API — fast, event-specific snapshot
Fallback: RTSP live stream frame capture via ffmpeg (requires ffmpeg installed)
Environment Variables
Variable
Required
Description
CLAWDBOT_GATEWAY_URL
No
Gateway URL (default: http://localhost:18789)
CLAWDBOT_HOOKS_TOKEN
Yes
Gateway hooks token for awareness notifications
OP_SVC_ACCT_TOKEN
Yes
1Password service account token for Nest API credentials
TELEGRAM_BOT_TOKEN
Yes
Telegram bot token for sending alerts
TELEGRAM_CHAT_ID
Yes
Telegram chat ID to receive alerts
PORT
No
Webhook server port (default: 8420)
Important Setup Notes
Verify the full Pub/Sub topic path in Device Access Console matches your GCP project exactly: projects/YOUR_GCP_PROJECT_ID/topics/nest-events
Use a push subscription, not pull — the webhook expects HTTP POST delivery
Test end-to-end after setup: ring the doorbell and confirm a photo arrives. Don't rely on simulated POST requests alone.
Limitations
Camera event images expire after ~5 minutes (RTSP fallback captures current frame instead)
Real-time events require Pub/Sub setup (see above)
Quick tunnels (without Cloudflare account) have no uptime guarantee
Some older Nest devices may not support all features
Motion and sound events are intentionally not alerted to avoid notification fatigue