Skip to content
Back to skills

Homekit

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
businesspythongobashgit

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned May 30, 2026

npx -y skills add GeorgeDoors888/GB-Power-Market-JJ --skill homekit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Homekit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Homekit
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/georgedoors888-homekit/badge)](https://www.skillsdirectory.com/skills/georgedoors888-homekit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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

Files in this skill

  • SKILL.md3.3 KB
  • _meta.json468 B
  • references/api.md2.1 KB
  • scripts/homekit.py11.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.