https://github.com/viral32111/kasa-smart-plug
Command-line utility to control & monitor TP-Link Kasa smart plugs.
https://github.com/viral32111/kasa-smart-plug
controller exporter kasa tp-link
Last synced: about 1 year ago
JSON representation
Command-line utility to control & monitor TP-Link Kasa smart plugs.
- Host: GitHub
- URL: https://github.com/viral32111/kasa-smart-plug
- Owner: viral32111
- License: agpl-3.0
- Created: 2022-09-21T13:38:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-10T11:22:33.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T21:26:52.008Z (over 1 year ago)
- Topics: controller, exporter, kasa, tp-link
- Language: Go
- Homepage: https://tp-link.com/uk/smarthome
- Size: 60.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
# Kasa Smart Plug
[](https://github.com/viral32111/kasa-smart-plug/actions/workflows/ci.yml)
[](https://github.com/viral32111/kasa-smart-plug/actions/workflows/codeql.yml)




This is a command-line utility for controlling and monitoring (via a [Prometheus exporter](https://prometheus.io/docs/instrumenting/exporters/)) [TP-Link's Kasa Smart Plugs](https://tp-link.com/uk/smarthome).
I test this against my [Kasa KP115](https://www.tp-link.com/uk/home-networking/smart-plug/kp115/).
**NOTE: This project is not yet finished! While the API client is fully implemented, only the `info` command is implemented as of yet.**
## 📜 Background
I wanted to remote control and monitor the energy usage of a few devices in my house using custom software, so I bought a few of [TP-Link's Kasa Smart Plugs](https://tp-link.com/uk/smarthome) as online reviews mentioned they had an open API which exposed lots of data and did not require linking an online account, both of which turned out to be true.
I originally made this in February of 2022 as my first Go project. However, it was not published here straight away, hence why my [RCON](https://github.com/viral32111/rcon) and [Healthcheck](https://github.com/viral32111/healthcheck) projects were published before this.
## ⚖️ License
Copyright (C) 2022 [viral32111](https://viral32111.com).
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see https://www.gnu.org/licenses.