Skip to main content

Python interface to control HomeKit accessories.

Project description


Henri Dwyer Latest Version Python Versions

PyHomeKit is a set of python libraries that let you control HomeKit compatible accessories, both BLE and HTTP.

For more information about HomeKit, see the Apple Developper HomeKit page.

Bluetooth Low Energy device compatibility is provided by bluepy, which uses bluez.

Getting Started


Connect to a HAP accessory view its HAP characteristics:

import pyhomekit

device_mac = "aa:aa:aa:aa:aa"
device = pyhomekit.ble.HapAccessory(mac=device_mac)
characteristics = device.discover_characteristics()


Interact with HAP characteristics:

# View the value of a characteristic
>>> 0

# Set the value of a characteristic


pyHomeKit is on Pypi, so you can pip install it:

pip install pyhomekit

If you want to install from source, clone the repository:

git clone git://
cd pyhomekit
pip install -r requirements.txt
pip install -e .

Then you can build the documentation:

make doc

And run the tests:

make tests


pyHomeKit is only compatible with python 3.6 for the moment.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhomekit- (9.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page