Skip to content

Instantly share code, notes, and snippets.

View liam-russell's full-sized avatar

Liam Russell liam-russell

View GitHub Profile
@liam-russell
liam-russell / Readme.md
Last active May 6, 2024 23:30
TP-Link Kasa Smart Plug - get energy consumption statistics as a CSV file

TP-Link Kasa Smart Plug - get energy consumption statistics as a CSV file

Background

The TP Link Kasa smart switches log energy consumption data over time, however the app is very limited and won't let you get out data, graph it or see historical usage. This script extracts and saves to a CSV file.

The python-kasa library is used to communicate with the Kasa switch.

Requirements

  • Python must be installed
  • You must be on the same wifi network as the Kasa switch