Skip to content

Python script to interact with Elgato Key Light Air lights over REST API

License

Notifications You must be signed in to change notification settings

theperiscope/elgato-key-light-air-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python script to interact with Elgato Key Light Air lights over REST API

Configuration

The script looks for lights configuration in the following places (in order):

  1. ~/.elgato-key-light-air

    light1=192.168.1.101
    light2=192.168.1.102
    
  2. Environment variables prefixed with ELGATO_LIGHT_<name>
    The environment variable value is the configured IP address or host name.

Usage

To get help about available command line options execute:

elgato-key-light-air.py

Output:

usage: elgato-key-light-air.py [-h] [--targets TARGETS [TARGETS ...]]
                               [--operations OPERATIONS [OPERATIONS ...]]

Control Elgato Key Light Air devices

options:
  -h, --help            show this help message and exit
  --targets TARGETS [TARGETS ...]
                        Light targets (any configured, or 'all')
  --operations OPERATIONS [OPERATIONS ...]
                        Operations to perform (on, off, brightness=N, temperature=N, identify, info,
                        accessory-info)

Sample Commands

# turn off all lights
elgato-key-light-air.py --targets all --operations off

# turn on the lights with predermined birghtness and color temperature
# brightness=0..100, temperature=2900-7000
elgato-key-light-air --operations brightness=2 temperature=3750 on

# identify light1
elgato-key-light-air.py --targets light1 --operations identify

# get information product name, serial number, firmware version, MAC address, WiFi info, power state, etc.
elgato-key-light-air.py --targets light1 --operations accessory-info

# get information about current light state
elgato-key-light-air.py --targets light1 --operations info

About

Python script to interact with Elgato Key Light Air lights over REST API

Topics

Resources

License

Stars

Watchers

Forks

Languages