usbrelay(1)

πŸ“¦
version 1.2.1 Β· 3 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

🌸 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 πŸ’…βœ¨πŸ¦‹