Skip to main content

Keylight

@keeb/keylightv2026.05.29.5· 1d agoMODELS
01README

Control an Elgato Key Light from swamp workflows — turn it on/off, toggle, and set brightness and color temperature over its local REST API.

02Models1
@keeb/keylightv2026.05.29.5keylight.ts

Global Arguments

ArgumentTypeDescription
hoststringIP address or hostname of the Key Light
portnumberHTTP port of the Key Light (default: 9123)
brightness?numberDefault brightness applied when turning on (0–100). Omit to leave brightness unchanged.
temperature?numberDefault color temperature in mired applied when turning on (143 = cool ~7000 K, 344 = warm ~2900 K). Omit to leave temperature unchanged.
fn find(subnet?: string, timeoutMs: number)
Scan the local network for Elgato Key Lights. Defaults to the /24 subnet of the configured host.
ArgumentTypeDescription
subnet?stringCIDR subnet to scan, e.g. 10.0.0.0/24. Defaults to /24 of the configured host.
timeoutMsnumberPer-host probe timeout in milliseconds (default: 500)
fn sync()
Read current light state and device info from the Key Light
fn on()
Turn the Key Light on. If brightness or temperature are set in the model's global args, they are applied at the same time.
fn off()
Turn the Key Light off
fn toggle()
Toggle the Key Light on or off
fn set(brightness?: number, temperature?: number, on?: boolean)
Set brightness, color temperature, and/or power state. At least one argument is required.
ArgumentTypeDescription
brightness?numberBrightness percentage (0–100)
temperature?numberColor temperature in mired (143 = cool ~7000 K, 344 = warm ~2900 K)
on?booleanTurn the light on or off
fn calibrate(camera: string, targetLuma: number, minBrightness: number, maxBrightness: number, settleMs: number, lumaTolerance: number, rbTolerance: number)
Auto-calibrate Key Light brightness and temperature using a v4l2 camera. Phase 1 finds the temperature that neutralizes color cast; phase 2 finds the brightness that hits target luminance. Writes a calibration resource with the full iteration log and suggestions.
ArgumentTypeDescription
camerastringv4l2 device path of the capture camera (default: /dev/video0)
targetLumanumberTarget average luminance for the center of frame (0–255, default: 110)
minBrightnessnumberMinimum Key Light brightness to consider (default: 3)
maxBrightnessnumberMaximum Key Light brightness — hard cap for dark-room use (default: 30)
settleMsnumberMilliseconds to wait after each light adjustment before capturing (default: 500)
lumaTolerancenumberStop brightness calibration when luma is within this many units of target (default: 5)
rbTolerancenumberStop temperature calibration when R/B ratio is within this distance of 1.0 (default: 0.05)

Resources

state(infinite)— Current light state (on/off, brightness, temperature)
info(infinite)— Static device information (product name, firmware, serial)
found(7d)— Results of the most recent LAN scan for Key Lights
calibration(7d)— Result of the most recent auto-calibration run
03Previous Versions3
2026.05.29.4May 29, 2026
2026.05.29.3May 29, 2026

Modified 1 models

2026.05.29.2May 29, 2026
04Stats
A
100 / 100
Downloads
0
Archive size
17.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms