https://github.com/mjaschen/elgato-light-controller
Controls Elgato Keylight (Air).
https://github.com/mjaschen/elgato-light-controller
elgato elgato-key-light elgato-key-light-air keylight
Last synced: 4 months ago
JSON representation
Controls Elgato Keylight (Air).
- Host: GitHub
- URL: https://github.com/mjaschen/elgato-light-controller
- Owner: mjaschen
- Created: 2023-01-07T09:46:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T07:41:36.000Z (over 1 year ago)
- Last Synced: 2025-09-09T01:32:36.799Z (9 months ago)
- Topics: elgato, elgato-key-light, elgato-key-light-air, keylight
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elc - Elgato Light Controller
This is a simple CLI programm for controlling Elgato Key Lights.
I searched for a simple project for my very first steps in the Go programming language and decided a CLI controller for my Elgato light would be a good choice.
One could say this program is nothing else than a strongly typed shell script.
Tested with an Elgato Key Light Air.
## Installation
```shell
# Puts `elc` binary into $HOME/bin
make install
# Build and run from current directory
make elgato-light-controller
./elgato-light-controller
```
## Configuration
There's only one important configuration value – the light's URL. There are two ways to provide the URL to the program:
1. Command-line option: `elgato-light-controller --url=http://keylight.local:9123`
2. Environment variable `ELGATO_LIGHT_URL` (see "Usage" below)
## Usage
```shell
# Store the light's URL into an environment variable
% export ELGATO_LIGHT_URL=http://keylight.local:9123
# Ask Keylight for information about itself
% elc
Product Name : Elgato Key Light Air
Hardware Board Type : 200
Hardware Revision : 1
MAC Address : 3C:6A:9D:AA:BB:CC
Firmware Build Number : 218
Firmware Version : 1.0.3
Serial Number : CW00L0A00000
Display Name :
Features : lights
Wifi SSID : wifi_ssid_name
Wifi Frequency MHz : 2400
Wifi RSSI : -38
# Fetch current status ("status" or "s")
% elc status
State : off
Brightness : 40 %
Color Temperature : 5525 K
# Switch on/off ("on" or "off", resp. "1" or "0")
% elc on
% elc off
% elc 1
% elc 0
# Set brightness ("brightness" or "b"), value between 0 and 100
% elc brightness 50
% elc b 100
# Set color temperature ("temperature" or "t", value between 2900 and 7000)
% elc temperature 5500
% elc t 3300
# Specifying color temperature in short version (value/100)
% elc temperature 55
# Get status in JSON format
% elc --format=json status
{"state":false,"brightness":40,"temperature":5525}
```
## Libraries
- https://github.com/go-resty/resty
- https://github.com/akamensky/argparse
- https://github.com/tidwall/gjson
## References
- https://gitlab.com/obviate.io/pyleglight/