Integrate KASA in Tasker, need help with Token and deviceID

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Integrate KASA in Tasker, need help with Token and deviceID

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Integrate KASA in Tasker, need help with Token and deviceID
Integrate KASA in Tasker, need help with Token and deviceID
2019-09-05 21:17:38 - last edited 2020-02-25 01:45:23

So, I'm playing with Tasker and trying to make some mods in my house, just like I use to do with IFTTT.

Let's say the lurning curve is steep, but I've been able to manage some basic formula.

 

With Tasker, I'm now able to get my token ID from tplink website and now my goal is to get my device ID of a switch and a bulb.

The thing is, I enter a formula in the HTTP Shortcut apps as a cURL, but it always say thay my token expired. How long does this token, to identify my app on the cloud, stay "alive"? It seems expired after only 5sec.

 

Also, is there a way to get my device ID an other way?

 

Thank you

My reference:

https://itnerd.space/2017/02/26/control-your-tp-link-hs100-smartplug-with-tasker/

https://itnerd.space/2017/06/19/how-to-authenticate-to-tp-link-cloud-api-with-tasker/

https://itnerd.space/2017/06/19/how-to-authenticate-to-tp-link-cloud-api/

 

Those are all old, but with the steps in those links and comments on the bottom of the page, I managed to create a task that give me my toekn. But each time I press it, it's a new token. Some year's ago, the token was valid for months, so I'm like at a dead end now. I can't find up to date information

  0      
  0      
#1
Options
3 Reply
Re:Integrate KASA in Tasker, need help with Token and deviceID
2020-02-24 21:05:33 - last edited 2020-02-25 01:45:23
Did you ever find a solution. I had e-mail TP-Link support in Feb 2019 and they told me the token changes every month. I was able to create a tasker profile that works pretty well where I start ehe Kasa app, then user tasker plugin Autoinput to 'press' the button for the smart plug in the Kasa app. I also use AutoTools Secure Settings plugin to keep the device alive.
  0  
  0  
#3
Options
Re:Integrate KASA in Tasker, need help with Token and deviceID
2020-04-26 06:52:06

@Whiskcat1 

 

Sorry to bump an old thread but I use ifttt's maker webhooks integration to fire events.

 

I use the ifttt integration in the tasker autoremote plugin (small cost).

 

So 1) create a webhook to fire a kasa event.(called Outsidelightson) 2)Create a task calling autoremote, and pass a message='OutsideLightsOn' to ifttt.

 

Fidliest part of setup is finding your unique key in ifttt webhooks, and copying/pasting to create an autoremote device called ifttt..

 

You can also use curl commands in Windows to touch the URL and send the message/command.

  0  
  0  
#4
Options
Re:Integrate KASA in Tasker, need help with Token and deviceID
2020-04-26 17:48:38

@Noooodlez Seems like going from your phone through the IFTTT cloud via web hooks to the TPLink cloud, then back to your home network to control the device is a bit roundabout...  FWIW if you're looking for easy triggering from a phone you can use the IFTTT button service to trigger IFTTT actions without needing Tasker - IFTTT buttons can be placed on your phone's home screen.

AutomationManager: Secure home automation without relying on cloud servers.
  0  
  0  
#5
Options