PHPackages                             guym4c/kasa-plug-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. guym4c/kasa-plug-client

ActiveLibrary[API Development](/categories/api)

guym4c/kasa-plug-client
=======================

TP-Link Kasa API client

v1.0(6y ago)081MITPHP

Since Jul 21Pushed 6y agoCompare

[ Source](https://github.com/guym4c/kasa-plug-client)[ Packagist](https://packagist.org/packages/guym4c/kasa-plug-client)[ Docs](https://github.com/guym4c/kasa-plug-client)[ RSS](/packages/guym4c-kasa-plug-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

`kasa-plug-client`
==================

[](#kasa-plug-client)

A simple client for the TP-Link Kasa smart plugs.

Install
=======

[](#install)

Via Composer:

```
composer install guym4c/kasa-plug-client
```

Usage
=====

[](#usage)

Get yourself an instance of the client, using your TP-Link Cloud login details (which you use to log in to the app).

```
$kasa = new \Guym4c\Kasa\Client(/* username */, /* password */);
```

As tokens for the unofficial Kasa API expire quite fast, the package takes your credentials and obtains a new token for you on every instantiation.

What you're here for
--------------------

[](#what-youre-here-for)

Turning plugs on and off is simple - you can retrieve a `Plug` using the `$kasa->getPlug()` method. Pass this method a string of the plug alias or plug ID (you can see the alias in the Kasa app, or get a list of your plugs using `getPlugs()`).

Then just call `$plug->setState(bool)` with `true` for *on*, and `false` for *off*. (You can get the current state of the plug's relay using the `status` property of each `Plug`).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2484d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9db8acda212740c63090beab8438300c1e158e824a9642fa49babef315136c4c?d=identicon)[guym4c](/maintainers/guym4c)

---

Top Contributors

[![guym4c](https://avatars.githubusercontent.com/u/2103489?v=4)](https://github.com/guym4c "guym4c (8 commits)")

---

Tags

apiclienttp-linkkasa

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guym4c-kasa-plug-client/health.svg)

```
[![Health](https://phpackages.com/badges/guym4c-kasa-plug-client/health.svg)](https://phpackages.com/packages/guym4c-kasa-plug-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[markrogoyski/numverify-api-client-php

Numverify API Client for PHP

1220.9k](/packages/markrogoyski-numverify-api-client-php)[bornfight/erste-bank-client

Client written in PHP for Erste Bank API

106.1k](/packages/bornfight-erste-bank-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
