← 返回 Skills 市场
antgly

Control Ikea Lightbulb

作者 antgly · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
1765
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install control-ikea-lightbulb
功能描述
Control IKEA/TP-Link Kasa smart bulbs (set on/off, brightness, and color). Use when you want to programmatically control a local smart bulb by IP on the LAN.
使用说明 (SKILL.md)

control-ikea-lightbulb

This skill provides a lightweight Python script to control a local smart bulb (supports TP-Link Kasa-compatible bulbs via python-kasa). It is intended for local LAN devices that do not require cloud credentials; control is by IP address.

When to use this skill

  • When you want to turn a bulb on or off
  • When you want to set brightness (0-100)
  • When you want to set color (HSV)
  • When you have the bulb's local IP and it's accessible from this machine

Contents

  • scripts/control_kasa_light.py — main runnable script (Python 3.9+)
  • scripts/light_show.py — small light-show controller for sequences (uses python-kasa). Changes include:
    • Default white uses a high color temperature (9000K) to make white appear "whiter"; pass --white-temp to override.
    • Bug fixes: the off-flash between blue→red now ignores transitions to white (saturation==0) to avoid white\x3C->blue ping-pong, and white-temp is only applied to white steps (fixes red being skipped during off-flash). White steps also set brightness even without --double-write.
  • scripts/run_test_light_show.sh — helper to run light_show via uv

Notes

  • This repo is set up for uv (no manual environment activation). Dependencies live in pyproject.toml and wrappers prefer uv run. Example: uv run --project ./skills/control-ikea-lightbulb python ./skills/control-ikea-lightbulb/scripts/control_kasa_light.py --ip 192.168.4.69 --on --hsv 0 100 80 --brightness 80
  • Install uv:
    • brew install uv (macOS)
    • pipx install uv (cross-platform)
  • The provided wrapper script requires uv: ./skills/control-ikea-lightbulb/scripts/run_control_kasa.sh --ip 192.168.4.69 --on --hsv 0 100 80 --brightness 80
  • The test helper also prefers uv: ./skills/control-ikea-lightbulb/scripts/run_test_light_show.sh --ip 192.168.4.69 --duration 6 --transition 1 --off-flash --verbose
  • If your device is actually an IKEA TRADFRI device (not Kasa), this script is a starting point; tell me and I will add TRADFRI support.
  • No cloud credentials are required; control happens over LAN to the device's IP.

Quick start

  1. Install uv (macOS): brew install uv
  2. Turn the bulb on (replace the IP): ./skills/control-ikea-lightbulb/scripts/run_control_kasa.sh --ip 192.168.4.69 --on
  3. Set color and brightness: ./skills/control-ikea-lightbulb/scripts/run_control_kasa.sh --ip 192.168.4.69 --hsv 0 100 80 --brightness 80

Git note

  • No local environment artifacts are tracked; use uv.

Note about Python requirements and recent change

  • The skill previously declared python-kasa>=0.13.0 which caused dependency resolution failures on this machine. To make the skill runnable locally the project's pyproject.toml was adjusted to:
    • requires-python = ">=3.11, \x3C4.0"
    • python-kasa>=0.10.2
  • This allows the resolver to pick a compatible python-kasa on machines with Python 3.11+. If you prefer a different constraint (or want me to revert this change), tell me and I will update the pyproject.toml and README accordingly.
安全使用建议
This skill appears to do what it says: control a local Kasa-compatible bulb by IP. Before installing/run it: 1) verify you want the agent to be able to run local scripts (agent-autonomy may allow background invocation); 2) run the code only on a trusted LAN and only against devices you control (it will send commands to any IP you provide); 3) inspect the included Python files yourself (they are present and readable) and install python-kasa from PyPI in an isolated environment (uv/pipx as suggested); 4) if you want to restrict autonomy, disable autonomous invocation for this skill in your agent settings. If you need TRADFRI (IKEA cloud/tradfri protocol) support, request that explicitly — current code targets Kasa-style LAN control.
功能分析
Type: OpenClaw Skill Name: Developer: Version: Description: OpenClaw Agent Skill Suspicious High-Entropy/Eval files: 5 The skill bundle is designed to control local smart bulbs using the `python-kasa` library. All scripts (`control_kasa_light.py`, `light_show.py`, `light_show_verbose.py`) interact solely with a user-provided local IP address, as expected for LAN device control. The shell scripts (`run_control_kasa.sh`, `run_test_light_show.sh`) are simple wrappers to execute the Python scripts via `uv run`. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts in `SKILL.md`. The dependencies listed in `pyproject.toml` are appropriate for the stated purpose.
能力评估
Purpose & Capability
Name/description match the files and behavior: scripts use python-kasa to contact a device by IP on the LAN and implement on/off, brightness, color, and light-show features. No unrelated services, credentials, or binaries are requested.
Instruction Scope
SKILL.md instructs running local scripts (via uv or wrappers) with a bulb IP. The runtime code only interacts with the provided IP/device and does not read system files, environment secrets, or exfiltrate data to external endpoints.
Install Mechanism
No external download/install spec is included; dependencies are declared in pyproject.toml (python-kasa from PyPI). This is a standard, low-risk approach for a Python LAN device controller.
Credentials
The skill declares no environment variables, credentials, or config paths. The code does not access secrets or unrelated environment entries.
Persistence & Privilege
always is false (normal). The skill can be invoked autonomously by the agent (the platform default) — this is expected for skills but means the agent could call it without additional prompts; there are no other elevated privileges requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install control-ikea-lightbulb
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /control-ikea-lightbulb 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
**Switched to uv for dependency management and simplified setup.** - Removed the custom virtualenv bootstrap script; now uses uv and pyproject.toml for managing dependencies. - Added pyproject.toml with updated Python and python-kasa version constraints to address resolver issues. - Updated wrapper and helper scripts to use uv instead of manual virtualenv activation. - Updated documentation to reflect the new uv-based workflow, with quick start instructions. - Dropped mention of the old virtualenv in favor of uv; Git ignore advice simplified.
v1.0.0
- Initial release: Control IKEA/TP-Link Kasa smart bulbs over local LAN by IP address with Python scripts. - Supports on/off, brightness (0-100), and color (HSV) adjustments for compatible bulbs. - Includes light show script with updated white color handling and multiple bug fixes for color transitions. - Provides helper scripts for setting up and running a local Python virtual environment (no cloud credentials needed). - Offers clear instructions for using and customizing scripts, with support for extending to IKEA TRADFRI devices if needed.
元数据
Slug control-ikea-lightbulb
版本 1.0.1
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Control Ikea Lightbulb 是什么?

Control IKEA/TP-Link Kasa smart bulbs (set on/off, brightness, and color). Use when you want to programmatically control a local smart bulb by IP on the LAN. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1765 次。

如何安装 Control Ikea Lightbulb?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install control-ikea-lightbulb」即可一键安装,无需额外配置。

Control Ikea Lightbulb 是免费的吗?

是的,Control Ikea Lightbulb 完全免费(开源免费),可自由下载、安装和使用。

Control Ikea Lightbulb 支持哪些平台?

Control Ikea Lightbulb 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Control Ikea Lightbulb?

由 antgly(@antgly)开发并维护,当前版本 v1.0.1。

💬 留言讨论