TP-Link/Kasa Bulbs and Plugs Control (Old, Unofficial Integration)

Just install cloud base and everything works fine! Great Job Thanks!

Hi everyone! Be gentleā€¦ Iā€™m brand new to SmartThings as of today! :slight_smile:

I have successfully added three Z-Wave devices. The only other device I have that hasnā€™t been added is a TP-Link HS105 Smart Plug. Iā€™m trying to get it up and running but not having any luck. Hereā€™s what Iā€™ve done so far.

  1. Copied the code for (Cloud) TP-Link Plug-Switch.groovy and Created/Published to My Device Handlers.
  2. Status shows ā€œPublishedā€.
  3. I go to my phone and nothing shows up under ā€œMy Appsā€

What am I missing? Thanks so much!

You also have to install the smart app. Please read the instructions at the GitHub link.

1 Like

Thanks Dave! Iā€™ve got it working now. Really appreciate the help. :+1:t2:

One final update. The latest (today) version corrects Energy Monitor statistics for March 1 and 2. On those two days, the program must look back two months (current plus two) vice one to obtain the energy monitor statistics. This required some special logic plus additional parsing code.

@Gutheinz

Any update on making a GitHub integration for simple one click updates on this?

Its resolved now not sure what worked the password or reinstallation.
Thanks

Continuing the discussion from TP-Link Bulbs and Plugs Control:

Hello All,

Iā€™m quite new to SmartThings this so please be kind.

Iā€™ve installed the Cloud Device Handlers and the Smart App (referred to as Service Manager in the .pdf - I assume they are the same thing) in SmartThings. I even registered with TP-Link as per item 3 which I think was a mistake ?!?

Installed TP-Link Cloud Connect in SmartThings on the iPhone via Add a SmartApp - MyAppsā€¦

Entered my Kasa username and password and clicked Initial Install.

The phone doesnā€™t give much away - just a blank screen. Followed eventually by the same enter details screen. I can enter the wrong password with the same results.

The Live Logging screen gives the error:
java.lang.NullPointerException: Cannot get property ā€˜idā€™ on null object @line 227 (getToken)

Iā€™m missing something just canā€™t figure what. I can enter the wrong password with the same results.

I have the latest version of everything installed.

Please help !

Thanks, Peter.

The error indicates that a call for your hub data returned a null. My best guess of the cause is you missed a step in the installation. Specifically, prior to installing the Service Manager (or Device Handler), you needed to select your location right after login and before going to the SmartAps page. If you failed to do this, then the Service Manager (Device Handler) will not be associated with a hub.

Please review the installation instructions in the documentation folder at the GIT HUB site and assure you completed all steps.

Final comment:

I even registered with TP-Link as per item 3 which I think was a mistake ?!?

Item three in the current instructions does not refer registering with Kasa. Assure you are using the correct documentation located at the link below. (The Kasa account is required since this integration goes through the Kasa cloud - using your username/password.)

https://github.com/DaveGut/Cloud-Based_TP-Link-to-SmartThings-Integration/tree/master/Documentation

Shout back if you have further issues.

Dave

I thought I did that on the latest release. Could you check and see if you can access the files via the integration? (Note, I had to change the namespace, so the previous version (before Jan 30, 2018) may not be accessible. I would like to know if it worked (It does for me, but maybe I forgot a step).

I must be blind but I do not see the original post stating the GitHub name/repository/branch and also do not see any posts stating this anywhere either. Can you edit your original post and place GitHub information so others can find. Of course I could be blind and donā€™t see it.

Novice here. Only been doing any coding for 11 months and at 69, maybe I have lost a few brain cells. I am able to access the code in the SmartThings My Device Handler window, using update from Repo function. If you can not do this, then I missed a step and will investigate further.

Yeah I troubleshooted and added your repository to the STE IDE based on your above links to the actual GitHub. The issue is when I click Update from Repo nothing shows up in either the DTH or the SA sections. So something isnā€™t correct.

I have for your GitGub Repository as:

Owner: DaveGut
Name: Cloud-Based_TP-Link-to-SmartThings-Integration
Branch: Master

Will work on it.

1 Like

In case it helps, below is the path to my SmartThings integration. This is where I place finished and tested code via the update on the IDE.

Device Types

SmartAps

@Gutheinz I donā€™t think you have lost any brain cells :grin: I think you have and are doing a sterling job in designing this interface, answering, querying, assisting in troubleshooting and continually enhancing your code as we ask questions from around the globe - its no mean feat.

Well done and once again thank you.

Hello Dave,

Thanks for getting back to me. I think what has confused me (and others)
is the Cloud-Based solution requires that one has a physical Samsung hub
in the local network. As you have a Hub-Based solution the name
Cloud-Based suggests that your magic will happen without the need of the
Samsung SmartThings hub.

As I donā€™t have a hub, I guess your solutions wont work for me (I hope I
am wrong) ?

I was hoping not to have to go the Home Assistant route. I already have
a good half-dozen physical hubs/routers/switches with various software
bridges.

All she wants is to do is say to ā€œAlexa Going to Workā€ and have a
TP-Link switch turn off, a Hive bulb turn on, a two minute delay and the
Hive bulb turn off.

All these things simple on their own, stringing them together is proving
more complex than rocket scienceā€¦

Regards, Peter.

TP Link has an integration with Amazon Alexa. It can be merged with Alexa scenes to do what you want.

Indeed it does, as does Hive. Both work fine on their own. Combining
them both with a delay with one command is the challengeā€¦ Unless you
know otherwise ?!?

IFTTT would be an option if it were IFTTandTandTā€¦

I see the issue now. You forked the SmartThingsPublic from ST. You may want to rename your repository SmartThingsPublic to TPLink and then delete all non TPLink from the sub folders.