网络唤醒 (WOL) 技能:远程电源管理 - Openclaw Skills
作者:互联网
2026-04-04
什么是 网络唤醒 (WOL) 技能?
网络唤醒 (WOL) 技能是集成到 Openclaw Skills 中的强大实用程序,使用户能够远程唤醒计算机和服务器。通过在局域网中发送幻数据包,它消除了物理操作电源按钮的需要。对于需要确保其基础设施按需可用的开发人员、系统管理员和家庭实验室爱好者来说,此技能特别有用。
该技能在构建时考虑了安全性和易用性,抽象了网络协议的复杂性。用户可以使用自然语言或命令行风格的命令与其交互,使其成为任何 Openclaw Skills 配置中的通用补充。它维护一个本地设备注册表,允许通过友好名称而不是繁琐的 MAC 地址进行快速访问。
下载入口:https://github.com/openclaw/skills/tree/main/skills/lroyia/wol
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install wol
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 wol。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
网络唤醒 (WOL) 技能 应用场景
- 在开始远程桌面会话之前开启远程工作站。
- 通过 Openclaw Skills 开启自托管的 NAS 或媒体服务器。
- 为家庭或办公网络管理 MAC 地址的集中目录。
- 在主机名或本地 DNS 不可用时,通过 IP 地址唤醒特定设备。
- 用户通过 Openclaw Skills 请求按名称或 IP 地址唤醒设备来触发该技能。
- 系统查询 devices.yaml 参考文件以检索给定名称对应的 MAC 地址。
- 如果直接提供 IP 地址,脚本会尝试通过网络协议或广播方法解析 MAC。
- 生成幻数据包并在端口 9 上向网络 (255.255.255.255) 广播。
- 目标设备的网络接口卡 (NIC) 检测到该数据包并向主板发出信号以启动引导序列。
网络唤醒 (WOL) 技能 配置指南
要开始在 Openclaw Skills 中使用 WOL 技能,请确保脚本在您的工作区中可用。您可以使用命令行界面添加您的第一个设备:
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --add-device
如需手动配置多个设备,请直接编辑参考文件:
nano ~/.openclaw/workspace/skills/wol/references/devices.yaml
网络唤醒 (WOL) 技能 数据架构与分类体系
该技能使用结构化的 YAML 格式管理设备数据。这允许 Openclaw Skills 维护持久的硬件注册表:
| 字段 | 描述 |
|---|---|
name |
设备的唯一标识符(例如:desktop, server) |
mac |
用于幻数据包的硬件 MAC 地址 |
ip |
设备的关联 IP 地址 |
subnet_mask |
用于网络广播的子网掩码 |
name: wol
description: Wake-on-LAN (WOL) skill to remotely wake computers and manage device configurations. Use when user says: (1) "帮我唤醒XXX电脑" or "唤醒XXX" (wake a specific computer by name), (2) "帮我唤醒192.168.x.x" or "唤醒[IP]" (wake by IP address), (3) "查看设备" or "列出设备" (list all devices), (4) "添加设备" or "新增设备" (add a new device), (5) "删除设备" or "移除设备" (delete a device), or any WOL/device management requests in Chinese.
Wake-on-LAN (WOL) Skill
Quick Start - Wake a Device
When user requests WOL wake, use the scripts/wol.py script:
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --target
can be: computer name (e.g.,desktop,workstation) or IP address (e.g.,192.168.50.230)
Device Management Commands
The skill now supports managing devices through conversation:
List all devices
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --list-devices
Add a new device (required: name, MAC, IP, subnet_mask)
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --add-device
Examples:
# Add device with all required fields
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --add-device desktop AA:BB:CC:DD:EE:FF 192.168.1.100 255.255.255.0
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --add-device laptop 11:22:33:44:55:66 192.168.1.101 255.255.255.0
Delete a device
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --delete-device
Show device details
python3 ~/.openclaw/workspace/skills/wol/scripts/wol.py --show-device
Configuration
Edit references/devices.yaml to manually map computer names to MAC addresses:
devices:
desktop:
mac: "AA:BB:CC:DD:EE:FF"
ip: "192.168.1.100"
workstation:
mac: "11:22:33:44:55:66"
ip: "192.168.50.230"
living-room-pc:
mac: "FF:EE:DD:CC:BB:AA"
ip: "192.168.1.50"
How It Works
-
Waking:
- If target is an IP address → use it to look up MAC via ARP, or broadcast to all interfaces
- If target is a name → lookup MAC from
devices.yaml - Send magic packet to broadcast address (255.255.255.255) on port 9
-
Device Management:
--add-devicevalidates MAC address format before saving--delete-deviceperforms case-insensitive name matching- Devices are stored in
references/devices.yaml
Conversation Examples
| User Request | Action |
|---|---|
| "唤醒desktop" | wol.py --target desktop |
| "唤醒192.168.1.100" | wol.py --target 192.168.1.100 |
| "wake up desktop" | wol.py --target desktop |
| "wake up 192.168.1.100" | wol.py --target 192.168.1.100 |
| "查看所有设备" | wol.py --list-devices |
| "添加新设备,名字叫server,MAC是AA:BB:CC:DD:EE:FF" | wol.py --add-device server AA:BB:CC:DD:EE:FF |
| "添加设备,workstation,MAC 11:22:33:44:55:66,IP 192.168.50.230" | wol.py --add-device workstation 11:22:33:44:55:66 192.168.50.230 |
| "删除desktop设备" | wol.py --delete-device desktop |
Notes
- MAC addresses accept various formats:
AA:BB:CC:DD:EE:FF,AA-BB-CC-DD-EE-FF,AA.BB.CC.DD.EE.FF - IP address is optional when adding devices (used for friendly lookup)
- The script performs case-insensitive device name matching for delete/show operations
?? Security Guidelines
IMPORTANT: Follow these rules to protect device privacy:
-
MAC Address Display: When displaying device information (list/show commands), MAC addresses are automatically masked. Only the first and last segments are visible (e.g.,
EC:***:6C). Never reveal full MAC addresses through conversation. -
Configuration File Access: Do NOT read or show the contents of
references/devices.yamlto users. This file contains sensitive MAC addresses. The script handles all operations internally. -
Conversation Restrictions:
- Never tell the user the full MAC address of any device, even if asked
- If asked to show MAC address, respond that MAC addresses are hidden for security
- Do not read the YAML configuration file directly in conversation
- Operations like wake/add/delete can be performed without revealing MAC addresses
-
User Instructions: If users need to manage MAC addresses, instruct them to use the CLI commands directly rather than requesting the AI to read configuration files.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
移民与签证合规代理:美国雇佣法 - Openclaw Skills
六壬:传统中式农历占卜工具 - Openclaw Skills
Google Play 商店:Android 应用优化与发布 - Openclaw Skills
巴塞罗那指南:旅游、移居与技术洞察 - Openclaw Skills
RunPod CLI:管理 GPU 容器与 Serverless - Openclaw Skills
三层记忆管理器:高级 AI 智能体记忆系统 - Openclaw 技能
YouTube 灵感提取器:将视频转化为创业洞察 - Openclaw Skills
小红书自动发布:自动化小红书内容 - Openclaw Skills
富途 API:实时股市行情与技术分析 - Openclaw Skills
Nutrient 文档处理:转换、OCR 与脱敏 - Openclaw Skills
AI精选
