Skip to content

Control Elgato Key Lights and Light Strips with Javascript!

Notifications You must be signed in to change notification settings

LPTP1Dev/elgato-light-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elgato Key Light API

Control Elgato Key Lights with Javascript!

Installation

Running npm i elgato-light-api will install the package. Typescript is natively supported.

How to use

Create a new instance of ElgatoLightAPI:

const lightAPI = new ElgatoLightAPI();

An Event Emitter is used to notify listeners when a new Key Light is detected.

lightAPI.on('newLight', (newLight: KeyLight) => {
    console.log(newLight.name);
});

Currently, ElgatoLightAPI has two main functions, updateLightOptions and updateAllLights. And an exposed Array keyLights

UpdateLightOptions

lightAPI.updateLightOptions(lightAPI.keyLights[0], options).then(() => {
    console.log("Lights are all updated to the same value!");
}).catch(e => {
    console.error("Error: ", e);
});

UpdateAllLights

lightAPI.updateAllLights(options).then(() => {
    console.log("Lights are all updated to the same value!");
}).catch(e => {
    console.error("Error: ", e);
});

The interfaces required can all be found in KeyLight.ts

Feedback or Issues

This was a quick project to allow for easier control over my Keylights, if you find any issues or have feedback feel free to create an issue about it here.

If you'd like to add any features or fix any bugs you may find submit a PR!

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%