![]() ![]() Rewritten from the ground up to be object oriented.HS Automations and HS Apps are now deprecated.Added support for Increment/Decrement values.☑️ Automation creation, viewing and monitoring without Home Hub ☑️ Querying API interface to return status of devices to stdout ⬜️ Control for PositionOpeners, GarageDoorOpener, LockMechanism Notes: (heads ups/pointers to other developers if necessary).Description: Brief description about what the commit achieves.PRs and commits that you make to this repo must include the following: A simple debug log can be obtained from hs.py -d -l You must attach your debug log or else your issue will be closed. ![]() If you would like to help improve the tool or request features, open an issue prefixed by describing the functionality.If you face an error, open a new issue on this repo prefixed by describing the error and attach your both your debug log and your exception log, along with any other outputs you receive.The debug option helps generate a logfile for troubleshooting and error detection. Troubleshooting/Error Reporting/Contributing Attrubute: Brightness/Hue/Saturation/Color Temperature Sets numeric value to attribute of the item(s) in selectedAccessories. If no argument is specified it toggles the state of all selectedAccessories Sets state as the on/off value of all item(s) in selectedAccessories. Prints all available accessories on the Bridge Saves all matching accessories into selectedAccessories and returns them Saves matching accessory into selectedAccessories and returns them Returns raw list of all available accessories on the Bridge Debug: Set to True if you want to create debug and exception logfile. HomeScript( hostname: str, port: str, auth: str, debug: Boolean, argv: list )Ĭonstructor to initialize HomeBridge Connection. Any get/set/print operation requires accessories to be selected first. # Select an accessory or group of accessories. Debug and sys.argv are optional hs = homescript. Import homescript # Initialize with hostname, port and auth code. -v, -version : prints HomeScript versionĪs of v5.1+ HomeScript is now a fully importable API.-d, -debug : generates debug log file.all : Gets or sets value of multiple HomeKit accessories.-t : adjusts accessory color temperature.-s, -set : toggles the accessory On or Off, or sets to the specified value.-g, -get : gets current value of accessory. ![]() value : lists accessory names current state.id : lists accessory names with AID and IID.iid : lists accessory names with IID value.aid : lists accessory names with AID value.-l, -list : Lists all available HomeKit accessories.Change permissions chmod +x /path/to/hs.py (on linux).Edit the script to include your homebridge URL, port and authorization key.On your client computer: Download hs.py and move it to a convenient location.Install the HomeScript API pip install homescript or pip3 install homescript.Pm2 stop homebridge pm2 delete homebridge pm2 start homebridge -I Important: HomeBridge must be run in insecure mode for this script to work! Running HomeBridge in Insecure Mode Looking for maintainers: If you are interested in maintaining this project, feel free to reach out. You can set multiple accessories (of the same type) in a single command: The script will automatically search for matching substrings and set the accessory value Group Actions The script doesn't require full names of the accessories.įor example, if your light is called "MainLight", you can run: Hs.py -s desk -b +10 | Increment/Decrement values Easy Match ![]() Hs.py -s lifx -hue 140 | RGB Lights Support (brightness, hue, saturation, temperature) Note: as of HomeScript 4.1 the minimum requirement is Python3+ and HomeBridge 1.x.x+ Examples You can set up a cronjob to enable automation, scripting and mimic other HomeKit functionalities Used to toggle Homebridge accessories On or Off via python script, no Home app required. Python script for command line control of HomeBridge (HomeKit) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |