The command-line version of the Kasa Control is TPLinkCmd.exe, this can be added to scripts and shortcuts to control your devices.
Login
you must give a login command before executing a command, the credentials are cached for 5 minutes so for most scripts this is only required once.
TPLinkCmd -login -username "test@account.com" -password "password"
Logoff
Add the following at the end of the script, this erases the credentials from the cache.
TPLinkCmd -logoff
Get Device List
This gives a list of the names to use in the commands
TPLinkCmd -devicelist
Commands
TPLinkCmd -device "BEDROOM" -on TPLinkCmd -device "BEDROOM" -off TPLinkCmd -device "BEDROOM" -toggle TPLinkCmd -device "BEDROOM" -status TPLinkCmd -device "BEDROOM" -brightness 62
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article