PHP-based toolset to programmatically control TP-Link Smart Plugs.
Model | Type |
---|---|
HS100 | Plug |
- Run
composer install
to install dependencies. - Copy or rename
config.sensitive_passwords.BLANK.php
toconfig.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
andTPLINK_CLOUD_PASSWORD
are what you use to sign into the Kasa app.
$ php -f ./get_devices.php
$ php -f ./command_device.php -- --device=__32_HEX_DEVICE_ID__ --action=turn_on
$ php -f ./command_device.php -- --device=__32_HEX_DEVICE_ID__ --action=turn_off
Thanks to Alex D. from IT Nerd Space, plasticrake/tplink-smarthome-api, and the Guzzle team