TP-Link Cloud connect (working)

Dave has officially updated this to work with hubitat. Here is a link

https://github.com/DaveGut/Cloud-Based_TP-Link-to-Hubitat-Integration

I am having trouble making this work guys. Can anyone help? I have managed to get passed all error messages. The app now gets to the choose device page and shows 0 devices to choose from.

I think the issue is happening here, the post request seems to return all the proper information. I can log the results from the variables right up to the "return currentDevices"

t

I believe the above code should be passing its data here. However trying to log the variables produces null. I do not know how to modify this to get the data to pass. Anyone can offer some help.

I finally made this work - In the end the answer was actually quite simple. I will try and figure out how to put it on github if anyone is interested.

Now I think I may look at the local only solution.

did you finally manage to integrate tp-link devices?

Yes I managed to get the cloud based stuff working.

The hub based stuff is kicking my butt. Having trouble getting a header to parse properly and it stops the whole thing.

If you want the code for the cloud based pm me.

I would like to have it but only when it is functional. I do not have the skills to help you finish it. :frowning_face:

1 Like

I am working on the entire TP-Link product line and should have the cloud based version posted on GitHub today - thanks to Chris. I have to go through each of the drivers (six total) and installation application to eliminate all errors and assure all is working as advertised.

Hub based will take a little longer - but once I figure the key, it will go fast.

Dave Gutheinz

2 Likes

BOTH VERSIONS NOW COMPLETE. New Hubitat Link

2 Likes

Sorry, Im a noob at this stuff, how do I import this to the hub?

I got mine yesterday noon, so a noob also.

Go to the Hubitat Environment Page. For the application, select Aps Code. Select New App (right top area). Copy the app file text into the area and select save.

Now go to the Drivers Code. Select New. Copy the text of any driver you need (i.e,, the driver for the TP-Link Plug-Swith. Select save.

You will then run the smart app which will guide you through the installation process.

Great news. Looks much prettier than what I did to make it work. Now I just wish I could figure out the hub version. Seems hubitat is returning a slightly different response on one of the headers. I can't wait to see what it takes to make it work.

I am working it right now. Looking for the "key" to id the comms. May take a few days.

hey, thanks for the response! Still figuring this stuff out. I tired Vera out and really liked the interface in terms of ease of use, but as a platform was really unstable. OpenHab has some promise too and these tp-links works pretty straight forward with it. Im tempted to get hoomseer as its 50% off right now, but loved the Hubitat story and couldnt resist being an early adopter.

Got it working, thanks! Was confused about Service Manager and Device Handlers, but when drilling through the folders it made sense...Im techincal, just not a dev guy :slight_smile: , which great work by the way to the creator of this.

I have now completed both Hub and Cloud integration. To reduce search space within Hubitat, I have created the following Hubitat Link:

1 Like

I just installed this and it seemed to work like a charm. I'm a little disappointed that the app doesn't receive status pushes but, I can fix that by running the automations through ONLY Hubitat (Disconnecting Kasa from Google). I just have commitment issues, so, for now I just increased the polling to 15 minutes for my bulbs.

One REALLY minor thing I noticed when it was importing my KL50 bulbs, that I thought I'd let you know about.... When it pulled the device from Kasa, there was a trailing "(" after the device (so, the device type it pulled was "KL50(". Not sure where the "(" is coming from, as it doesn't show up that way in the Kasa App....

The fix was easy.. I just edited the device name, so, it's really minor. If people had a LOT of bulbs (I only had 5), it could be tedious to correct. Just thought I'd let you know the next time you are poking around in the code...

Thanks again for creating this.... It's awesome!

Welcome and thanks for the information. The "{" is a laziness on my part in parsing the name to identify the driver. I needed a name to do a lookup on the driver and the KL60 and KL50 are the only devices without 5 characters in the name. I may fix (if possible) in the next version.

1 Like