{"id":22494776,"url":"https://github.com/dmowcomber/usb-smart-switch","last_synced_at":"2025-07-05T03:09:52.062Z","repository":{"id":190748154,"uuid":"683282030","full_name":"dmowcomber/usb-smart-switch","owner":"dmowcomber","description":"A HomeKit compatible USB smart switch","archived":false,"fork":false,"pushed_at":"2023-08-26T14:07:37.000Z","size":2331,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T21:13:49.382Z","etag":null,"topics":["go","homekit","uhubctl","usb"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dmowcomber.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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-26T04:29:12.000Z","updated_at":"2025-03-09T13:18:11.000Z","dependencies_parsed_at":"2024-06-21T17:46:03.564Z","dependency_job_id":"fb58205f-d36d-4e43-b1cc-0572d58f983b","html_url":"https://github.com/dmowcomber/usb-smart-switch","commit_stats":null,"previous_names":["dmowcomber/usb-smart-switch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmowcomber/usb-smart-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fusb-smart-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fusb-smart-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fusb-smart-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fusb-smart-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmowcomber","download_url":"https://codeload.github.com/dmowcomber/usb-smart-switch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmowcomber%2Fusb-smart-switch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263674489,"owners_count":23494584,"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":["go","homekit","uhubctl","usb"],"created_at":"2024-12-06T19:17:24.947Z","updated_at":"2025-07-05T03:09:52.034Z","avatar_url":"https://github.com/dmowcomber.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# usb-smart-switch\nAllows you to control usb power through a HomeKit device using the [uhubctl](https://github.com/mvp/uhubctl) command and the [hc](https://github.com/brutella/hc) library.\nThis has only been tested on the Raspberry Pi with Raspberry Pi OS Buster.\n\n## WARNING\nThe method used to turn off a USB device is a bit heavy handed as it turns off all USB ports and should be used in a headless Raspberry Pi setup where you don't depend a USB keyboard, mouse, or and other USB device.\n\n## Dependencies\n`uhubctl` is required and can be installed on debian based distros with apt:\n```\nsudo apt install -y uhubctl\n```\n\n## Run\nThe `uhubctl` command requires root access so you can build and run with the following command:\n```\ngo build .\nsudo ./usb-smart-switch\n```\n\n## Run at boot\nOne way to run this command at boot is to add the following to /etc/rc.local:\n```\nusbSmartSwitchDir={path_to_usb-smart-switch}\ncd ${usbSmartSwitchDir}\n${usbSmartSwitchDir}/usb-smart-switch \u0026\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmowcomber%2Fusb-smart-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmowcomber%2Fusb-smart-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmowcomber%2Fusb-smart-switch/lists"}