keylight

command module
v0.0.0-...-6352ade Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Keylight CLI - A simple CLI to control your Elgato Keylights

A simple command line tool written in Golang for controlling Elgato Key Lights and Key Light Airs.

Install

$ go install github.com/kerinin/keylight@latest

OR

Clone this repo first

$ git clone https://github.com/kerinin/keylight.git
$ cd keylight

Run Go Install

$ go install

or Build and move the binary to your PATH

$ go build -v .

$ mv keylight /usr/local/bin/

Usage:

$ keylight command [command options]

Commands:

switch, s : Toggle the light switch

Usage:

$ keylight switch [command options]
# or
$ keylight s [command options]

# Examples

$ keylight s # Toggle all lights ON or OFF
$ keylight s --on # Switch on all lights. Same as `keylight s -o`
$ keylight s -o -b 15 # Switch on all lights, and set brightness to 15
$ keylight s -o -b 100 -t 4000 # Switch on all lights, and set brightness to 100 and temperature to 4000 kelvin
$ keylight s -o -b 25 -t 7000 --timeout 5 # Switch on all lights, and set brightness to 25 and temperature to 7000 kelvin. Wait 5 seconds before timing out
$ keylight s -o -l E855 -b 25 -t 7000 # Switch on a specific light, and set brightness to 25 and temperature to 7000 kelvin.
$ keylight s -o -l E855 # Switch on a specific light
$ keylight s -p warm # Switch on a specific preset

Options:

   --light value, -l value        ID, example E859, for the light to control. If not provided all lights will be updated (default: "all")
   --on, -o                       Switch light on. If not provided the light power state will be toggled based on last state (default: false)
   --brightness value, -b value   Set brightness of the lights (0 to 100) (default: -1)
   --temperature value, -t value  Set temperature of the lights in kelvin (3000 to 7000) (default: -1)
   --preset value, -p value       Switch on and set a preset temperature and brigtness. 
                                  Values: [warm warm-50 warm-100 cool cool-50 cool-100 normal normal-50 normal-100]
   --timeout value                Timeout for light discovery in seconds (default: 2)
   --help, -h                     show help (default: false)

Light id is the last part in the Name when you run keylight list

list, l : Discover and list available lights

Usage:

$ keylight list [command options]
# or
$ keylight l [command options]

Options:

   --timeout value                Timeout in seconds (default: 2)
   --help, -h                     show help (default: false)

Output:

+-------------------------------+-------------+------------+--------------+---------------------------------------+
| Name                          | Power State | Brightness | Temperature  | Address                               |
+-------------------------------+-------------+------------+--------------+---------------------------------------+
| Elgato\ Key\ Light\ Air\ E859 | on          |         10 | 331 (3021 K) | elgato-key-light-air-e859.local.:9123 |
+-------------------------------+-------------+------------+--------------+---------------------------------------+

help, h : Shows a list of commands or help for one command

Run keylight command --help for info about flags specific to a command

Licence

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址