Ezviz摄像头视频流技能。生成PC与移动端链接,用于实时流和回放流。使用时机:需要查看摄像头实时画面或回放录像。
Generate Ezviz camera live and playback streaming links for PC and mobile devices.
Complete the following security checks before using this skill:
#CheckStatusDescription1Credential Permissions⚠️ RequiredUse minimal permission AppKey/AppSecret, do not use master account credentials2Config File Reading⚠️ NoteSkill reads ~/.openclaw/*.json files ( but environment variables have higher priority)3Token Caching⚠️ NoteToken cached in /tmp/ezviz_global_token_cache/ (permissions 600, shared across skills)4API Domain✅ Verifiedopenai.ys7.com is official Ezviz API endpoint5Code Review✅ RecommendedReview scripts/generate_preview.py and lib/token_manager.py6Python Dependencies⚠️ RequiredRequires requests library - install via pip install requests
Credential Priority (high to low):
text
┌─────────────────────────────────────────────────────────────┐
│ 1. Environment Variables (Highest Priority - Recommended) │
│ ├─ EZVIZ_APP_KEY │
│ ├─ EZVIZ_APP_SECRET │
│ └─ EZVIZ_DEVICE_SERIAL │
│ ✅ Advantage: No config file reading, fully isolated │
├─────────────────────────────────────────────────────────────┤
│ 2. OpenClaw Config Files (Only when env vars not set) │
│ ├─ ~/.openclaw/config.json │
│ ├─ ~/.openclaw/gateway/config.json │
│ └─ ~/.openclaw/channels.json │
│ ⚠️ Note: Only reads channels.ezviz field │
├─────────────────────────────────────────────────────────────┤
│ 3. Command Line Arguments (Lowest Priority) │
│ python3 generate_preview.py appKey appSecret deviceSerial│
└─────────────────────────────────────────────────────────────┘
Security Recommendations:
bash
# 1. Use environment variables (highest priority, avoids accidental config file use)
export EZVIZ_APP_KEY="your_dedicated_app_key"
export EZVIZ_APP_SECRET="your_dedicated_app_secret"
export EZVIZ_DEVICE_SERIAL="BF6985110"
# 2. High security: Disable token caching
export EZVIZ_TOKEN_CACHE=0
# 3. Test credentials (recommended to use test account first)
# Login to https://openai.ys7.com/ to create dedicated app with only preview permissions
bash
pip install requests
bash
export EZVIZ_APP_KEY="your_app_key"
export EZVIZ_APP_SECRET="your_app_secret"
export EZVIZ_DEVICE_SERIAL="BF6985110"
Optional environment variables:
bash
export EZVIZ_CHANNEL_NO="1" # Channel number, default 1
export EZVIZ_TOKEN_CACHE="1" # Token cache: 1=enabled (default), 0=disabled
bash
python3 {baseDir}/scripts/generate_preview.py
Command line arguments:
bash
# Single device
python3 {baseDir}/scripts/generate_preview.py appKey appSecret BF6985110 1
# Specify channel number
python3 {baseDir}/scripts/generate_preview.py appKey appSecret BF6985110 1
Skill supports automatically reading Ezviz credentials from OpenClaw channels configuration.
Add to ~/.openclaw/config.json or ~/.openclaw/channels.json:
json
{
"channels": {
"ezviz": {
"appId": "your_app_id",
"appSecret": "your_app_secret",
"domain": "https://openai.ys7.com",
"enabled": true
}
}
}
Credential priority:
text
1. Get Token (appKey + appSecret → accessToken)
↓
2. Generate Links (accessToken + deviceSerial → preview/playback URLs)
↓
3. Output Results (PC + Mobile links for live and playback)
You don't need to manually get or configure EZVIZ_ACCESS_TOKEN!
Skill automatically handles token acquisition and caching:
text
First Run:
appKey + appSecret → Call Ezviz API → Get accessToken (7 days validity)
↓
Save to cache file (system temp directory)
↓
Subsequent Runs:
Check if cached token is expired
├─ Not expired → Use cached token directly ✅
└─ Expired → Get new token
Token Management Features:
EZVIZ_ACCESS_TOKENtext
======================================================================
Ezviz Open Video Skill (萤石设备视频流)
======================================================================
[Time] 2026-03-19 19:23:00
[INFO] Device: BF6985110 (Channel: 1)
======================================================================
SECURITY VALIDATION
======================================================================
[OK] Device serial format validated
[OK] Using credentials from environment variables
======================================================================
[Step 1] Getting access token...
======================================================================
[INFO] Using cached global token, expires: 2026-03-26 19:21:16
[SUCCESS] Using cached token, expires: 2026-03-26 19:21:16
======================================================================
[Step 2] Generating links...
======================================================================
📺 Live Links:
🖥️ PC:
https://open.ys7.com/console/jssdk/pc.html?url=ezopen://open.ys7.com/BF6985110/1.live&accessToken=at.xxx
📱 Mobile:
https://open.ys7.com/console/jssdk/mobile.html?url=ezopen://open.ys7.com/BF6985110/1.live&accessToken=at.xxx
📼 Playback Links:
🖥️ PC:
https://open.ys7.com/console/jssdk/pc.html?url=ezopen://open.ys7.com/BF6985110/1.rec&accessToken=at.xxx
📱 Mobile:
https://open.ys7.com/console/jssdk/mobile.html?url=ezopen://open.ys7.com/BF6985110/1.rec&accessToken=at.xxx
======================================================================
TypePlatformFormatLivePChttps://open.ys7.com/console/jssdk/pc.html?url=ezopen://{serial}/{channel}.live&accessToken={token}LiveMobilehttps://open.ys7.com/console/jssdk/mobile.html?url=ezopen://{serial}/{channel}.live&accessToken={token}PlaybackPChttps://open.ys7.com/console/jssdk/pc.html?url=ezopen://{serial}/{channel}.rec&accessToken={token}PlaybackMobilehttps://open.ys7.com/console/jssdk/mobile.html?url=ezopen://{serial}/{channel}.rec&accessToken={token}
Link Explanation:
.live — Live streaming.rec — Recording playbackInterfaceURLDocumentationGet TokenPOST /api/lapp/token/gethttps://openai.ys7.com/help/81
DomainPurposeopenai.ys7.comEzviz Open Platform API (Token)open.ys7.comPreview page hosting
⚠️ Token Validity: accessToken typically valid for 7 days, skill auto-manages caching and refresh
⚠️ Privacy Compliance: Camera monitoring may involve privacy issues, ensure compliance with local laws
⚠️ Device Requirements: Device must be online to generate valid links
This skill sends data to third-party services:
Data TypeSent ToPurposeRequiredappKey/appSecretopenai.ys7.com (Ezviz)Get access token✅ RequiredEZVIZ_ACCESS_TOKENAuto-generatedAuto-get on each run****✅ Auto
Data Flow:
openai.ys7.com): Token request - Official Ezviz APICredential Permission Recommendations:
Local Processing:
EZVIZ_TOKEN_CACHE=0 environment variableScenario 1: Single Device Preview
bash
python3 generate_preview.py your_key your_secret BF6985110
Scenario 2: Specify Channel
bash
python3 generate_preview.py your_key your_secret BF6985110 1
Scenario 3: Environment Variables
bash
export EZVIZ_APP_KEY="your_key"
export EZVIZ_APP_SECRET="your_secret"
export EZVIZ_DEVICE_SERIAL="BF6985110"
python3 generate_preview.py
Default Behavior:
/tmp/ezviz_global_token_cache/)ConcernMitigationGlobal cache shared across skillsRun in isolated environment (container/VM), or disable cachingTemp directory accessible by other usersUse dedicated user account, or set custom cache pathToken persistenceDisable caching: EZVIZ_TOKEN_CACHE=0
bash
export EZVIZ_TOKEN_CACHE=0
python3 scripts/generate_preview.py ...
SystemPathmacOS/Linux/tmp/ezviz_global_token_cache/WindowsC:\Users\{user}\AppData\Local\Temp\ezviz_global_token_cache\
Clear Cache:
bash
rm -rf /tmp/ezviz_global_token_cache/
bash
# Use .env file
echo "EZVIZ_APP_KEY=your_key" >> .env
echo "EZVIZ_APP_SECRET=your_secret" >> .env
chmod 600 .env
source .env
bash
export EZVIZ_TOKEN_CACHE=0
lib/token_manager.py to understand cache behavior~/.openclaw/*.json files don't contain unrelated secretsscripts/generate_preview.py and lib/token_manager.pyopenai.ys7.com is official Ezviz endpointpip install requests~/.openclaw/*.json don't contain unrelated secretstext
ezviz-open-video/
├── SKILL.md # Skill documentation
├── lib/
│ ├── token_manager.py # Token manager (shared)
│ └── README_TOKEN_MANAGER.md # Token management docs
├── references/
│ └── ezviz-agent-api.md # API reference
└── scripts/
└── generate_preview.py # Main script
Last Updated: 2026-03-19
Version: 1.1.0