技能详情(站内镜像,无评论)
作者:linyishan @AlphaFactor
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.6
统计:⭐ 4 · 1.7k · 4 current installs · 4 all-time installs
⭐ 4
安装量(当前) 4
🛡 VirusTotal :良性 · OpenClaw :良性
Package:alphafactor/homekit
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill's code, instructions, and requested actions align with a HomeKit controller: it discovers, pairs, and controls local HomeKit accessories and stores pairing info locally; nothing in the provided files indicates hidden exfiltration or unrelated credential access, but the script was truncated in the listing so full review is recommended.
目的
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.
说明范围
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) wh…
安装机制
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.
证书
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 aw…
持久
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.
综合结论
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/h…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「HomeKit Smart Home Control」。简介:Control Apple HomeKit smart home devices. Supports listing, discovering, pairin…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/alphafactor/homekit/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
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