{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
Openhue
通过 OpenHue CLI 控制 Philips Hue 灯、场景、房间。
Skill 元数据
| 来源 | 可选——使用 hermes skills install official/smart-home/openhue 安装 |
| 路径 | optional-skills/smart-home/openhue |
| 版本 | 1.0.1 |
| 作者 | community |
| 许可证 | MIT |
| 平台 | linux, macos, windows |
| 标签 | Smart-Home, Hue, Lights, IoT, Automation |
参考:完整 SKILL.md
INFO
以下是 Hermes 在触发此 skill 时加载的完整 skill 定义。这是 skill 激活时 agent 所看到的指令内容。
OpenHue CLI
从终端通过 Hue Bridge 控制 Philips Hue 灯和场景。
前提条件
# Linux(预编译二进制——release 发的是 tarball,不是裸二进制)
curl -sL "https://github.com/openhue/openhue-cli/releases/latest/download/openhue_Linux_x86_64.tar.gz" \
| tar -xz -C ~/.hermes/cache/scratch openhue \
&& install -m 0755 ~/.hermes/cache/scratch/openhue ~/.local/bin/openhue
# (ARM64 上用 openhue_Linux_arm64.tar.gz)
# macOS
brew install openhue/cli/openhue-cli
首次运行需要按一下 Hue Bridge 上的按钮来配对。Bridge 必须在同一局域网。
使用时机
- "打开/关掉灯"
- "调暗客厅的灯"
- "设置一个场景"或"电影模式"
- 控制特定的 Hue 房间、 zone 或单个灯泡
- 调节亮度、颜色或色温
常用命令
列出资源
openhue get light # 列出所有灯
openhue get room # 列出所有房间
openhue get scene # 列出所有场景
控制灯
# 开/关
openhue set light "Bedroom Lamp" --on
openhue set light "Bedroom Lamp" --off
# 亮度(0-100)
openhue set light "Bedroom Lamp" --on --brightness 50
# 色温(暖到冷:153-500 mirek)
openhue set light "Bedroom Lamp" --on --temperature 300
# 颜色(按名称或 hex)
openhue set light "Bedroom Lamp" --on --color red
openhue set light "Bedroom Lamp" --on --rgb "#FF5500"
控制房间
# 关掉整个房间
openhue set room "Bedroom" --off
# 设置房间亮度
openhue set room "Bedroom" --on --brightness 30
场景
openhue set scene "Relax" --room "Bedroom"
openhue set scene "Concentrate" --room "Office"
快速预设
# 睡前(昏暗暖光)
openhue set room "Bedroom" --on --brightness 20 --temperature 450
# 工作模式(明亮冷光)
openhue set room "Office" --on --brightness 100 --temperature 250
# 电影模式(昏暗)
openhue set room "Living Room" --on --brightness 10
# 全关
openhue set room "Bedroom" --off
openhue set room "Office" --off
openhue set room "Living Room" --off
备注
- Bridge 必须与运行 Hermes 的机器在同一局域网
- 首次运行需要物理按一下 Hue Bridge 上的按钮来授权
- 颜色只在支持色彩的灯泡上生效(纯白型号不行)
- 灯和房间名称区分大小写——用
openhue get light查确切名称 - 配合 cron 任务做定时照明效果很好(例如睡前调暗、醒后调亮)