Skip to main content

Control a homebridge server

Project description

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")
controller.print_accessories()
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

TODO

  • add timeouts
  • support more device types
  • write documentation
  • write tests
  • much much more

Inspiration

HomeScript by menahishayan

License

MIT

Free Software, Hell Yeah!

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyhomebridge-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pyhomebridge-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyhomebridge-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using 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.46.1 CPython/3.6.9

File hashes

Hashes for pyhomebridge-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eae9ef2b996a21f7ad656e94d685c0a71872c36ec6afd382f50241f13670281f
MD5 e5e3d250c8e4c3712dd415e05fb2c5b5
BLAKE2b-256 b86e0f8e697196c0a9a18f659794cdd927f45c525035c5005cd9ed221652747e

See more details on using hashes here.

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