Skip to main content

Control USB connected LED lights, like a human.

Project description

busylight

Control USB attached LED lights like a Human™

Two Lights at Once

Make a supported USB attached LED light turn on, off and blink; all from the comfort of your very own command-line. If your platform supports HIDAPI (Linux, MacOS, Windows and probably others), then you can use busylight!

Usage

$ busylight on
$ busylight off
$ busylight on purple
$ busylight on 0xff00ff   # still purple.
$ busylight blink yellow  # all hands man your stations.
$ busylight blink red     # RED ALERT!
$ busylight off           # all clear.

Supported Lights

$ busylight supported
ThingM Blink1
Embrava BlyncLight
Kuando BusyLight
Luxafor Flag

Install

$ pip install -U busylight-for-humans
$ busylight --help

Source

busylight

Usage:

$ busylight [OPTIONS] COMMAND [ARGS]...

Options:

  • -l, --light-id INTEGER: Which light to operate on, see list output. [default: 0]
  • -a, --all: Operate on all lights.
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • blink: Activate the selected light in blink mode.
  • list: List available lights (currently connected).
  • off: Turn selected lights off.
  • on: Turn selected lights on.
  • supported: List supported LED lights.
  • udev-rules: Generate a Linux udev rules file.

busylight blink

Activate the selected light in blink mode.

The light selected will blink with the specified color. The default color is red if the user omits the color argument. Colors can be specified with color names and hexadecimal values. Both '0x' and '#' are recognized as hexidecimal number prefixes and hexadecimal values may be either three or six digits long.

Examples:

$ busylight blink          # light is blinking with the color red
$ busylight blink green    # now it's blinking green
$ busylight blink 0x00f    # now it's blinking blue
$ busylight blink #ffffff  # now it's blinking white
$ busylight --all blink    # now all available lights are blinking red
$ busylight --all off      # that's enough of that!

Usage:

$ busylight blink [OPTIONS] [COLOR]

Options:

  • -f, --faster: Increase blink speed.
  • --help: Show this message and exit.

busylight list

List available lights (currently connected).

Usage:

$ busylight list [OPTIONS]

Options:

  • --help: Show this message and exit.

busylight off

Turn selected lights off.

To turn off all lights, specify --all:

$ busylight --all off

Usage:

$ busylight off [OPTIONS]

Options:

  • --help: Show this message and exit.

busylight on

Turn selected lights on.

The light selected is turned on with the specified color. The default color is green if the user omits the color argument. Colors can be specified with color names and hexadecimal values. Both '0x' and '#' are recognized as hexidecimal number prefixes and hexadecimal values may be either three or six digits long.

Examples:

$ busylight on          # light activated with the color green
$ busylight on red      # now it's red
$ busylight on 0x00f    # now it's blue
$ busylight on #ffffff  # now it's white
$ busylight --all on    # now all available lights are green

Usage:

$ busylight on [OPTIONS] [COLOR]

Options:

  • --help: Show this message and exit.

busylight supported

List supported LED lights.

Usage:

$ busylight supported [OPTIONS]

Options:

  • --help: Show this message and exit.

busylight udev-rules

Generate a Linux udev rules file.

Linux uses the udev subsystem to manage USB devices as they are plugged and unplugged. By default, only the root user has read and write access. The rules generated grant read/write access to all users for all known USB lights by vendor id. Modify the rules to suit your particular environment.

Example

$ busylight udev-rules -o 99-busylight.rules
$ sudo cp 99-busylight.rules /etc/udev/rules.d

Usage:

$ busylight udev-rules [OPTIONS]

Options:

  • -o, --output PATH: Save rules to this file.
  • --help: Show this message and exit.

Project details


Release history Release notifications | RSS feed

This version

0.4.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

busylight-for-humans-0.4.2.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

busylight_for_humans-0.4.2-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file busylight-for-humans-0.4.2.tar.gz.

File metadata

  • Download URL: busylight-for-humans-0.4.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.3 Darwin/19.6.0

File hashes

Hashes for busylight-for-humans-0.4.2.tar.gz
Algorithm Hash digest
SHA256 7e35a619530461b2b91a6cac78a742ec7b1640cc8fabeb0504c16dfd7ce4ef57
MD5 6e682f3cee563a1ff654429fc67c6844
BLAKE2b-256 31fb5b65c4e1d785ac89c902aa032775ff3009a0fb7cfe7526371604d87a71dc

See more details on using hashes here.

File details

Details for the file busylight_for_humans-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for busylight_for_humans-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d399daec9a89fd462fabae586c3c448f9bf5d2530cd2053ba6457897c8ecf39
MD5 6c74c9f4eeafcaec0914f0c4aa6760c3
BLAKE2b-256 160cd765f51411cb78b10cd17bd2aeb5a7ea6c34b45e4d20b3554199afca9a20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page