Due to COVID-19, I’m delivering VMware training courses online. Most of the time, I’m using Zoom but sometimes I have to switch back to WebEx. I always activate my camera, so the students have better interaction with me.
I never worried about the light, but since many people are working from home and posting their home-office pictures on Twitter, I noticed some of them were using studio lights. After some investigation, I decided to buy a Elgato Key Light Air.
The light can be switched on and off with the Control Center app and it’s also possible to change the brightness and the colour temperature. It’s remotely controlled through 2.4 GHz Wi-Fi.
I wondered if there was a way to use REST and interact with the light. After some googling, I’ve found an example JSON body needed for the REST API call. The JSON body has 3 parameters, on – brightness and temperature.
{
"numberOfLights": 1,
"lights": [
{
"on": 1,
"brightness": 20,
"temperature": 200
}
]
}
The URL to the API is http://IP address:9123/elgato/lights and it listens to GET and PUT commands. I want to try with Postman to see if I could get this to work. You don’t need an authentication header, just a GET or PUT REST API call and a JSON body, and it allows you to control the light.
First, I send a GET request to get the current setting of the light and copy and paste these settings into the JSON body of my PUT request. After changing some parameters and hitting SEND for the PUT request, the light changes immediately.
Interesting read: Automating Elgato Key Lights From macOS Touch Bar