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

One more attempt. Go to My Devices on the IDE.

Is the Device there?? If so, select the device by clicking on the name under “Display Name”

Copy that text information and paste herein (deleting the deviceID ).

If the device is there, the the device is installing. Trying to re-install will be fruitless.

If not, there is one more thing to try to get information:

a. Log onto the IDE and your location. At the top, select live logging. Rerun installation (again, I know). Look for ANY error messages from the Phone AP.

b. When you have exited the install on the phone App, there will be a list of log devices/ apps at the top of the IDE Live Logging page. Copy the log entries and paste here. Below is an example with errors:

 3d5b5593-d93d-4ac9-bd6b-37af991999a6 9:24:54 AM: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type 'TP-LinkHS-Series' in namespace 'beta' not found.
3d5b5593-d93d-4ac9-bd6b-37af991999a6 9:24:37 AM: info Device Left Speaker Power added to devices array

Here ya go - seem like there are some errors - TP-Link is not showing in My Devices by the way :image
There is some additional info in there from an app that changes the color of led light elsewhere in the house.

Good evening.

I have followed the instructions to add HS100 and HS110 smart plugs to my SmartThings setup, using the Cloud option. This worked fine initially but I encounter problems when my router resets following its daily scheduled reboot. Once this has occurred, the status of these devices in the SmartThings app is ‘Comms Error’.

The way I have fixed the above errors is to switch the ‘remote control’ settings for each device in the Kasa app to off, then on. This seems to fix the problem (although I can’t switch these options on to ‘on’ unless I’m on the same Wi-Fi network).

Thanks in advance for any help!

That error message is not in my code. It is from SmartThings and indicates that during the install process a comms check with the handler failed.

What the log does show is that the Service Manager is detecting your plug, just not installing! There is something wrong with the Device Handler, as installed (seen some errors in past due to copy/paste errors into IDE, has to do with the manual process, not the code). Suggest complete reinstall from the first step. Some checkpoints:

After installing the Device Handler, confirm installation on the My Device Handler page. Must be as below. (YES/NO).
beta : TP-LinkHS-Series Published Actuator, Polling, Refresh, Sensor, Switch

After installing the Service Manager, confirm installation on the My SmartAps page. Must be as below.
beta : TP-Link (unofficial) Connect Published SmartThings Labs

Before running the Smart App, turn on Live Logging.

NOTE ANY ERRORS during installation by the Service Manager. Particularly any BANNERS at the top of the page. Run install again. Report errors.

My device handler does not talk directly to the TP-Link devices. The condition (not error, but design) is caused by the Kasa server refresh cycle with the devices and the fact that the device IPs are changing (I believe). It should self-correct after several minutes (I do not know the Kasa cloud refresh cycle).

Possible work-around: Using your router, assign static IP addresses to the devices. In my TP-Link router, this involves reserving IP addresses in the DHCP services. Otherwise, wait 5 or so minutes and Kasa should be updating.

Side note: make sure your device firmware is up to date. Some early versions had problems.

Will do - thanks for all of your help!!

Did some more checking on the error. See below for some previous info (you can also search the forums for the error.
The conclusion from this message is the device and hub are not on the same network segment (this sometimes happens). Check your network and assure that the device is not on a private subnetwork.

The below is for another device. Three posts.

Running 3.8.5 of the NVR (it’s a new install). Created the SmartApp and Device Handler and publish just fine. However when I go to the SmartThings App and add as automation it never asks for username or password. Below is all I see in the IDE logs. I’m using the ShieldTV version of the bug but it’s on the same LAN as NVR and verified 7080 port is open.
Thoughts?

6f0830f8-11d0-4ecf-9350-9f7e23c84a9d 12:51:57 PM: trace getPhrases(), state.welcomeIssue = null
5432c435-56b8-4850-967c-118c78d58026 12:51:56 PM: error UniFi NVR DOES NOT RESPOND TO UPDATED HANDLER
5432c435-56b8-4850-967c-118c78d58026 12:51:55 PM: error UniFi NVR DOES NOT RESPOND TO INSTALLED HANDLER

James V

`

`

@jsenior , in this case it means the call to login was never successful. This usually indicates the IP address or port is incorrect or that the hub is not on the same /24 network as the NVR. If your NVR is on 10.22.10.0/24, is your hub as well?

@jmvaughan2, this is not an error message that my code generates. This is strange since the code does implement both installed() and updated(). Are you able to go into Automation -> Smart Apps -> Unifi NVR and see the settings screen?

Deleted the SmarApp and Device Handler then re-added and now it works.

And it works! Not sure what the issues was but reinstalling it did the trick and it is responding to commands for the app! Thanks for your help!!!

1 Like

Great. A lesson learned for me.

Hi Dave,

I thought I’d give you an update on the little error I was getting recently.

Out of nowhere it’s completely disappeared and I’ve not changed anything whatsoever…

Samsung did apologise to me for the time it was taking them to resolve it and they’d escalated my case. Other than that, 2 days ago the errors have vanished. Incidentally they haven’t informed me that they’ve fixed it, or otherwise.

Needless to say however despite them telling me it was likely to be your smart app, it would appear it wasn’t.

So thanks for all your help previously :slight_smile:

1 Like

Why are you rebooting the router daily?

I worked in IT for more than a decade, and am still connected to them in ancillary fashion. I’ve never seen a business organization perform daily router reboot, and these are companies that are completely reliant on system performance and uptime… I would try not rebooting each day, and see how things go.

For other SmartApps I’ve been able to add the Github repository to SmartThings IDE so that every time there is up update to the code, all I have to do is update from GitHub instead of manually copying and pasting the source code from the website. Is this possible? I tried adding the repository but I don’t see anything available for me to install from the repo.

Thanks for your contributions btw.

Likewise. I just came here to ask the same question. Cant add the repository to the IDE so I can update straight from github

I have not set the repository up to the IDE yet. Something else to learn and these old brain cells are kind of slow.

New to home automation and new to Smart Things. Just bought a bunch of TP-Link outlets on great black friday sale and then discovered they didn’t work with Smart Things hub. Came here and found this. After a little orientation issues to get the hub created, I was able to follow the instructions and it appears to be working… loving seeing all those outlets in Smart Things. Thanks for building this!

1 Like

Yes thank you. Works great.

1 Like

Just set the cloud based option for this up on a HS100 and it worked perfectly first time! Massive thanks!

The Echo Dot with the TP-link outlet for $35, with free shipping, was hands-down the best deal available over the past couple weeks. Only thing was you had to do each pair as a separate purchase… no biggie.

I got two. Giving one of the Dots away as a gift. Had I been at the same place now as I was last year, I’d have done five of those deals. It’s like for $175, you get an instant smart house.

They are very smart. So smart that my Echo Dot is demanding we go to couples communications counseling. I think she is having an affair with my WiFi Thermostat.

2 Likes

Thanks a ton, this is really helpful.