Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.02 KB

USAGE.md

File metadata and controls

37 lines (22 loc) · 1.02 KB

Query and control PowerUSB power strips

NOTE: a number of features are TBD

Identifying strips and sockets

Each strip is identified by the USB bus and device numbers. A strip ID is the bus number and device number separated by a colon:

  • 0:1 - The power strip on bus 0, device 1

Each strip has 3 controllable sockets, numbered 1-3. A socket is identified by the strip ID followed by a colon and the socket number.

  • 0:1:2 - Socket 2 on power strip 0:1

Get the list of connected strips and status

powerusb [--list-strips]

Strip Commands

powerusb --strip [on|off|reset|current|power|clear] (TBD)

Socket Commands

powerusb --socket <socket id> [on|off]

Output formats (TBD)

You can select the output format for queries:

  • --text: Print human readable status to stdout [default]
  • --xml: Print an XML document to stdout
  • --json: Print a JSON stream to stdout
  • --syslog: log the current status
  • --format : select text, xml, json or syslog