A simple command-line interface to control Elgato Key Light devices using Babashka.
- Babashka
- An Elgato Key Light device on your network
- Clone this repository:
git clone https://github.com/versality/keylight-cli
cd keylight-cli
- Make the script executable (optional):
chmod +x keylight.bb
bb keylight.bb <ip-address> [on|off]
Toggle the light (switch between on and off):
bb keylight.bb 192.168.1.123
Turn the light on:
bb keylight.bb 192.168.1.123 on
Turn the light off:
bb keylight.bb 192.168.1.123 off
The script communicates with the Elgato Key Light's HTTP API (port 9123) to control the device. It can:
- Query the current state of the light
- Turn the light on or off
- Toggle the light's state
- babashka.http-client
- cheshire (for JSON parsing)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Elgato for providing the Key Light API
- Babashka project for making Clojure scripting accessible