donwilson / tplink-api-php

PHP-based toolset to programmatically control TP-Link Smart Plugs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tplink-api-php

PHP-based toolset to programmatically control TP-Link Smart Plugs.

Supported Devices

Model Type
HS100 Plug

Getting Started

  1. Run composer install to install dependencies.
  2. Copy or rename config.sensitive_passwords.BLANK.php to config.sensitive_passwords.php and fill in values. TPLINK_TERMID is just a random UUID4 string used to identify this little app, generate one here. TPLINK_CLOUD_USERNAME and TPLINK_CLOUD_PASSWORD are what you use to sign into the Kasa app.

Examples

Get list of devices

$ php -f ./get_devices.php

Turn on a device

$ php -f ./command_device.php -- --device=__32_HEX_DEVICE_ID__ --action=turn_on

Turn off a device

$ php -f ./command_device.php -- --device=__32_HEX_DEVICE_ID__ --action=turn_off

Credits

Thanks to Alex D. from IT Nerd Space, plasticrake/tplink-smarthome-api, and the Guzzle team

About

PHP-based toolset to programmatically control TP-Link Smart Plugs


Languages

Language:PHP 100.0%