← 返回
开发者工具 Key 中文

Openclaw Lifx

Control LIFX smart lights via natural language. Toggle, set colors/brightness, activate scenes, create gradients on multi-zone devices.
通过自然语言控制 LIFX 智能灯,可切换开关、调节颜色/亮度、激活场景,以及在多区域设备上创建渐变效果。
stillstellung stillstellung 来源
开发者工具 clawhub v1.0.1 1 版本 99919.2 Key: 需要
★ 0
Stars
📥 1,237
下载
💾 8
安装
1
版本
#latest

概述

LIFX Light Control

Control LIFX smart lights via the LIFX HTTP API through natural language.

References

  • lifx-api.sh — Bash wrapper for all LIFX API calls
  • scene-status.py — Scene matching and active detection
  • setup.sh — Device discovery and skill configuration

Configuration

Set your LIFX API token (get one at https://cloud.lifx.com/settings):

bash setup.sh <your-token>

This discovers your lights, groups, and scenes, then generates a personalized SKILL.md with your device context.

Device Context

> Run bash setup.sh to populate this section with your lights, rooms, and scenes.

> The setup script queries the LIFX API and rewrites this file with your personal device context.

Location: (not configured)

Rooms and Lights

(populated by setup.sh)

Scenes

(populated by setup.sh)

Multi-zone Devices

(populated by setup.sh)

How to Control Lights

Discover lights

bash lifx-api.sh discover

Shows all lights organized by room with power state, color, and brightness.

Toggle lights on/off

bash lifx-api.sh toggle <selector>

Selectors:

  • Individual light: id:
  • Group/room: group_id:
  • All lights: all

Set light state (color, brightness, power)

bash lifx-api.sh state <selector> '{"power":"on","color":"blue","brightness":0.75,"duration":1.0}'

Color formats:

  • Named: red, blue, green, white, warm white, purple, orange
  • Hex: #ff6b35
  • Kelvin: kelvin:2700 (warm) to kelvin:6500 (cool daylight)
  • HSB: hue:240 saturation:1.0

Always include "power":"on" and a brightness value when setting colors, or lights with brightness 0 will stay invisible.

Activate a scene

bash lifx-api.sh scene <scene_uuid>

Toggle a room

bash lifx-api.sh group-toggle <group_id>

Multi-zone gradients (Beam / Strip devices)

Multi-zone devices support individually addressable zones. Create gradients by setting different zone ranges:

bash lifx-api.sh state 'id:<light_id>|0-4' '{"power":"on","color":"purple","brightness":1.0,"duration":1.0}'
bash lifx-api.sh state 'id:<light_id>|5-9' '{"power":"on","color":"red","brightness":1.0,"duration":1.0}'

The pipe character in zone selectors is automatically URL-encoded by the script.

Check scene status

python3 scene-status.py all    # Show all active scenes
python3 scene-status.py check <uuid>  # Check specific scene

List current light states

bash lifx-api.sh list    # Full JSON
bash lifx-api.sh groups  # Summary by room

Behavior Guidelines

  • When user says a room name, match it to the group IDs in the device context above.
  • Default brightness to 1.0 (100%) when setting colors unless user specifies otherwise.
  • Default duration to 1.0 seconds for smooth transitions.
  • For "turn off" commands, use {"power":"off"} — don't toggle (toggling is ambiguous).
  • For "turn on" commands, use {"power":"on","brightness":1.0} to ensure visibility.
  • When asked about what's on/what scene is active, use the scene-status tool or discover command.
  • Be conversational about results: "Done, bedroom is now blue at 75%" not "API returned 207".

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 05:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。适用于以下场景:创建/查询实体(人物、项目、任务、事件、文档)、关联相关对象、强制执行约束、将多步操作规划为图谱变换,或当技能需要共享状态时。触发关键词包括"记住""我知道关于什么""将X链
★ 723 📥 245,249
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,088 📥 816,561
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,386 📥 321,171