pyhomebridge
1.0.0
Biblioteca de Python para controlar un servidor HomeBridge
Instale HomeBridge-Config-Ui-X en su HomeBridge.
Asegúrese de ejecutar HomeBridge en modo inseguro. (Esto se puede cambiar en la configuración web en la esquina superior derecha) El control de la API solo está permitido en este modo. Eso está comenzando a HomeBridge con la bandera -i.
Paquete PYPI para Pyhomebridge
pip3 install pyhomebridgeUso de Python:
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 ) En el repositorio puede encontrar un script de Python para usar para la ejecución de CLI. 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 Dispositivos compatibles actualmente:
Homervalía de Menahishayan
MIT
¡Software libre, demonios, sí!