8

I have a TP-Link LB120 bulb and configured with Kasa app. Now I able to control the bulb using Kasa app. Like turn on, off, change the colour of the light etc. So I need to set up the same things via an API. So let me know TP-Link provides any API support for controlling the light operations. I have found some node modules, but I don't know whether the modules are officially published by TP-Link.

3
  • 1
    Why do you need them to be officially supported by TP-Link if they work?
    – hardillb
    Apr 3, 2018 at 19:11
  • There is no documentation. So by using this NPM we can get an access token by passing the account credentials. How do I know the expiry time of the access token? If we have a perfect documentation, we don't block with these type of scenarios. This is just an example. Also how long these APIs are work?
    – joe
    Apr 17, 2018 at 4:17
  • hubitat has had an unofficial cloud & local integration for kasa that uses a cloud or local API (reverse engineered). you can check them out on the hubitat forum. Mar 1, 2022 at 0:58

1 Answer 1

3

A really quick google (tp-link bulb api) turns up a npm module that claims support: https://www.npmjs.com/package/tplink-lightbulb

They are unlikely to be officially supported by given there is discusion of reverse engineering the protocol, it even includes a wireshark plugin to help decode the network protocol.

The only way to get a definitive answer will be to ask tp-link directly (or find the documentation on their website)

If on the other hand you are asking for support for things like Alexa/Google Home then a quick search of the Alexa skill catalogue shows a TP-Link Kasa skill and a similarly named entry in the Google Home list.

1
  • Anyway, I have integrated my TP-Link light into my app and able to control the lights via an API called 'tplink-cloud-api'. This is an un-official npm. Actually, I don't know how long it should work.
    – joe
    Jul 24, 2018 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.