Credits: https://github.com/mihai-dinculescu/tapo
You need to compile this yourself. Guide for Windows.
Install Python and the tapo and pyinstaller libraries ( pip install tapo pyinstaller ) + AutoHotkey v.2 and Ahk2Exe
Compile the main.py file to .exe using Pyinstaller. ( pyinstaller --noconsole --onefile main.py ) and then grab it from the dist directory and save it somewhere safe.
Configure the AHK Script. Edit it and change keybinds to your linking, the path to the exe you compiled previously, along with the details of your TP-Link account. Don't forget to test the script!
Compile using Ahk2Exe the script to .exe and then open Run (press Win+R), type shell:startup and then press enter. Copy the newly made .exe into the folder and then you can run it. Now, at every startup the script will be ran.