aiohomekit
An asyncio HomeKit client
What it is and what it does
aiohomekit is an asyncio-based client library that implements the HomeKit Accessory Protocol (HAP) to communicate with and control HomeKit-compatible devices over IP networks. It handles the low-level protocol details including HAP session security, event subscriptions, and the quirks of real-world HomeKit device implementations—such as strict JSON formatting requirements, boolean encoding rules, and HTTP header sensitivity. The library is designed primarily for integration with Home Assistant's homekit_controller component and does not provide API stability guarantees outside that context.
The library uses hand-rolled HTTP code rather than high-level HTTP libraries to maintain byte-for-byte accuracy on the write path and support HomeKit's event model (responses without corresponding requests). It includes 11 runtime dependencies covering CoAP, Bluetooth Low Energy scanning, cryptography, async utilities, and JSON serialization. It does not support creating HomeKit accessories (server-side), only controlling them (client-side).
Use it for:
- Integrate HomeKit device control into Home Assistant or other home automation platforms via asyncio
- Build custom Python applications that discover and communicate with HomeKit accessories on local networks
- Subscribe to and handle real-time events from HomeKit devices like motion sensors or door locks
- Develop cross-platform (Linux, macOS, Windows) HomeKit clients that require async event handling
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An asyncio-based HomeKit client library for controlling HomeKit accessories over IP networks, implementing the HAP protocol with event support.
Yes, if you are building a Home Assistant integration or custom home automation application that needs to control HomeKit accessories. The library is actively maintained, has low install friction, and carries no known vulnerabilities. Be aware that API stability is not guaranteed outside Home Assistant's use case, and device compatibility depends on real-world HAP implementations rather than spec compliance alone.
Install
aiohomekit on PyPI
pip
pip install aiohomekituv
uv add aiohomekitpoetry
poetry add aiohomekitInstalling aiohomekit
Before you install
Low friction install with 11 runtime dependencies available as wheels. Actively maintained with a release on 2026-08-14 and recent commits. Targets current Python versions (3.10+).
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install aiohomekit
import asyncio
from aiohomekit.controller import Controller
async def main():
controller = Controller()
# Discover and control HomeKit accessories
asyncio.run(main())
Requires Python 3.10 or later. HomeKit accessories must be on the same local network and already paired with an Apple device or configured for HomeKit.
Verify before relying
- Whether the library's API stability guarantees have been established since the description notes they were pending at time of writing
- Current device compatibility matrix beyond the Phillips Hue and Eve Extend bridges mentioned as primary test targets
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — aiocoap, aiohappyeyeballs, async-interrupt, async-timeout, bleak, bleak-retry-connector, chacha20poly1305, chacha20poly1305-reuseable, cryptography, orjson, zeroconf |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,770/month — #11,575 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiohomekit-4.0.1-py3-none-any.whl
Keywords: HomeKit, home, automation
Tags
More Home Automation packages
Represents and manipulates IPv4, IPv6, MAC…
permissive · top 5,000 on PyPI
homeassistantHome Assistant is an open-source home…
permissive · top 5,000 on PyPI
python-statemachineDefines finite state machines and statecharts…
permissive · top 5,000 on PyPI
btsocketA Python library for controlling BlueZ…
permissive · top 15,000 on PyPI
aiohomematicAn async Python library for controlling and…
permissive · top 15,000 on PyPI
hass-web-proxy-libProvides base classes and utilities for Home…
permissive · top 15,000 on PyPI
aiohasupervisorAsynchronous Python client library for…
permissive · top 15,000 on PyPI
pyoverkizAn asynchronous Python client for the OverKiz…
permissive · top 15,000 on PyPI
ha-ffmpegProvides an asyncio-based Python interface to…
permissive · top 15,000 on PyPI
pymielepymiele is a Python library that enables Home…
permissive · top 15,000 on PyPI
plugwiseProvides Python interface to networked Plugwise…
permissive · top 15,000 on PyPI
async-upnp-clientAsync UPnP client library for discovering,…
permissive · top 15,000 on PyPI
infrared-protocolsDecodes and encodes infrared signals for use in…
permissive · top 15,000 on PyPI
openccu-loom-clientAsync Python REST and WebSocket client for the…
permissive · top 15,000 on PyPI
aioslimprotoAsync Python implementation of the SLIMProto…
permissive · top 15,000 on PyPI