Summary
获取小米摄像头画面截图。当用户需要查看小米摄像头实时画面、获取摄像头截图、监控摄像头画面、或者提到"小米摄像头"、"摄像头截图"、"camera snapshot"、"摄像头画面"时使用此技能。支持列出摄像头、获取指定摄像头图片、自定义文件名等功能。
tiancheng91/skills
获取小米摄像头画面截图。当用户需要查看小米摄像头实时画面、获取摄像头截图、监控摄像头画面、或?
npx skills add tiancheng91/skills --skill xiaomi-cam-snapshot
获取小米摄像头画面截图。当用户需要查看小米摄像头实时画面、获取摄像头截图、监控摄像头画面、或者提到"小米摄像头"、"摄像头截图"、"camera snapshot"、"摄像头画面"时使用此技能。支持列出摄像头、获取指定摄像头图片、自定义文件名等功能。
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Reads AR/AP, historical cash timing, and known fixed costs from QuickBooks, PayPal, Stripe, or …
1.5K installsFull Sentry Snapshots setup for Apple/Cocoa projects. Use when asked to "setup SnapshotPreviews…
385 installsUse when needing point-in-time recovery, version control for object storage, or creating isolat…
431 installsUse Verify for snapshot testing in .NET. Approve API surfaces, HTTP responses, rendered emails,…
407 installsResearch a competitive landscape with cited snapshots, a comparison matrix, and so-what implica…
398 installsSnapshot test email templates using Verify to catch regressions. Validates rendered HTML output…
375 installsOther skills from tiancheng91/skills.
npx skills add tiancheng91/skills
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Files included with this skill beyond the listing page.
SKILL.md
6,844 B
SUMMARY.md
356 B
通过 Miloco 后端服务获取小米摄像头的实时画面截图。
docker run -d \
--name miloco \
--network host \
-e BACKEND_PORT=8001 \
ghcr.io/tiancheng91/miloco-backend:dev
服务启动后,引导用户完成以下操作:
http://localhost:8001等待用户确认: 询问用户是否已完成认证和密码设置,等待用户回复"已完成"或"确认"后继续。
用户确认后,尝试获取摄像头列表验证配置是否成功:
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--list
如果获取摄像头列表成功,询问用户是否保存以下信息以便后续使用:
MILOCO_PASSWORD 环境变量或配置文件示例保存方式:
# 保存到环境变量(当前会话)
export MILOCO_PASSWORD="你的六位密码"
# 或保存到 shell 配置文件(永久保存)
echo 'export MILOCO_PASSWORD="你的六位密码"' >> ~/.zshrc
完成首次设置后,后续可直接获取摄像头截图:
docker ps | grep miloco
如果服务未运行,先启动:
docker start miloco
# 使用已保存的密码环境变量
python scripts/camera_client.py \
--server http://localhost:8001 \
--password $MILOCO_PASSWORD \
--camera-id "CAMERA_ID" \
--output ./images
脚本位于 scripts/camera_client.py,支持以下功能:
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--list
输出示例:
摄像头列表:
--------------------------------------------------------------------------------
ID: 1036201996
名称: 客厅摄像头
在线: 是
位置: 我家 - 客厅
--------------------------------------------------------------------------------
# 使用默认文件名 (日期_did_时分秒.jpg)
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--camera-id "1036201996" \
--output ./images
# 指定自定义文件名
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--camera-id "1036201996" \
--output ./images \
--filename "living_room_snapshot"
# 每30秒获取一次
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--camera-id "1036201996" \
--output ./images \
--loop
# 每60秒获取一次,自动清理1天前的图片
python scripts/camera_client.py \
--server http://localhost:8001 \
--password YOUR_PASSWORD \
--camera-id "1036201996" \
--output ./images \
--loop --interval 60 --cleanup
| 参数 | 短参数 | 说明 | 必填 |
|---|---|---|---|
--server |
-s |
Miloco 服务器地址 | 是 |
--password |
-p |
密码(也可通过 MILOCO_PASSWORD 环境变量设置) |
是 |
--username |
-u |
用户名,默认 admin | 否 |
--list |
-l |
列出所有摄像头 | 否 |
--camera-id |
-c |
摄像头设备ID (did) | 否* |
--output |
-o |
输出目录,默认当前目录 | 否 |
--filename |
-f |
自定义文件名(不含扩展名) | 否 |
--loop |
持续获取图片 | 否 | |
--interval |
-i |
循环间隔秒数,默认30 | 否 |
--cleanup |
自动清理过期图片 | 否 | |
--cleanup-days |
清理多少天前的图片,默认1 | 否 | |
--debug |
-d |
启用调试日志 | 否 |
\* 获取截图时必填
首次使用:
┌─────────────────┐
│ 1. 启动 Docker │
└────────┬────────┘
▼
┌─────────────────────────────────┐
│ 2. 引导用户访问 localhost:8001 │
│ 完成小米账号认证 + 设置密码 │
└────────┬────────────────┘
▼
┌─────────────────────────────────┐
│ 3. 等待用户确认完成 │
└────────┬────────────────┘
▼
┌─────────────────────────────────┐
│ 4. 尝试获取摄像头列表 │
└────────┬────────────────┘
▼
┌─────────────────────────────────┐
│ 5. 询问是否保存密码和摄像头信息 │
└────────┬────────────────┘
▼
┌─────────────────────────────────┐
│ 6. 完成,可随时获取截图 │
└─────────────────────────────────┘
后续使用:
┌─────────────────┐
│ 确认服务运行 │
└────────┬────────┘
▼
┌─────────────────┐
│ 直接获取截图 │
└─────────────────┘
日期did时分秒.jpgghcr.io/tiancheng91/miloco-backend:dev