Skip to content

mjbraun/keylight-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Keylight Trigger

Automatically turn your Elgato Key Light on/off when your Mac's camera activates.

When you join a video call, your light turns on. When you leave, it turns off. No manual switching needed.

Requirements

  • macOS (tested on Sonoma/Sequoia)
  • Elgato Key Light or Key Light Air on your local network
  • No other dependencies (no Homebrew, no additional tools)

Quick Start

# 1. Make executable
chmod +x elgato-light.sh

# 2. Find your light
./elgato-light.sh discover

# 3. Test connection
./elgato-light.sh test

# 4. Install for automatic camera sync
./elgato-light.sh install

That's it. Your light will now sync with your camera.

Commands

Command Description
discover Find Elgato lights on your network
test Verify connection to your light
on Turn light on manually
off Turn light off manually
status Show current light state
install Set up automatic camera sync
uninstall Remove automatic sync

Configuration

Edit the top of elgato-light.sh to customize:

LIGHT_HOST=""        # Leave empty for auto-discovery, or set to "elgato-key-light-air-XXXX.local"
BRIGHTNESS=43        # 0-100
TEMPERATURE=290      # 143 (warm) to 344 (cool)

How It Works

  1. A LaunchAgent monitors macOS system logs for camera power state changes
  2. When the camera turns on (e.g., joining a Zoom call), the script sends an HTTP request to your light's local API
  3. When the camera turns off, the light turns off

The script uses mDNS hostnames (like elgato-key-light-air-664d.local) rather than IP addresses, so it works reliably even when your light gets a new IP from DHCP.

Troubleshooting

Light not found during discovery:

  • Ensure the light is powered on and connected to the same network
  • Try the Elgato Control Center app to verify connectivity
  • You can also set LIGHT_HOST directly to an IP address

Light doesn't respond to camera:

  • Check logs: cat /tmp/elgato-light.log
  • Verify the LaunchAgent is running: launchctl list | grep elgato
  • Try reinstalling: ./elgato-light.sh uninstall && ./elgato-light.sh install

Test with your camera:

  • Open Photo Booth or FaceTime to trigger camera activation
  • Watch the log: tail -f /tmp/elgato-light.log

Uninstalling

./elgato-light.sh uninstall

License

MIT

About

Automatically turn Elgato Key Light on/off when your Mac camera activates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages