Keylight
@keeb/keylightv2026.05.29.5
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.
02Models
@keeb/keylightv2026.05.29.5keylight.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| host | string | IP address or hostname of the Key Light |
| port | number | HTTP port of the Key Light (default: 9123) |
| brightness? | number | Default brightness applied when turning on (0–100). Omit to leave brightness unchanged. |
| temperature? | number | Default 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.
| Argument | Type | Description |
|---|---|---|
| subnet? | string | CIDR subnet to scan, e.g. 10.0.0.0/24. Defaults to /24 of the configured host. |
| timeoutMs | number | Per-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.
| Argument | Type | Description |
|---|---|---|
| brightness? | number | Brightness percentage (0–100) |
| temperature? | number | Color temperature in mired (143 = cool ~7000 K, 344 = warm ~2900 K) |
| on? | boolean | Turn 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.
| Argument | Type | Description |
|---|---|---|
| camera | string | v4l2 device path of the capture camera (default: /dev/video0) |
| targetLuma | number | Target average luminance for the center of frame (0–255, default: 110) |
| minBrightness | number | Minimum Key Light brightness to consider (default: 3) |
| maxBrightness | number | Maximum Key Light brightness — hard cap for dark-room use (default: 30) |
| settleMs | number | Milliseconds to wait after each light adjustment before capturing (default: 500) |
| lumaTolerance | number | Stop brightness calibration when luma is within this many units of target (default: 5) |
| rbTolerance | number | Stop 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 Versions
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
Repository
https://github.com/keeb/keylight05Platforms