homekit
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when the user needs to manage HomeKit accessories programmatically. Requires homekit library and paired devices.
Best use case
homekit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when the user needs to manage HomeKit accessories programmatically. Requires homekit library and paired devices.
Teams using homekit should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/homekit/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How homekit Compares
| Feature / Agent | homekit | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when the user needs to manage HomeKit accessories programmatically. Requires homekit library and paired devices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# HomeKit 智能家居控制器
通过 Python 脚本控制苹果 HomeKit 智能家居设备。
## 功能特性
- 🔍 发现未配对设备
- 🔗 配对/取消配对设备
- 📱 列出所有已配对设备
- 💡 控制灯光开关和亮度
- 🔌 控制插座和开关
- 🌡️ 查看设备状态
## 前提条件
### 1. 安装依赖
```bash
pip3 install HAP-python homekit --user
```
### 2. 配对设备
首次使用前需要配对设备:
```bash
# 发现设备
python3 scripts/homekit.py discover
# 配对设备
python3 scripts/homekit.py pair "设备名称" "XXX-XX-XXX" "别名"
```
配对码通常在设备说明书或设备本体上(格式:XXX-XX-XXX)。
## 使用方法
### 列出所有设备
```bash
python3 scripts/homekit.py list
```
输出示例:
```
📱 找到 3 个设备:
Alias Name Type Status
----------------------------------------------------------------------
💡 living-light 客厅主灯 Lightbulb on (80%)
🔌 desk-outlet 桌面插座 Outlet off
💡 bedroom-lamp 床头灯 Lightbulb off
```
### 控制设备
**打开设备:**
```bash
python3 scripts/homekit.py on living-light
```
**关闭设备:**
```bash
python3 scripts/homekit.py off living-light
```
**调节亮度(0-100):**
```bash
python3 scripts/homekit.py brightness living-light 50
```
### 查看设备状态
```bash
python3 scripts/homekit.py status living-light
```
### 设备管理
**发现新设备:**
```bash
python3 scripts/homekit.py discover --timeout 10
```
**取消配对:**
```bash
python3 scripts/homekit.py unpair living-light
```
## 支持的设备类型
| 类型 | 支持操作 |
|------|---------|
| 💡 Lightbulb | 开关、亮度调节 |
| 🔌 Outlet | 开关 |
| 🔲 Switch | 开关 |
| 🌡️ Thermostat | 查看温度、设置目标温度 |
| 🌀 Fan | 开关、风速调节 |
## 常见问题
**错误:homekit 库未安装**
→ 运行: `pip3 install HAP-python homekit --user`
**错误:未找到设备**
→ 确保设备和电脑在同一 WiFi 网络
**错误:配对失败**
→ 检查配对码是否正确,设备是否处于配对模式
**设备显示离线**
→ 尝试重新配对或检查设备电源
## 高级用法
### 批量控制
```bash
# 关闭所有灯
for device in living-light bedroom-lamp kitchen-light; do
python3 scripts/homekit.py off $device
done
```
### 场景脚本示例
创建 `~/scripts/goodnight.sh`:
```bash
#!/bin/bash
# 晚安场景:关闭所有灯,保留床头灯微光
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 "晚安 😴"
```
## 参考
- HomeKit 官方文档: https://developer.apple.com/homekit/
- 库文档: https://github.com/jlusiardi/homekit_pythonRelated Skills
paylock
Non-custodial SOL escrow for AI agent deals.
agent-reputation
summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.
Telecom Agent Skill
Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.
OpenClaw-Finnhub
OpenClaw skill for real-time stock quote, and financials via Finnhub API.
```markdown
# OpenClaw-Last.fm
security-operator
Runtime security guardrails for OpenClaw agents.
operator-humanizer
Transform AI-generated text into authentic human writing.
kit-email-operator
**AI-powered email marketing for Kit (ConvertKit)**.
agora
Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.
surf-check
Surf forecast decision engine.
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.
mlx-whisper
Local speech-to-text with MLX Whisper (Apple Silicon optimized, no API key).