/elgato.dart

CLI to interact with Elgato Lights on the local network

Primary LanguageDart

elgato.dart

CLI to interact with Elgato Lights on the local network.

How?

This project is written in Dart, and can probably be compiled on any platform that Dart supports (Windows, Linux, macOS).

# Clone this repo 
git clone https://github.com/marcjoha/elgato.dart.git

# Enter the directory
cd elgato.dart

# Fetch dependencies
dart pub get

# Compile to native code:
dart compile exe elgato.dart

# Exceute the resulting binary
./elgato.exe

Instructions are available in --help:

Usage: elgato.dart <command> [arguments]

Global options:
-h, --help    Print this usage information.

Available commands:
  decrease   Decrease brightness or temperature of each light.
  increase   Increase brightness or temperature of each light.
  off        Switch light(s) off.
  on         Switch light(s) on.
  toggle     Toggle switch of each light. [Default]

Run "elgato.dart help <command>" for more information about a command.

To map the binary to a global hotkey, use either a 3rd party tool or wire things up manually via Mac's built-in Automator tool (using the "Run Shell script" action). Instructions here.

Credits

This is originally a fork of Mike Fiedler's project, but has changed considerably to fit my workflow (and code preferences). Please consider trying out Mike's project first, to see if it fits your needs. If you need more powerful command switches, this project might be what you're looking for.

In turn, Mike's project was inspired by Brett Langdon, who had figured out how to control the lights via Bash, while using static IP addresses. Mike took the idea further and wrote a Dart application that can discover lights on the network automatically.