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.

Helmar
  • 8,430
  • 6
  • 35
  • 84
joe
  • 261
  • 2
  • 2
  • 1
    Why do you need them to be officially supported by TP-Link if they work? – hardillb Apr 03 '18 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 '18 at 04: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. – anonymousaga Mar 01 '22 at 00:58

1 Answers1

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.

hardillb
  • 12,553
  • 1
  • 20
  • 34
  • 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 '18 at 04:38