← BACK

elgato-lights-connection

Control your Elgato Key Lights on Windows

Python ⭐ 5

Elgato Key Light Connection

Control your Elgato Key Lights on Windows using buttons on the Logitech MX Creative Console via Logi Options+.

Note: You can use these scripts to control your lights from any hardware or software, but the setup below assumes the MX Creative Console!

Requirements

  • Windows 10/11
  • Python 3.6+
  • Logi Options+ (if you're controlling the app from the MX Creative Console)
  • Elgato Key Light(s) on the same local network (this has been tested with the original Elgato Key Light and the Elgato Key Light Air)

(This also assumes you have the MX Creative Console device)

Installation

git clone <repository-url>
cd elgato-lights-mx-connection
pip install -r requirements.txt

Setup

In the Elgato Control Center, select your light and note its IP address under its Accessory Settings.

Run the interactive wizard once per light:

python setup_light.py

The wizard will:

  1. Ask for the light's IP address and verify the connection
  2. Save a config file to config/
  3. Optionally generate .bat + .vbs wrapper files in batch/

Tip: To find your light's IP, open Elgato Control Center → select your light → Settings → Network.

Binding to Logi Options+

The wizard generates two files per action in the batch/ folder:

File Purpose
*.bat Runs the Python script
*.vbs Launches the .bat silently (no console window)

In Logi Options+, point each button to the .vbs file — not the .bat. This runs the script completely in the background with no console window appearing.

To point the button to the script, in Logi Options+:

  1. Select the button you want to configure.
  2. Choose "System Actions" and then "Open File"
  3. Browse to the .vbs file generated by the setup wizard in the batch/ folder.

You can stop here! Below is some extra documentation for advanced usage.

You can open the .bat or .vbs files in whatever software you want, and it will call the functions you set up.

Advanced Usage

Scripts

All direct scripts take an IP address as the first argument:

python toggle_light.py 192.168.1.100
python turn_on_light.py 192.168.1.100
python turn_off_light.py 192.168.1.100
python set_brightness.py 192.168.1.100 75       # 0–100
python set_color_temp.py 192.168.1.100 4000     # 2700–7000K
python set_color.py 192.168.1.100 255 0 0       # R G B (0–255)

Add --port <PORT> to any script if your light uses a non-default port (default: 9123).

Configuration

Configs are stored as JSON in config/ (gitignored — each user maintains their own). Use config/lights_example.json as a reference:

{
	"name": "Desk Light",
	"ip_address": "192.168.1.100",
	"port": 9123,
	"description": "Main desk key light"
}

To configure manually, copy lights_example.json and fill in your light's details, then reference it in your scripts.

Troubleshooting

"Connection refused"

  • Confirm the IP address hasn't changed (lights can get new IPs via DHCP)
  • Ensure the light and PC are on the same network
  • Check that port 9123 isn't blocked by your firewall

Button press does nothing in Logi Options+

  • Verify you're pointing to the .vbs file, not the .bat
  • Run the .bat directly first to confirm the script works
  • Restart Logi Options+ after making changes

"ModuleNotFoundError: No module named 'requests'"

  • Run pip install -r requirements.txt

Want to see error output for debugging?

  • Run the .bat file directly from a terminal — output will be visible there

Testing

python -m pytest tests\

Color Reference

Color Temperatures

Kelvin Character
2700K Warm white (incandescent)
3000K Soft white
4000K Neutral white
5500K Daylight
7000K Cool daylight

Common RGB Values

Color R G B
Red 255 0 0
Green 0 255 0
Blue 0 0 255
Warm amber 255 160 50
White 255 255 255

Advanced Usage

Import LightController directly for custom scripts:

from scripts.light_controller import LightController

light = LightController("192.168.1.100")
light.turn_on()
light.set_brightness(80)
light.set_color_temperature(4000)

Resources