← 返回 Skills 市场
manifoldor

HomeKit Smart Home Control

作者 manifold · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ✓ 安全检测通过
2227
总下载
5
收藏
4
当前安装
3
版本数
在 OpenClaw 中安装
/install homekit
功能描述
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when th...
使用说明 (SKILL.md)

HomeKit Smart Home Controller

Control Apple HomeKit smart home devices using Python scripts.

Features

  • 🔍 Discover unpaired devices
  • 🔗 Pair/Unpair devices
  • 📱 List all paired devices
  • 💡 Control light switches and brightness
  • 🔌 Control outlets and switches
  • 🌡️ View device status

Prerequisites

1. Install Dependencies

pip3 install HAP-python homekit --user

2. Pair Devices

Pair your devices before first use:

# Discover devices
python3 scripts/homekit.py discover

# Pair a device
python3 scripts/homekit.py pair "Device Name" "XXX-XX-XXX" "alias"

The pairing code is usually found in the device manual or on the device itself (format: XXX-XX-XXX).

Usage

List All Devices

python3 scripts/homekit.py list

Example output:

📱 Found 3 devices:

Alias           Name                      Type            Status
----------------------------------------------------------------------
💡 living-light  Living Room Light         Lightbulb       on (80%)
🔌 desk-outlet   Desk Outlet               Outlet          off
💡 bedroom-lamp  Bedside Lamp              Lightbulb       off

Control Devices

Turn on:

python3 scripts/homekit.py on living-light

Turn off:

python3 scripts/homekit.py off living-light

Set brightness (0-100):

python3 scripts/homekit.py brightness living-light 50

View Device Status

python3 scripts/homekit.py status living-light

Device Management

Discover new devices:

python3 scripts/homekit.py discover --timeout 10

Unpair a device:

python3 scripts/homekit.py unpair living-light

Supported Device Types

Type Supported Operations
💡 Lightbulb On/Off, Brightness
🔌 Outlet On/Off
🔲 Switch On/Off
🌡️ Thermostat View temp, Set target temp
🌀 Fan On/Off, Speed

Troubleshooting

Error: homekit library not installed → Run: pip3 install HAP-python homekit --user

Error: Device not found → Ensure the device and computer are on the same WiFi network.

Error: Pairing failed → Check if the pairing code is correct and the device is in pairing mode.

Device shows offline → Try re-pairing or check device power.

Advanced Usage

Batch Control

# Turn off all lights
for device in living-light bedroom-lamp kitchen-light; do
    python3 scripts/homekit.py off $device
done

Scene Script Example

Create ~/scripts/goodnight.sh:

#!/bin/bash
# Goodnight Scene: Turn off all lights except a dim bedside lamp

python3 ~/.openclaw/workspace/homekit/scripts/homekit.py off living-light
python3 ~/.openclaw/workspace/homekit/scripts/homekit.py off kitchen-light
python3 ~/.openclaw/workspace/homekit/scripts/homekit.py brightness bedroom-lamp 10

echo "Goodnight 😴"

References

安全使用建议
This skill appears to do what it says: discover, pair, and control HomeKit devices on your local network. Before installing, consider: 1) Review the entire scripts/homekit.py file (the provided listing was truncated) to confirm there's no unexpected network calls or telemetry. 2) Install dependencies from trusted sources (pip from PyPI) and consider using a virtualenv. 3) Be aware pairing data (control credentials) will be saved to ~/.config/homekit/pairings.json — treat this file as sensitive and restrict its permissions. 4) If you prefer extra isolation, run the tool on a dedicated machine or VM on the same LAN. 5) If you rely on agents/autonomous invocation, note the skill can be invoked automatically by the agent (default); only enable that if you trust the skill and its source.
功能分析
Type: OpenClaw Skill Name: homekit Version: 1.0.6 The homekit skill bundle provides standard functionality for managing Apple HomeKit devices using the legitimate 'homekit_python' library. The core script (scripts/homekit.py) implements device discovery, pairing, and control via mDNS and local network communication, storing pairing data locally in the user's config directory as expected. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name and description match the included Python script and README: the skill uses the homekit / HAP-python libraries to discover, pair, list, and control HomeKit accessories on the local network. There are no unrelated credentials, binaries, or cloud services requested.
Instruction Scope
SKILL.md and scripts instruct only local network operations (mDNS/Bonjour discovery, pairing, characteristic writes) and recommend installing HAP-python/homekit. The script reads an optional env var HOMEKIT_DEFAULT_HOME and writes pairings to ~/.config/homekit/pairings.json — both are within scope but the env var is not declared in requires.env. The SKILL.md contains example scene scripts that reference an agent workspace path (~/.openclaw) which is a usability detail but not a secret-exfiltration vector by itself.
Install Mechanism
No install spec is embedded; SKILL.md recommends installing HAP-python and homekit via pip from PyPI (pip3 install HAP-python homekit). This is a standard mechanism for Python libraries and proportionate to the skill's function. No downloads from unknown URLs or archive extraction are present.
Credentials
The skill declares no required environment variables or secrets, which matches expected usage. The code does read HOMEKIT_DEFAULT_HOME from the environment (optional) but that variable is not documented in SKILL.md. The script stores pairing data (sensitive control credentials for HomeKit devices) in ~/.config/homekit/pairings.json — storing these secrets locally is expected for a HomeKit controller but is a sensitive action users should be aware of.
Persistence & Privilege
always:false and the skill is user-invocable and allowed to run autonomously (default). The script persistently writes pairing state to the user's config directory (~/.config/homekit), which is necessary for functionality but means the skill will keep sensitive device credentials on disk. The skill does not request system-wide or other-skills configuration changes in the provided files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install homekit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /homekit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
- Updated documentation with an English version of the HomeKit smart home control guide. - All user instructions, usage examples, troubleshooting, and advanced scripting guidance are now in English. - No functional or code changes; documentation only.
v1.0.5
Initial release of HomeKit smart home control skill. - Control Apple HomeKit devices: list, discover, pair/unpair, and operate accessories. - Supports lights (on/off, brightness), switches, outlets, and thermostats. - Requires the homekit library and prior device pairing. - Includes command-line scripts and usage examples for managing devices.
v1.0.0
Initial release—control Apple HomeKit smart home devices via Python scripts. - Discover, pair/unpair, and list HomeKit devices. - Control lights (power, brightness), outlets, switches, and thermostats. - View device status and automate actions with CLI commands. - Requires HAP-python and homekit libraries plus paired HomeKit accessories. - Extensive usage instructions and troubleshooting tips included.
元数据
Slug homekit
版本 1.0.6
许可证 MIT-0
累计安装 4
当前安装数 4
历史版本数 3
常见问题

HomeKit Smart Home Control 是什么?

Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when th... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2227 次。

如何安装 HomeKit Smart Home Control?

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

HomeKit Smart Home Control 是免费的吗?

是的,HomeKit Smart Home Control 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

HomeKit Smart Home Control 支持哪些平台?

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

谁开发了 HomeKit Smart Home Control?

由 manifold(@manifoldor)开发并维护,当前版本 v1.0.6。

💬 留言讨论