PyHomeKit - HomeKit for Python
- Author:
Henri Dwyer
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.
Metadata
Release files for pyhomekit 0.0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyhomekit-0.0.1.4.tar.gz | 9.4 kB | Without provenance | Details for pyhomekit-0.0.1.4.tar.gz |
Release files / pyhomekit-0.0.1.4.tar.gz
| Download URL | pyhomekit-0.0.1.4.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f48873da19dca2c5fe0986d386ffa24c6dfd3a332cf2eae9379608798b5833a1
|
|
BLAKE2b-256 checksum How to use checksums |
fd3a4d8b999ab64963c4e70e01c36c91ccd45860d771ef62a6ec31194d38838b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyhomekit 0.0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.