yishan

HomeKit Smart Home Control

生活服务v1.0.6
作者:yishan更新于 2026-05-11共 3 个版本 · 最新版本发布于 2026-03-21homekit@clawhub_alphafactor/homekit
家庭助手#Smart Home

据 AlphaMoat 统计,截至 2026-09,HomeKit Smart Home Control 累计下载 3,337 次、获 5 个星标,在全部 5,078 个 AI 技能中排名第 3,388 位,在「生活服务」分类(246 个)中排名第 165 位。

累计安装
106
累计下载
3,337
星标
5
全站排名
#3,388
全站前 67% · 「生活服务」前 68%
平台累计安装累计下载星标评论
ClawHub ↗1063,33751
SkillHub ↗1063,3335—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文支持设备发现和配对、列出设备、查看状态,以及控制灯、开关、插座、风扇和恒温器。控制命令会直接改变真实家庭设备状态;应先确认目标别名和动作,在执行前由用户明确确认,尤其是恒温器或其他影响安全与财产的设备。配对 PIN 和本地配对信息也需妥善保护,不要让 PIN 留在命令历史中。

资料发布于 2026-10-29

可以用来做什么

  • 列出已配对的设备并查看状态
  • 在确认目标设备后控制灯光或开关
  • 检查新增配件的发现和配对流程

什么时候用

  • 用户明确希望通过 HomeKit 管理指定配件时
  • 目标设备别名和预期状态变化均已核对时
  • 配对 PIN 和本地设备数据能够安全保存时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

只列出设备状态,不执行控制命令
确认别名为指定的灯后,询问是否开启
说明配对前需要保护哪些 PIN 和本地数据

月度数据趋势

累计下载3,337
2,0222,7283,4342026-03 · 累计下载 2,1192026-05 · 累计下载 2,6682026-06 · 累计下载 2,8302026-07 · 累计下载 3,1032026-08 · 累计下载 3,2312026-09 · 累计下载 3,33726-0326-09
星标5
4562026-03 · 星标 52026-05 · 星标 52026-06 · 星标 52026-07 · 星标 52026-08 · 星标 52026-09 · 星标 526-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,337—5
2026-083,231+4.1%5
2026-073,103+9.6%5
2026-062,830+6.1%5
2026-052,668—5
2026-032,119—5

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.3 KB · ClawHub v1.0.6
---
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
展开全部(共 148 行)

- 🔍 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

「生活服务」分类下的热门技能

yishan 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。