How to Reset Energy Usage and Runtime on TP-Link Kasa Smart Plugs (KP115/HS110)

I recently acquired a few TP-Link Kasa KP115 smart plugs with energy metering. It was a bit disappointing to find that they barely show any data. There are no graphs, no voltage or current, just instantaneous power and summary energy stats and runtime:

I wanted to find the daily energy consumption of various appliances, so I needed a way to reset the energy counter to zero. Believe it or not, TP-Link doesn’t provide a way to reset the energy. TP-Link support says that you have to delete the plug from Kasa, factory reset, and then add it back to Kasa.

The most ridiculous part is, the smart plugs actually have a command to reset the energy without resetting the whole device! They’re just too lazy to add it to their app!

I found a github repo with a list of the commands available in the TP-Link protocol. It turns out that there’s a command to reset the energy monitor!

Erase All EMeter Statistics

The repo contains a Python3 script that can query the energy stats, but it doesn’t have an option to send the emeter reset command. Fortunately, it has a command line option to send an arbitrary JSON command to the plug. I tried sending the above to my KP115, and the energy meter was instantly reset to 0! Although I don’t have one, the same command should also work on the older HS110 smart plug.

So here’s how to do it:

  1. Download and install Python 3.x: Python Downloads
  2. Download
  3. Next you need to know the IP address of the smart plug you want to reset. If you don’t know how to find it from your WiFi router, you can scan for it with an IP scanner, such as Fing. Look for a device named KP115 (or HS110).
  4. open up a command shell and type:
python3 ./ -t <ipaddr> -j {"emeter":{"erase_emeter_stat":null}}

substituting the IP address of your smart plug for “<ipaddr>.”


# python3 ./ -t -j {"emeter":{"erase_emeter_stat":null}}
Sent:      {emeter:{erase_emeter_stat:null}}
Received:  {}

The Python script returns “Received: {}” if it’s successful. Next, open up your Kasa app, and check to see if the energy meter was reset successfully.

There are 2 Comments to "How to Reset Energy Usage and Runtime on TP-Link Kasa Smart Plugs (KP115/HS110)"

Write a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>