pyhomebridge
python library to control a Homebridge server
Setup
Install homebridge-config-ui-x on your HomeBridge.
Make sure you run HomeBridge in Insecure Mode. (This can be changed in the Web Settings at top right corner) API control is only allowed in this mode. Thats starting HomeBridge with the -I flag.
Installation
Pypi package for pyhomebridge
pip3 install pyhomebridge
Usage
Python usage:
from homebridge import HomeBridgeController
controller = HomeBridgeController(host="homebridge.local", port=80, auth="123-45-678")
print(controller.accessories)
controller.print_accessories()
controller.accessory_exists("light_hallway")
controller.get_value("light_hallway")
controller.set_value("light_hallway", True)
In the repo you can find a python script to use for CLI execution. control-homebridge.py
python3 control-homebridge.py --list
python3 control-homebridge.py --name light_hallway --off
# you will need to set url, port and code in the script
# or use the --server, --port, --auth options
Development
Currently supported devices:
- Lights
- Switches
- Outlets
TODO
- add timeouts
- support more device types
- write documentation
- write tests
- much much more
Inspiration
License
Free Software, Hell Yeah!
Metadata
Release files for pyhomebridge 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyhomebridge-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pyhomebridge-0.0.3-py3-none-any.whl |
Release files / pyhomebridge-0.0.3-py3-none-any.whl
| Download URL | pyhomebridge-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54985d56720a78608751d2aee47239057ab4df14ad6492948fd74dbf0920740e
|
|
BLAKE2b-256 checksum How to use checksums |
0882bdfdf4f1880ed23426cc7c2dbd0195dc34cfc6cc0509e06fef8a840a6b5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
|
Security for pyhomebridge 0.0.3
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.