Homekit
@bixu/homekitv2026.04.24.1
01README
Discover, pair with, read sensors from, control, and list HomeKit accessories — pure TypeScript HAP protocol implementation
02Models
@bixu/homekitv2026.03.15.1homekit.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| discoveryTimeout | number | Seconds to wait for mDNS discovery (default: 10) |
fn discover(timeout?: number)
Discover HomeKit accessories on the local network via mDNS
| Argument | Type | Description |
|---|---|---|
| timeout? | number | Override discovery timeout in seconds |
fn pair(accessoryName: string, setupCode: string)
Pair with a HomeKit accessory using its setup code (from the accessory label or app)
| Argument | Type | Description |
|---|---|---|
| accessoryName | string | Name of a discovered accessory to pair with |
| setupCode | string | 8-digit setup code in XXX-XX-XXX format |
fn readSensors(accessoryName: string)
Read sensor data (temperature, humidity, etc.) from a paired accessory
| Argument | Type | Description |
|---|---|---|
| accessoryName | string | Name of a discovered accessory to read sensors from |
fn controlAccessory(accessoryName: string, characteristic: string, value: union, serviceName?: string)
Control a paired HomeKit accessory (toggle lights, lock/unlock, set temperature, etc.)
| Argument | Type | Description |
|---|---|---|
| accessoryName | string | Name of a discovered accessory to control |
| characteristic | string | Characteristic to set (e.g., On, Brightness, LockTargetState, TargetTemperature) |
| value | union | Value to set (e.g., true, 75, 0) |
| serviceName? | string | Service name to target (optional, for accessories with multiple services) |
fn listAccessories(accessoryName: string)
List all services and characteristics for a paired accessory
| Argument | Type | Description |
|---|---|---|
| accessoryName | string | Name of a discovered accessory to list |
Resources
discovery(infinite)— Discovered HomeKit accessories on the local network
accessory(infinite)— Individual HomeKit accessory
summary(infinite)— Summary of a discovery or sensor operation
pairing(infinite)— Stored pairing credentials for a HomeKit accessory
sensorReading(infinite)— Sensor reading from a paired HomeKit accessory
sensorSummary(infinite)— Summary of sensor readings
controlResult(infinite)— Result of a control operation on a HomeKit accessory
controlSummary(infinite)— Summary of a control operation
accessoryList(infinite)— Full service and characteristic listing for a paired accessory
accessoryListSummary(infinite)— Summary of a listAccessories operation
03Previous Versions
2026.04.23.1Apr 23, 2026
2026.03.15.1Mar 15, 2026
2026.03.14.3Mar 14, 2026
2026.03.14.2Mar 14, 2026
04Stats
A
100 / 100
Downloads
5
Archive size
97.6 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/bixu/swamp-homekit05Platforms
06Labels