{"id":15138216,"url":"https://github.com/slad3/remoterelayrust","last_synced_at":"2026-01-19T06:01:41.986Z","repository":{"id":250974798,"uuid":"735289320","full_name":"Slad3/RemoteRelayRust","owner":"Slad3","description":"Remote Relay is an http server that allows a user to control their in-home smartplugs (and other forms of relays with a boolean state) externally from the respective smartplug's ecosystem. Rebuilt in Rust.","archived":false,"fork":false,"pushed_at":"2025-05-05T23:30:01.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T23:31:52.238Z","etag":null,"topics":["rocket","rust","smarthome-api"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Slad3.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,"zenodo":null}},"created_at":"2023-12-24T11:18:50.000Z","updated_at":"2025-05-05T23:26:04.000Z","dependencies_parsed_at":"2024-07-31T04:58:03.745Z","dependency_job_id":"2b75de9d-0679-46f2-8036-f377fdaca310","html_url":"https://github.com/Slad3/RemoteRelayRust","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"8874798c05fa59dd26cfe19fcb7ad3a254de2b36"},"previous_names":["slad3/remoterelayrust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Slad3/RemoteRelayRust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slad3%2FRemoteRelayRust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slad3%2FRemoteRelayRust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slad3%2FRemoteRelayRust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slad3%2FRemoteRelayRust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Slad3","download_url":"https://codeload.github.com/Slad3/RemoteRelayRust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slad3%2FRemoteRelayRust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["rocket","rust","smarthome-api"],"created_at":"2024-09-26T07:21:12.325Z","updated_at":"2026-01-19T06:01:41.971Z","avatar_url":"https://github.com/Slad3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote Relay (Rust)\n\nOriginally coded in Python, Remote Relay is an http server interface that allows a user to control their in home smartplugs (and other forms of relays with a boolean state) externally from the respective smartplug's ecosystem.\n\n\n## Getting Started\n\nOnly Rust is required to build and run from source.  \n\n```bash\ncargo build --release\ncargo run --color=always\n```\n\n\n## Config and Config Options\n\nCurrently, you can set your configuration via local file in `config.json` or through a MongoDB database through a `.env` file. Application defaults to local config.\n\n### Local Configuration\n\nAll local configuration is stored in `config.json` at root level of project directory.\n\nAn example configuration will look like this:\n```json5\n{\n  \"relays\": [\n    // TPLink Kasa Plug example relay configuration\n    {\n      \"type\": \"KasaPlug\",                                   // Type of relay, case-sensitive, required for configuration loader to differentiate\n      \"name\": \"Sample Name\",                                // Name of relay, use normal string restrictions\n      \"ip\": \"\u003cip address of relay\u003e\",                        // IPv4 address of relay. Can get this from router devices\n      \"room\": \"bedroom\"                                     // Optional room location of relay\n    },\n    {\n      \"type\": \"KasaMultiPlug\",                              // Type of relay, case-sensitive, required for configuration loader to differentiate\n      \"names\": [\"Sample Name 1\", \"Sample Name 2\"],          // Names of relays, length must match exactly with number of relays on device\n      \"ip\": \"\u003cip address of relay\u003e\",                        // IPv4 address of relay. Can get this from router devices\n      \"room\": \"bedroom\"                                     // Optional room location of relay\n    }\n  ],\n  \"presets\": [\n    {\n      \"name\": \"Bedroom on\",       // Name of relay, use normal string restrictions\n      \"enabled\": true,            // For UI use, keeps the ability to store many different configurations without sending them all to a frontend\n      \"relays\": {                     \n        \"Sample Name\": true\n      }\n    }\n  ]\n}\n```\n\nAs of this current version, by default presets will turn off every relay not explicitly stated to be turned on (set to `true`) in the preset config. Future efforts will be made toward an `explicit` boolean option per presets to let the user define if they want that preset to explicitly control all relays on preset toggle.\n\n\n### Mongo Configuration\n\nTo set up a configuration through a Mongo Database, the following must be exact:\n1. Your `.env` file must contain the connection string denoted by a `MONGODB_URL=` variable, placed at root level of running directory.\n2. All collections must be in a database named `HomeConfig`\n3. `Relays` and `Presets` (case-sensitive) collections must be present in `HomeConfig`\n4. Relays and Presets are formatted just like in local config, with each relay/preset being its own document\n\nFor a visual representation:\n  - `HomeConfig` (Database)\n    - `Relays`   (Collection)\n    - `Presets`  (Collection)\n\n## Routes\n### Index Routes\n| Route    | Description                                                                                      |\n|----------|--------------------------------------------------------------------------------------------------|\n| /        | Health Check                                                                                     |\n| /status  | Gets full status of all relays                                                                   |\n| /refresh | Endpoint for refreshing config, useful for dynamic config loading testing and external debugging |\n\n### Preset Routes\n| Route                           | Description                                      |\n|---------------------------------|--------------------------------------------------|\n| /preset/getPresetNames          | Gets list of all preset names                    |\n| /preset/setPreset/\u003cpreset_name\u003e | Sets preset via name                             |\n\n### Relay Routes\n| Route                           | Description                                                                           |\n|---------------------------------|---------------------------------------------------------------------------------------|\n| /relay/\u003crelay_name\u003e/set/\u003cvalue\u003e | Gives command to specific relay. Commands include `ON`, `OFF`, `SWITCH`, and `STATUS` |\n\n\n## Future Todos\n- \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslad3%2Fremoterelayrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslad3%2Fremoterelayrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslad3%2Fremoterelayrust/lists"}