softScheck / tplink-smartplug

TP-Link WiFi SmartPlug Client and Wireshark Dissector
Apache License 2.0
1.15k stars 297 forks source link

Ability to read the power usage? #104

Open GenerallyClumsy opened 10 months ago

GenerallyClumsy commented 10 months ago

Is there any way to use this script to read the current power usage? I've got a KP115 and would like to turn off the switch when power usage drops below a threshold.

grayerbeard commented 10 months ago

I have written Python scripts that do all sorts of control actions over WiFi using tplink and Tuya devices. Some persistence is needed to crawl up the learning curve but it can be done.

You can see my efforts on my GitHub repository. I run these scripts on R Pi 3 or 4 but they could run on an R Pi Zero W and could be tested or run on a PC.

I suggest you start by running on a PC as it can be easier.