HomeKit Smart Home Control
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when th...
Control Apple HomeKit smart home devices. Supports listing, discovering, pairing devices, and controlling lights, switches, outlets, thermostats. Use when th...
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Control Apple HomeKit smart home devices using Python scripts.
pip3 install HAP-python homekit --user
Pair your devices before first use:
# Discover devices python3 scripts/homekit.py discoverPair 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).
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
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
python3 scripts/homekit.py status living-light
Discover new devices:
python3 scripts/homekit.py discover --timeout 10
Unpair a device:
python3 scripts/homekit.py unpair living-light
| Type | Supported Operations |
|---|---|
| 💡 Lightbulb | On/Off, Brightness |
| 🔌 Outlet | On/Off |
| 🔲 Switch | On/Off |
| 🌡️ Thermostat | View temp, Set target temp |
| 🌀 Fan | On/Off, Speed |
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.
# Turn off all lights for device in living-light bedroom-lamp kitchen-light; do python3 scripts/homekit.py off $device done
Create
~/scripts/goodnight.sh:
#!/bin/bash # Goodnight Scene: Turn off all lights except a dim bedside lamppython3 ~/.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 😴"
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.