Use a script to toggle Elgato Lights

Use a script to toggle Elgato Lights

How to write code to toggle Elgato Lights

August 31, 20231 min readPython


Ever wondered how you can control your Elgato Lights using a script on your computer?

The process is really simple.

1. Download the elgato python script

git clone https://github.com/waxlamp/elgato.git

2. Create a new file

Open a terminal, navigate to desired folder and create a new file. I will call it elgato.sh

nano elgato.sh

3. Trigger the script

Navigate to the folder where you created the elgato.sh and paste the following command:

cd /path/to/your/directory
pipenv run python3 elgato toggle 0

If you have more than 1 light, simply add a new line and add the next index

cd /path/to/your/directory
pipenv run python3 elgato toggle 0
pipenv run python3 elgato toggle 1

4. Make sure the file is executable

chmod +x elgato.sh

Thats it!