据 AlphaMoat 统计,截至 2026-09,HomeKit Smart Home Control 累计下载 3,337 次、获 5 个星标,在全部 5,078 个 AI 技能中排名第 3,388 位,在「生活服务」分类(246 个)中排名第 165 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 106 | 3,337 | 5 | 1 |
| SkillHub ↗ | 106 | 3,333 | 5 | — |
各平台的计数口径不同,统计时间不一致。
主文支持设备发现和配对、列出设备、查看状态,以及控制灯、开关、插座、风扇和恒温器。控制命令会直接改变真实家庭设备状态;应先确认目标别名和动作,在执行前由用户明确确认,尤其是恒温器或其他影响安全与财产的设备。配对 PIN 和本地配对信息也需妥善保护,不要让 PIN 留在命令历史中。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 3,337 | — | 5 |
| 2026-08 | 3,231 | +4.1% | 5 |
| 2026-07 | 3,103 | +9.6% | 5 |
| 2026-06 | 2,830 | +6.1% | 5 |
| 2026-05 | 2,668 | — | 5 |
| 2026-03 | 2,119 | — | 5 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: homekit description: 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. --- # 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
```bash
pip3 install HAP-python homekit --user
```
### 2. Pair Devices
Pair your devices before first use:
```bash
# 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
```bash
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:**
```bash
python3 scripts/homekit.py on living-light
```
**Turn off:**
```bash
python3 scripts/homekit.py off living-light
```
**Set brightness (0-100):**
```bash
python3 scripts/homekit.py brightness living-light 50
```
### View Device Status
```bash
python3 scripts/homekit.py status living-light
```
### Device Management
**Discover new devices:**
```bash
python3 scripts/homekit.py discover --timeout 10
```
**Unpair a device:**
```bash
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
```bash
# 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`:
```bash
#!/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
- HomeKit Official Docs: https://developer.apple.com/homekit/
- Library Docs: https://github.com/jlusiardi/homekit_python
用 curl 直接向公共天气服务取当前天气与预报的技能。
在局域网里发现并控制 Sonos 音箱的命令行工具。
以六爻占卜方式作答的技能。
用本地 JSON 记录饮水量与睡眠的技能。
在本地同步并查询 CalDAV 日历的命令行技能。
在 macOS 上通过 remindctl 管理提醒事项的技能。
travel-cn 聚合去哪儿/携程/飞猪等中国旅行平台的数据查询,覆盖机票、酒店、火车票、景点门票与行程规划。
在终端里搜索与控制 Spotify 播放的技能。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。