Registry / http-networking / aiohomekit

aiohomekit

JSON →
library3.2.20pypypi✓ verified 51d ago

An asyncio-based HomeKit client library for Python. Version 3.2.20, actively maintained, with frequent releases following HomeKit protocol updates.

http-networkingcommunicationweb-framework
pip install aiohomekit
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Controller
from aiohomekit import Controller

Creates a Controller, starts discovery, prints discovered HomeKit accessories.

import asyncio from aiohomekit import Controller async def main(): controller = Controller() await controller.start() # Discover devices discoveries = await controller.discover() for dev in discoveries: print(dev.description) await controller.stop() asyncio.run(main())
Debug
Known issues
breakingIn version 3.0, the API was rewritten. The old `HomeKitController` class was removed; use `Controller` instead. The `pair` and `list_accessories` methods changed signature.
fix
Use `from aiohomekit import Controller` and consult the 3.0 migration guide.
affects: >=3.0.0
deprecatedThe `async def discover()` method returns a list of `DiscoverableDevice` objects instead of raw dicts as in older versions.
fix
Access attributes like `dev.description` directly.
affects: >=3.0.0
gotchaThe `Controller` must be started with `await controller.start()` before any discovery or pairing operations. Forgetting this results in no devices found.
fix
Always call `await controller.start()` in your async setup.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'HomeKitController' from 'aiohomekit'
Class renamed in v3.0.
fix
Use `from aiohomekit import Controller` instead.
AttributeError: module 'aiohomekit' has no attribute 'discover'
Discover is a method on Controller, not a top-level function.
fix
Create a Controller instance and call `await controller.discover()`.
Upgrade
Version history
3.2.20latest on PyPI
Audit
Dependencies
zeroconfrequiredRequired for mDNS discovery of HomeKit devices.
cryptographyrequiredRequired for HomeKit pairing and encryption.
Agent activity
90 hits · last 30 days
node
24
ahrefsbot
2
bingbot
1
amazonbot
1
Resources