PHPackages                             kuhschnappel/tapo-api - 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. kuhschnappel/tapo-api

ActiveLibrary[API Development](/categories/api)

kuhschnappel/tapo-api
=====================

API Connector to access Smart Home Data from Tapo Devices

v2.1.0(3y ago)20153proprietaryPHP

Since Mar 2Pushed 3y ago2 watchersCompare

[ Source](https://github.com/kuhschnappel/tapo-api)[ Packagist](https://packagist.org/packages/kuhschnappel/tapo-api)[ RSS](/packages/kuhschnappel-tapo-api/feed)WikiDiscussions master Synced 1mo ago

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

Kuhschnappel TapoApi for P100 &amp; P110 Devices
================================================

[](#kuhschnappel-tapoapi-for-p100--p110-devices)

This interface was developed primarily to pick up consumption data with PHP from the TP-Link TapoP110 sockets.

Usage
-----

[](#usage)

### Communicatio with all Tapo Devices

[](#communicatio-with-all-tapo-devices)

#### create an new connection

[](#create-an-new-connection)

```
$device = new Tapo('email', 'password', 'http://192.168.xxx.xxx');
$device = new Tapo('email', 'password', 'http://192.168.xxx.xxx:port');
$device = new Tapo('email', 'password', 'http://dyndns.tld:port');

```

#### Send multiple changes to device with one command

[](#send-multiple-changes-to-device-with-one-command)

```
$device->sendChangedSettings();

```

#### device name

[](#device-name)

```
$device->getName();
$device->setName('Gerätename')

```

#### device location

[](#device-location)

```
$device->getLongitude()
$device->getLatitude()
$device->setLongitude(12.00000)
$device->setLatitude(50.000000)

```

#### get device informations

[](#get-device-informations)

```
$device->getInfo();

```

=&gt;

```
stdClass Object (
    [device_id] => 8022DFC785E6EC92987142C17FD2E06420996XXX
    [fw_ver] => 1.1.6 Build 221114 Rel.203339
    [hw_ver] => 1.0
    [type] => SMART.TAPOPLUG
    [model] => P110
    [mac] => AC-15-A2-E4-4B-13
    [hw_id] => 2FB30EF5BF920C44099401D396C6BXXX
    [fw_id] => 00000000000000000000000000000000
    [oem_id] => 18BDC6C734AF8407B3EF871EACFCECXXX
    [ip] => 192.168.5.103
    [time_diff] => 60
    [ssid] => XXX (base64 encoded string)
    [rssi] => -50
    [signal_level] => 2
    [latitude] => 0
    [longitude] => 0
    [lang] => de_DE
    [avatar] => plug
    [region] => Europe/Berlin
    [specs] =>
    [nickname] => XXX (base64 encoded string)
    [has_set_location_info] =>
    [device_on] => 1
    [on_time] => 3390611
    [default_states] => stdClass Object (
        [type] => last_states
        [state] => stdClass Object (
        )
    )
    [overheated] =>
    [power_protection_status] => normal
)

```

### TapoPlug Devices

[](#tapoplug-devices)

#### Power On/Off

[](#power-onoff)

```
$device->getPower() => false / true;
$device->setPowerOn();
$device->setPowerOff();
$device->setPower(false / true);

```

### Change some settings &amp; send it to your Tapo Device

[](#change-some-settings--send-it-to-your-tapo-device)

```
$device->setAvatar(TAPO::AVATAR_PLUG)
       ->setLongitude(12.00000)
       ->setLatitude(12.00000)
       ->setPowerOn()
       ->sendChangedSettings();

```

or

```
$device->setAvatar(TAPO::AVATAR_PLUG)
$device->setLongitude(12.00000);
$device->setLatitude(12.00000);
$device->setPowerOn();
$device->sendChangedSettings();

```

### TapoPlug P110 Devices

[](#tapoplug-p110-devices)

#### Energy usage

[](#energy-usage)

```
$device->getEnergyUsage();

```

=&gt;

```
    [today_runtime] => 1002
    [month_runtime] => 37002
    [today_energy] => 1224
    [month_energy] => 39851
    [local_time] => 2023-02-26 16:42:17
    [electricity_charge] => Array (
        [0] => 0
        [1] => 6422
        [2] => 11945
    )
    [current_power] => 118314 // in milliwat
)

```

#### Energy usage (get an array with timestamp and consumptions for last days)

[](#energy-usage-get-an-array-with-timestamp-and-consumptions-for-last-days)

```
$device->getEnergyData();

```

=&gt;

```
Array
(
    [1672527600] => 1233
    [1672614000] => 232
    [1672700400] => 0
    ...
    [1680040800] => 9999
    [1680127200] => 0
    [1680213600] => 0
)

```

Support
-------

[](#support)

If you would like to support the project, please consider buying me a coffee.

[![Buy Me A Coffee](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/kuhschnappel)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.4% 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

Every ~6 days

Total

5

Last Release

1140d ago

Major Versions

v1.1.1 → v2.0.02023-03-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/1227c5923e25b667166ac02c6bc9397144d40e80c1f7e77d5be4ce15205706ec?d=identicon)[kuhschnappel](/maintainers/kuhschnappel)

---

Top Contributors

[![kuhschnappel](https://avatars.githubusercontent.com/u/17731710?v=4)](https://github.com/kuhschnappel "kuhschnappel (11 commits)")[![tk-mikezimmer](https://avatars.githubusercontent.com/u/113974006?v=4)](https://github.com/tk-mikezimmer "tk-mikezimmer (10 commits)")

### Embed Badge

![Health badge](/badges/kuhschnappel-tapo-api/health.svg)

```
[![Health](https://phpackages.com/badges/kuhschnappel-tapo-api/health.svg)](https://phpackages.com/packages/kuhschnappel-tapo-api)
```

###  Alternatives

[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[packbackbooks/lti-1p3-tool

A library used for building IMS-certified LTI 1.3 tool providers in PHP.

51438.3k2](/packages/packbackbooks-lti-1p3-tool)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4048.2k4](/packages/soneso-stellar-php-sdk)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)

PHPackages © 2026

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