HomeKit Smart Home Control
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when th...
yishan
@manifoldor
What This Skill Does
Python-based CLI to discover, pair, list, and control Apple HomeKit devices such as lights, outlets, switches, thermostats, and fans. Supports on/off, brightness, and status queries.
Replaces manually tapping through the Home app or writing separate HomeKit integrations by providing a scriptable command-line interface for all paired accessories.
When to Use It
- Turn on a specific light or outlet from a terminal or automation script
- Set the brightness of a lightbulb to a desired level
- List all paired HomeKit devices and their current status
- Discover and pair a new HomeKit accessory
- Unpair a device that is no longer needed
- Create a batch script to turn off multiple lights at once
Install
$ openclaw skills install @manifoldor/homekitHomeKit 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
pip3 install HAP-python homekit --user
2. Pair Devices
Pair your devices before first use:
# 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
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:
python3 scripts/homekit.py on living-light
Turn off:
python3 scripts/homekit.py off living-light
Set brightness (0-100):
python3 scripts/homekit.py brightness living-light 50
View Device Status
python3 scripts/homekit.py status living-light
Device Management
Discover new devices:
python3 scripts/homekit.py discover --timeout 10
Unpair a device:
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
# 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:
#!/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
Top skills in this category
Wechat Article Search
@wuchubuzai2018搜索微信公众号文章技能。通过微信搜索获取文章列表,覆盖科技/AI、社会热点、财经、教育、职场等各类中文资讯;可按关键词检索并返回标题、概要、发布时间、来源公众号与链接。当用户需要查找微信公众号文章、整理参考资料或快速获取文章信息时使用此技能。
Figma
@hith3shRead files, manage comments, extract design tokens, download images, and create webhooks in Figma via the Figma REST API. Use this skill when users want to i...
Social Media Scheduler
@1kalinPlan, draft, and organize social media content across platforms. Create content calendars, write platform-optimized posts, and maintain consistent posting schedules.
Alexa CLI
@buddyhControl Amazon Alexa devices and smart home via the `alexacli` CLI. Use when a user asks to speak/announce on Echo devices, control lights/thermostats/locks, send voice commands, or query Alexa.
Cinematic Script Writer
@praveenspeaksCreate professional cinematic scripts for AI video generation with character consistency and cinematography knowledge. Use when the user wants to write a cinematic script, create story contexts with characters, generate image prompts for AI video tools (Midjourney, Sora, Veo), or needs cinematography guidance (camera angles, lighting, color grading). Also use for character consistency sheets, voice profiles, anachronism detection, and saving scripts to Google Drive.