usbrelay(1)
πΈ usbrelay β bestie edition πΈ
okay so this is the manual page for usbrelay, and it lives in the General Commands Manual section. she's a little command with big main character energy: she controls or queries USB HID relays π
β¨ SYNOPSIS β¨
usbrelay [OPTION...] [ACTION...]
π DESCRIPTION π
usbrelay lets you query and set the state of USB HID electrical relays. she's basically the group chat admin of your little relay module. πβ¨
If you don't pass any ACTION at all, she just prints the state of all the relays to stdout. no notes, just receipts. π
To actually flip a relay: RELID_N=[0|1] sets the N-th relay on module RELID to off (0) or on (1). that's the whole vibe check right there. π
ngl, the best part is that you can do multiple actions with one command. one shot, many relays. iconique. π₯
for example:
usbrelay REL0A_1=0 REL0A_2=1 REL0B_2=0...
okay so important thing bestie, do not skip this: the RELID must only contain the characters A-Z0-9. that's it. that's the alphabet she accepts. if your relay has illegal characters, swap in the device file as the RELID instead (peep below for how π).
On DCTTECH relays you can also change the Relay module ID:
RELID_0=NEWID
sets the relay RELID to NEWID. lowkey magic. β¨
or, alternatively:
/dev/hidrawX_0=NEWID
(just substitute X for the device path that shows up with the -d option π«Ά)
π OPTIONS π
-d,--debugβ produces debugging output. she's telling you everything, fr fr. π-q,--quietβ suppresses output. shhh. not a peep. π€«-?,--helpβ prints the help menu. the classic cry for guidance. π--usageβ prints a usage description. the quick lil cheat sheet. π-V,--versionβ prints the program version. so you know exactly which girl you're talking to. π
reminder bestie: no ACTION means she prints every relay's state. no cap. π
that's the whole page, you ate it π β written up as usbrelay, dated 24 Jan 2022, and honestly she's iconic for it. bye bestie, go flip some relays π
β¨π¦
π¦ where this page comes from
- fedora 43: usbrelay 1.2.1-11.fc43 Β· GPL-2.0-or-later
- fedora 43: usbrelay 1.2.1-11.fc43 Β· GPL-2.0-or-later
- fedora 44: usbrelay 1.2.1-12.fc44 Β· GPL-2.0-or-later
- fedora 44: usbrelay 1.2.1-12.fc44 Β· GPL-2.0-or-later
- nixos 26.05: usbrelay 1.2.1
- nixpkgs unstable: usbrelay 1.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms