Skip to content

donwilson/tplink-api-php

Repository files navigation

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

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages