Skip to main content

Python interface to control HomeKit accessories.

Project description

Author:

Henri Dwyer

https://api.travis-ci.org/henridwyer/pyhomekit.png 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

Usage

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()

print(characteristics)

Interact with HAP characteristics:

# View the value of a characteristic
device.lock_target_state()
>>> 0

# Set the value of a characteristic
device.lock_target_state(value=1)

Installation

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://github.com/henridwyer/pyhomekit.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

Requirements

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-0.0.1.4.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file pyhomekit-0.0.1.4.tar.gz.

File metadata

  • Download URL: pyhomekit-0.0.1.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyhomekit-0.0.1.4.tar.gz
Algorithm Hash digest
SHA256 f48873da19dca2c5fe0986d386ffa24c6dfd3a332cf2eae9379608798b5833a1
MD5 b75ab55011a0de1b55c2e84a09c64449
BLAKE2b-256 fd3a4d8b999ab64963c4e70e01c36c91ccd45860d771ef62a6ec31194d38838b

See more details on using hashes here.

Supported by

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