{"id":22066036,"url":"https://github.com/adyanth/homebridge-plugin-command","last_synced_at":"2025-05-13T02:05:02.995Z","repository":{"id":65281293,"uuid":"588765943","full_name":"adyanth/homebridge-plugin-command","owner":"adyanth","description":"This Homebridge plugin enables you to create virtual switches that can run any custom command when it is turned on or off.","archived":false,"fork":false,"pushed_at":"2024-11-14T07:21:19.000Z","size":25,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-24T17:43:10.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adyanth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-14T00:04:03.000Z","updated_at":"2024-05-29T13:21:36.000Z","dependencies_parsed_at":"2024-04-13T18:52:38.506Z","dependency_job_id":"fcc27517-c9b4-4da6-b4b8-70c425e540f3","html_url":"https://github.com/adyanth/homebridge-plugin-command","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"45de39da9d4c1291776d682a59c9c89775c26777"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adyanth%2Fhomebridge-plugin-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adyanth%2Fhomebridge-plugin-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adyanth%2Fhomebridge-plugin-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adyanth%2Fhomebridge-plugin-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adyanth","download_url":"https://codeload.github.com/adyanth/homebridge-plugin-command/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227406701,"owners_count":17774326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T19:23:18.442Z","updated_at":"2024-11-30T19:23:19.039Z","avatar_url":"https://github.com/adyanth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homebridge-plugin-command\r\n\r\nThis Homebridge plugin enables you to create virtual switches that can run any custom command when it is turned on or off.\r\n\r\n## How to use\r\n\r\nUnder Plugins \u003e Homebridge Plugin Command \u003e Settings, add an accessory and fill in the form!\r\n\r\nBy default, `check_status` assumes turned on if the exit code of the command is 0. Set `invert_status` to true to flip it.\r\n`check_status` command is optional, and if not provided, it just alternates as you turn it on and off. You can enable polling the check status and automatically pushing the change by setting the `poll_check` to number of seconds or in this format `1d2h3m4s`.\r\n\r\nIf you like a JSON config, see the sample below.\r\n\r\n```json\r\n{\r\n  \"accessory\": \"Command Accessory\",\r\n  \"name\": \"File switch\",\r\n  \"turn_on\": \"touch /tmp/testFile\",\r\n  \"turn_off\": \"rm /tmp/testFile\",\r\n  \"check_status\": \"ls /tmp/testFile\",\r\n  \"poll_check\": \"5\",\r\n  \"invert_status\": false\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyanth%2Fhomebridge-plugin-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadyanth%2Fhomebridge-plugin-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyanth%2Fhomebridge-plugin-command/lists"}