pyhomebridge
1.0.0
ไลบรารี Python เพื่อควบคุมเซิร์ฟเวอร์ Homebridge
ติดตั้ง Homebridge-Config-UI-X บน Homebridge ของคุณ
ตรวจสอบให้แน่ใจว่าคุณเรียกใช้ Homebridge ในโหมดไม่ปลอดภัย (สามารถเปลี่ยนแปลงได้ในการตั้งค่าเว็บที่มุมขวาบน) การควบคุม API นั้นอนุญาตให้ใช้ในโหมดนี้เท่านั้น นั่นคือการเริ่มต้น Homebridge ด้วยธง -i
แพ็คเกจ PYPI สำหรับ pyhomebridge
pip3 install pyhomebridgeการใช้ 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 ) ใน repo คุณสามารถค้นหาสคริปต์ Python เพื่อใช้สำหรับการดำเนินการ 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 อุปกรณ์ที่รองรับในปัจจุบัน:
Homescript โดย Menahishayan
มิกซ์
ซอฟต์แวร์ฟรีนรกใช่!