{"id":20574483,"url":"https://github.com/nkh-lab/usb-relay-module","last_synced_at":"2025-04-14T17:50:33.494Z","repository":{"id":59971734,"uuid":"520839522","full_name":"nkh-lab/usb-relay-module","owner":"nkh-lab","description":"Cross-platform project for controlling USB relay modules based on HID technology","archived":false,"fork":false,"pushed_at":"2025-02-25T19:38:13.000Z","size":947,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T06:22:28.594Z","etag":null,"topics":["getrelay","hid","hidapi","relay","relaybox","setrelay","usb","usb-hid","usb-relay"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nkh-lab.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":"2022-08-03T10:42:22.000Z","updated_at":"2025-02-25T19:37:36.000Z","dependencies_parsed_at":"2024-01-22T23:28:54.190Z","dependency_job_id":"c10a9cfa-be14-4702-bcd5-ad02ede7e2fc","html_url":"https://github.com/nkh-lab/usb-relay-module","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh-lab%2Fusb-relay-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh-lab%2Fusb-relay-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh-lab%2Fusb-relay-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh-lab%2Fusb-relay-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkh-lab","download_url":"https://codeload.github.com/nkh-lab/usb-relay-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248931188,"owners_count":21185130,"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":["getrelay","hid","hidapi","relay","relaybox","setrelay","usb","usb-hid","usb-relay"],"created_at":"2024-11-16T05:34:41.033Z","updated_at":"2025-04-14T17:50:33.455Z","avatar_url":"https://github.com/nkh-lab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Intro\nCross-platform project for controlling USB relay modules based on HID technology.\n\n![](doc/pictures/intro.png)\n\n## CI Status\n[![CI](https://github.com/nkh-lab/usb-relay-module/actions/workflows/ci.yml/badge.svg)](https://github.com/nkh-lab/usb-relay-module/actions/workflows/ci.yml)\n\nUbuntu | Windows\n\n## How to get project source code\nClone main project:\n```\ngit clone https://github.com/nkh-lab/usb-relay-module.git\n```\nClone submodule projects:\n```\ngit submodule update --init\n```\n## How to build\n\nThe following describes how to build and use CLI applications: `getrelay` and `setrelay`.\n\nIf you also want to use GUI application - `relaybox`, follow the [GUI Application](doc/GUI.md) guide.\n\n### Linux\nInstall depedencies, e.g. for Ubuntu:\n```\nsudo apt-get install libudev-dev\n```\nBuild:\n```\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n```\n### Windows\nThe following describes how to build the project from the command line for the compiler from Visual Studio.\n\nAdd `msbuild` to `PATH` environment variable if it's unset:\n```\nset PATH=%PATH%;\u003cpath to msbuild\u003e\n```\nBuild:\n```\nmkdir build \u0026\u0026 cd build\ncmake -G \"Visual Studio 17 2022\" ..\ncmake --build . --config Release\n```\n### Portable\nTo be able to use the output binaries outside of the project, use the appropriate scripts from the [tools](tools) folder to build the portable package ([build/portable](build/portable) and its archive [build/usbrelaymodule-portable.tar.gz](build/usbrelaymodule-portable.tar.gz)), for example for Ubuntu:\n```\n./tools/build-portable-linux.sh\n```\n\n## How to use getrelay and setrelay\nThese are CLI applications, use `--help` command to see usage description.\n### Usage examples\n**Example**: Get information about detected module\n```\n./getrelay\npath:             /dev/hidraw6\nvendor_id:        0x16c0\nproduct_id:       0x05df\nserial_number:\nrelease_number:   256\nmanufacturer:     www.dcttech.com\nproduct:          USBRelay2\ninterface_number: 0\nmodule_name:      R3\nchannel_1:        0\nchannel_2:        0\n```\n**Example**: Set first channel to `1` (ON) then to `0` (OFF) of module `R3`\n```\n./setrelay R3_1=1\n...\n./setrelay R3_1=0\n```\n**Example**: Rename module `R3` to `Mod4`\n```\n./setrelay R3=Mod4\n```\n\n## Troubleshooting and other documentation\nTroubleshooting documentation is available at:\n- [Troubleshooting](doc/Troubleshooting.md)\n\nAnd here is the contents page of all available documentation:\n- [Contents](doc/Contents.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh-lab%2Fusb-relay-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkh-lab%2Fusb-relay-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh-lab%2Fusb-relay-module/lists"}