{"id":42491796,"url":"https://github.com/trentrand/homekit-outlets","last_synced_at":"2026-01-28T12:22:18.630Z","repository":{"id":21874759,"uuid":"94299034","full_name":"trentrand/homekit-outlets","owner":"trentrand","description":"🔌  Self-contained HomeKit server for controlling wireless electrical outlets over radio frequency","archived":false,"fork":false,"pushed_at":"2023-01-12T12:25:24.000Z","size":2544,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T23:55:15.011Z","etag":null,"topics":["automation","homebridge","homekit","iot-device"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trentrand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-14T06:48:37.000Z","updated_at":"2021-11-28T21:20:08.000Z","dependencies_parsed_at":"2023-01-17T01:00:15.138Z","dependency_job_id":null,"html_url":"https://github.com/trentrand/homekit-outlets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trentrand/homekit-outlets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentrand%2Fhomekit-outlets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentrand%2Fhomekit-outlets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentrand%2Fhomekit-outlets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentrand%2Fhomekit-outlets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trentrand","download_url":"https://codeload.github.com/trentrand/homekit-outlets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentrand%2Fhomekit-outlets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","homebridge","homekit","iot-device"],"created_at":"2026-01-28T12:22:18.039Z","updated_at":"2026-01-28T12:22:18.624Z","avatar_url":"https://github.com/trentrand.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HomeKit Controlled Outlet Switches\n\u003e Self-contained HomeKit server for controlling wireless electrical outlets over radio frequency\n\u003cimg src=\"hardware.JPG\" width=\"500\"\u003e\n\n## E2E Installation Guide:\n1. Install the Raspbian operting system on your raspberry pi (username: pi / password: raspberry) and plugin an ethernet cord from your Raspberry Pi to your router.\n2. Update apt-get package manager by executing `sudo apt-get update`\n3. Install git using apt-get by executing `sudo apt-get install git`. Along the way, you may be prompted to type [Y/n]; in which case, simply press the 'Y' key.\n4. Install Node (Raspberry Pi 3 / armv6l version) by executing the following commands -\n```\nwget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-armv6l.tar.xz\ntar xJvf node-v6.9.5-linux-armv6l.tar.xz\nsudo mkdir -p /opt/node\nsudo mv node-v6.9.5-linux-armv6l/* /opt/node/\nsudo update-alternatives --install \"/usr/bin/node\" \"node\" \"/opt/node/bin/node\" 1\nsudo update-alternatives --install \"/usr/bin/npm\" \"npm\" \"/opt/node/bin/npm\" 1\n```\n5. Now that Node is installed, install homebridge by following the instructions listed on the following website, https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi\n\n6. Clone homekit-outlets to your raspberry pi with,\n\n`git clone http://github.com/trentrand/homekit-outlets.git`\n\n7. Install global dependencies\n\n```\nnpm run-script install-globals\nnpm install\ngit clone git://git.drogon.net/wiringPi\ncd ./wiringPi\nsudo su\n./build\n```\n\n8. Globally install the [homebridge-rf-outlet](https://github.com/trentrand/homebridge-rf-outlet) accessory plugin for Homebridge with,\n\n`sudo npm install -g homebridge-rf-outlet`\n\n9. Setup homekit-outlets to run on startup by following these steps on your homebridge server -\n\nAdd the following content to `homebridge` with,\n\n`sudo nano /etc/default/homebridge`\n\n```\n# Defaults / Configuration options for homebridge\n# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)\nHOMEBRIDGE_OPTS=-U /var/lib/homebridge\n\n# If you uncomment the following line, homebridge will log more\n# You can display this via systemd's journalctl: journalctl -f -u homebridge\n# DEBUG=*\n```\n\nAdd the following content to `homebridge.service` with,\n\n`sudo nano /etc/systemd/system/homebridge.service`\n\n```\n[Unit]\nDescription=Node.js HomeKit Server\nAfter=syslog.target network-online.target\n\n[Service]\nType=simple\nUser=homebridge\nEnvironmentFile=/etc/default/homebridge\n# Adapt this to your specific setup (could be /usr/bin/homebridge)\n# See comments below for more information\nExecStart=/usr/lib/node_modules/homebridge $HOMEBRIDGE_OPTS\nRestart=on-failure\nRestartSec=10\nKillMode=process\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen execute the following commands,\n```\nsudo useradd -M --system homebridge\nsudo mkdir /var/lib/homebridge\nsudo cp -r ~/.homebridge/persist /var/lib/homebridge/persist\nsudo chmod -R 0777 /var/lib/homebridge\nsudo systemctl daemon-reload\nsudo systemctl enable homebridge\nsudo systemctl start homebridge\n```\n\n## Setup your configuration file\n\nBefore homekit-outlets can work, you must register your wireless outlet on/off radio frequency codes.\n\nTo find out your outlet's on/off codes, make sure all outlets are paired to your controller, then follow the on-screen instructions presented to you after starting the pairing helper with\n\n  \u003e Web app coming soon\n\n## Run\n\nAfter completing the [Install](#install) dependency tasks, start your HomeKit server with\n\n`npm start`\n\nFollow the on-screen instructions to pair your iOS device with the HomeKit server.\n\nThis server must remain running for HomeKit to work. For this reason, we suggest serving it on a device like the Raspberry Pi 3.\n\n## Configuration\n\nAdd one accessory to your `config.json` per each individual power outlet you'd like to control.\n\n### Example config.json\n\n```json\n{\n  \"bridge\": {\n    \"name\": \"Outlet Bridge\",\n    \"username\": \"FC:10:A7:DD:90:B5\",\n    \"port\": 51826,\n    \"pin\": \"380-81-301\"\n  },\n  \"description\": \"Self-contained HomeKit server for controlling wireless electrical outlets over radio frequency\",\n  \"accessories\": [\n    {\n      \"accessory\": \"Outlet\",\n      \"name\": \"Bedroom Lamp\",\n      \"type\": \"Light\",\n      \"manufacturer\": \"Ikea\",\n      \"model\": \"SKEBY Lamp\",\n      \"serial\": \"\",\n      \"rf_on\": 4265267,\n      \"rf_off\": 4265276\n    }\n  ],\n  \"platforms\": []\n}\n\n```\n## Mounting Pi to filesystem\n```bash\nsudo mkdir ~/Server\nsshfs -o idmap=user pi@homebridge.local:/home/pi/developer ~/Server\n\n```\n\n## License\n\nCopyright 2017 by Trent Rand \u003ccontact@trentrand.com\u003e. Licensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrentrand%2Fhomekit-outlets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrentrand%2Fhomekit-outlets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrentrand%2Fhomekit-outlets/lists"}