I wanted to trigger some of my Kasa lights from Blue Iris when my cameras detect motion. There is no public API available but there are a few web pages that list enough of the protocol for what I need. I used this info to create an exe that that will turn on a light for n seconds and then turn it off, if the light is already on, then it will do nothing.
To use this from Blue Iris you need to go to the camera settings and in the Alert tab add an action to call the exe when triggered.
The exe is named KasaMotionLight and it targets the .Net framework 4.8 so that is the only requirement.
The command line is as follows: KasaMotionLight id:<your login id> pw:<your password> s:<number of seconds to leave the light on> dev:<light name in the Kasa app>
Example: KasaMotionLight id:userid pw:secret s:60 dev:driveway_light
I only have a few of the various Kasa devices so it is possible that it will not work for some of them. It is also possible that Kasa will change the API at some point to break this but for now it works.
If anyone finds this useful, let me know how it works for you.
To use this from Blue Iris you need to go to the camera settings and in the Alert tab add an action to call the exe when triggered.
The exe is named KasaMotionLight and it targets the .Net framework 4.8 so that is the only requirement.
The command line is as follows: KasaMotionLight id:<your login id> pw:<your password> s:<number of seconds to leave the light on> dev:<light name in the Kasa app>
Example: KasaMotionLight id:userid pw:secret s:60 dev:driveway_light
I only have a few of the various Kasa devices so it is possible that it will not work for some of them. It is also possible that Kasa will change the API at some point to break this but for now it works.
If anyone finds this useful, let me know how it works for you.