pyhomebridge
1.0.0
Biblioteca Python para controlar um servidor Homebridge
Instale o Homebridge-Config-Ui-X no seu Homebridge.
Certifique -se de executar o Homebridge no modo inseguro. (Isso pode ser alterado nas configurações da Web no canto superior direito) O controle da API é permitido apenas neste modo. Isso está começando a Homebridge com a bandeira -i.
Pacote Pypi para Pyhomebridge
pip3 install pyhomebridgeUso do 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 ) No repositório, você pode encontrar um script python para usar na execução da 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 atualmente suportados:
Homescript de Menahishayan
Mit
Software livre, inferno, sim!