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
累計下載
3337
星標
5
全站排名
#3,388
全站前 67% · 「生活服務」前 68%
平台累計安裝累計下載星標評論
ClawHub ↗106333751
SkillHub ↗10633335—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文支援裝置發現和配對、列出裝置、檢視狀態,以及控制燈、開關、插座、風扇和恆溫器。控制命令會直接改變真實家庭裝置狀態;應先確認目標別名和動作,在執行前由使用者明確確認,尤其是恆溫器或其他影響安全與財產的裝置。配對 PIN 和本地配對資訊也需妥善保護,不要讓 PIN 留在命令歷史中。

資料釋出於 2026-10-29

可以用來做什麼

  • 列出已配對的裝置並檢視狀態
  • 在確認目標裝置後控制燈光或開關
  • 檢查新增配件的發現和配對流程

什麼時候用

  • 使用者明確希望透過 HomeKit 管理指定配件時
  • 目標裝置別名和預期狀態變化均已核對時
  • 配對 PIN 和本地裝置資料能夠安全儲存時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

只列出裝置狀態,不執行控制命令
確認別名為指定的燈後,詢問是否開啟
說明配對前需要保護哪些 PIN 和本地資料

月度資料趨勢

累計下載3337
2022272834342026-03 · 累計下載 21192026-05 · 累計下載 26682026-06 · 累計下載 28302026-07 · 累計下載 31032026-08 · 累計下載 32312026-09 · 累計下載 333726-0326-09
星標5
4562026-03 · 星標 52026-05 · 星標 52026-06 · 星標 52026-07 · 星標 52026-08 · 星標 52026-09 · 星標 526-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093337—5
2026-083231+4.1%5
2026-073103+9.6%5
2026-062830+6.1%5
2026-052668—5
2026-032119—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),按月更新。口徑說明見資料方法。