Zum Inhalt springen

Turn on/off Elgato Key Light via Windows shortcut/button

    Search for the IP address of your Key Light via Wireless Network Watcher e.g. 192.168.2.227

    Your Key Light has a build in web server listening on port 9123 e.g. 192.168.2.227:9123

    Send a GET request e.g. via Postman to the following endpoint to get more information about your Key Light: http://192.168.2.227:9123/elgato/lights

    Turn on the light by using the following PUT request. You need to set the ‚on‘ value to ‚1‘ instead of ‚0‘.

    Turn on

    {
    "numberOfLights": 1,
    "lights": [
    {
    "on": 1,
    "brightness": 20,
    "temperature": 213
    }
    ]
    }

    Turn off

    {
    "numberOfLights": 1,
    "lights": [
    {
    "on": 0,
    "brightness": 20,
    "temperature": 213
    }
    ]
    }

    Save the JSONs within an external JSON file e.g. TurnOn.json and TurnOff.json

    Create a PowerShell Script to execure the JSON files e.g. TurnOn.ps1

    $Body = Get-Content "D:\Tools\Powershell\TurnOn.json"

    $Parameters = @{
    Method = "PUT"
    Uri = "http://192.168.2.227:9123/elgato/lights"
    ContentType = "application/json"
    Body = $Body
    }

    Invoke-RestMethod @Parameters

    stop-process -Id $PID

    TurnOff.ps1

    $Body = Get-Content "D:\Tools\Powershell\TurnOff.json" 

    $Parameters = @{
    Method = "PUT"
    Uri = "http://192.168.2.227:9123/elgato/lights"
    ContentType = "application/json"
    Body = $Body
    }

    Invoke-RestMethod @Parameters

    stop-process -Id $PID

    Create a PowerShell shortcut to execute your PowerShell script

    Content of the shortcut input field

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File "D:\Tools\Powershell\TurnOn.ps1"