A plugin for integrating Wyze cameras with SpatialNVR. This plugin bundles docker-wyze-bridge to provide local RTSP streaming from Wyze cameras.
- Wyze account authentication (including 2FA/TOTP)
- Automatic camera discovery from Wyze account
- Bundled wyze-bridge for TUTK to RTSP conversion (no separate container needed)
- Local streaming via RTSP (low latency)
- PTZ control for Pan cameras
- Motion detection events
- Snapshot capture
This plugin runs docker-wyze-bridge as an integrated subprocess:
- Login: Authenticates with Wyze cloud API to get device list
- Bridge Start: Spawns wyze-bridge Python process as a subprocess
- TUTK Connection: wyze-bridge connects to cameras via P2P (TUTK protocol)
- RTSP Streaming: Exposes camera streams as standard RTSP URLs
- Python 3.8+: Required for running the bundled wyze-bridge
- Wyze account with cameras
- Wyze Cam v1, v2, v3, v3 Pro
- Wyze Cam Pan, Pan v2, Pan v3, Pan Pro
- Wyze Cam Outdoor v1, v2
- Wyze Video Doorbell v1, v2, Pro
- Wyze Cam OG, OG Telephoto
- Wyze Cam Floodlight, Floodlight v2
- Open SpatialNVR web interface
- Navigate to Settings > Plugins
- Click "Add Plugin"
- Enter repository URL:
github.com/Spatial-NVR/wyze-plugin - Click Install
-
Download the latest release from GitHub Releases
-
Extract to the plugins directory:
mkdir -p /data/plugins/wyze tar -xzf wyze-plugin-*.tar.gz -C /data/plugins/wyze/ -
Ensure Python dependencies are installed:
pip3 install -r /data/plugins/wyze/wyze-bridge/app/requirements.txt
-
Restart SpatialNVR
# Clone the repository with submodules
git clone --recurse-submodules https://github.com/Spatial-NVR/wyze-plugin.git
cd wyze-plugin
# Build the plugin
./build.sh
# Copy to plugins directory (including wyze-bridge)
mkdir -p /data/plugins/wyze
cp wyze-plugin manifest.yaml /data/plugins/wyze/
cp -r wyze-bridge /data/plugins/wyze/- Navigate to Settings > Plugins > Wyze
- Enter your Wyze account credentials
- If you have 2FA enabled, provide your TOTP secret
- Click "Connect" to authenticate
- Select which cameras to add
Add to your config.yaml under the plugins section:
plugins:
wyze:
enabled: true
config:
email: your.email@example.com
password: your_wyze_password
# Optional: API key for improved authentication
key_id: your_key_id
api_key: your_api_key
# Optional: TOTP secret for 2FA
totp_key: your_totp_secret
# Optional: Custom ports
rtsp_port: 8554
web_port: 5000
# Optional: Filter specific cameras by MAC
cameras:
- mac: AABBCCDDEEFF
name: Front Door
- mac: 112233445566
name: BackyardThe simplest method, but may require solving CAPTCHAs occasionally.
For improved authentication reliability:
- Go to https://developer-api-console.wyze.com/
- Create an API key
- Add the
key_idandapi_keyto your config
If your Wyze account has 2FA enabled:
- When setting up 2FA in Wyze, copy the TOTP secret (the text code, not QR)
- Add it as
totp_keyin the config - The plugin will automatically generate codes for login
Streams are provided via RTSP through the bundled wyze-bridge:
- Main stream (HD):
rtsp://localhost:8554/{camera_name} - Sub stream (SD):
rtsp://localhost:8554/{camera_name}_sub - Snapshot:
http://localhost:5000/img/{camera_name}.jpg
Camera names are derived from Wyze nicknames with spaces and special characters replaced.
| Method | Description |
|---|---|
initialize |
Initialize with Wyze credentials, starts bridge |
shutdown |
Stop bridge and cleanup |
health |
Get plugin health status (includes bridge status) |
discover_cameras |
List all Wyze cameras from account |
add_camera |
Add a camera by MAC address |
remove_camera |
Remove a camera |
list_cameras |
List configured cameras |
get_camera |
Get camera details |
ptz_control |
Send PTZ commands (Pan cameras only) |
get_snapshot |
Get snapshot URL |
The health endpoint includes bridge status:
{
"state": "healthy",
"message": "2/2 cameras online",
"details": {
"cameras_online": 2,
"cameras_total": 2,
"authenticated": true,
"bridge_running": true
}
}curl -X POST http://localhost:12000/api/v1/plugins/wyze/cameras/{camera_id}/ptz \
-H "Content-Type: application/json" \
-d '{
"command": "right",
"speed": 5
}'Commands: up, down, left, right, stop
┌─────────────────────────────────────────────────────────────┐
│ SpatialNVR │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Wyze Plugin (Go) │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ Wyze API │ │ Bridge │ │ Camera │ │ │
│ │ │ Client │ │ Manager │ │ Manager │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └────────────────────────┬────────────────────────────────┘ │
│ │ spawns │
│ ┌────────────────────────▼────────────────────────────────┐ │
│ │ wyze-bridge (Python subprocess) │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ TUTK/P2P │ │ MediaMTX │ │ Web UI │ │ │
│ │ │ Connector │ │ (RTSP) │ │ (API) │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ RTSP streams
▼
┌─────────────────────────────────────────────────────────────┐
│ go2rtc / Web UI │
└─────────────────────────────────────────────────────────────┘
- Verify Python 3.8+ is installed:
python3 --version - Install requirements:
pip3 install flask paho-mqtt pydantic python-dotenv requests PyYAML xxtea - Check plugin logs for Python errors
- Verify email and password are correct
- If using 2FA, ensure TOTP secret is valid
- Try using API keys for more reliable auth
- Check if your account is locked (too many attempts)
- Check camera power and WiFi connection
- Verify camera works in Wyze app
- Some cameras need firmware updates for TUTK
- Wait for bridge to initialize (can take 30-60 seconds on first connect)
- Check bridge is running in health status
- Verify RTSP port (8554) is not blocked
- Check wyze-bridge web UI at http://localhost:5000
- TUTK P2P connection may route through relay servers
- Ensure camera and NVR are on same network for best performance
- Try sub-stream for lower latency
go test -v ./..../build.sh
# Creates binaries for:
# - Linux AMD64
# - Linux ARM64
# - macOS AMD64
# - macOS ARM64MIT License - see LICENSE for details.
- docker-wyze-bridge - The Python bridge bundled with this plugin
- wyze-sdk - API documentation reference