pyhomebridge
1.0.0
Python庫控制Homebridge服務器
在主橋上安裝Homebridge-Config-Ui-X。
確保您以不安全模式運行主橋。 (可以在右上角的Web設置中進行更改)API控件僅在此模式下才允許。多數民眾贊成在帶有-i國旗開始主頁。
Pyhomebridge的PYPI包裝
pip3 install pyhomebridgePython用法:
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 )在存儲庫中,您可以找到用於CLI執行的Python腳本。 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 當前支持的設備:
Menahishayan的本文
麻省理工學院
免費軟件,地獄!