Last updated:
0 purchases
elgato keylight api
Elgato Keylight API for Dart #
Features #
This package provides an API for Elgato Keylights.
Not covered #
This plugin doesn't handle how to find a light IP address in your network. The multicast_dns library should help you by using this query:
ResourceRecordQuery.serverPointer('_elg._tcp.local');
copied to clipboard
Getting started #
For each light, you first have to create an ElgatoKeylightAPI object:
ElgatoKeylightAPI api = ElgatoKeylightAPI(
ip: 'elgato-key-light-air-ace6.local',
port: 9123,
);
copied to clipboard
Get light info #
There are three endpoints available:
getLightOptions
getLightAccessoryInfo
getLightSettings
Update a light #
After calling getLightOptions(), update the object and send it to updateLightOptions():
KeyLightOptions lightOptions = await api.getLightOptions();
api.updateLightOptions(
lightOptions.updateWith(on: !lightOptions.lights.first.isOn),
);
copied to clipboard
Example of data #
Light accessory:
{
productName: "Elgato Key Light Air",
hardwareBoardType: 200,
firmwareBuildNumber: 216,
firmwareVersion: "1.0.3", serialNumber: "XXX",
displayName: "May be empty",
features: ["lights"],
wifi: {
ssid: "XXX",
frequency: 1234,
rssi: -1
}
}
copied to clipboard
Light settings:
{
powerOnBehavior: 1,
powerOnBrightness: 20,
powerOnTemperature: 213,
switchOnDurationMs: 100,
switchOffDurationMs: 300,
colorChangeDurationMs: 100
}
copied to clipboard
Light options:
{
number: 1,
lights: [
{
isOn: true,
brightness: 28,
temperature: 279
}
]
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.