[DEPRECATED] Kasa Plug, Switch, and Bulb integration

Need Volunteer for HS220 testing.

One item missing from the HS220 driver is the ability to set a transition on/off time to gently turn on and off the device. I am looking for a volunteer with a HS200 to test an implementation of a transition time for the dimmer. I will provide a link to test code and test instructions that will NOT impact your current installation.

Hi Dave,

Thanks for all of your work. I realize you have other things you could be doing with your time and I appreciate the donations of time and experience you've made to get the app and drivers developed not to mention the extra time to debug and support them.

I updated the app and the driver, deleted the existing device, and installed a new device using the app. Unfortunately, I'm still having trouble with the power state updating even though the pwrResponse returns an energy value. Any thoughts?

Logs follow:

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.333 am [info](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** Power is 0 Watts.

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.325 am [debug](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** powerResponse: cmdResponse = [emeter:[get_realtime:[current:0.137164, total:0.473000, err_code:0, power:1.837040, voltage:123.339750]]]

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.220 am [debug](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** sendCmd: command = {"emeter":{"get_realtime":{}}} // device IP = 10.0.10.19, action = powerResponse

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.218 am [info](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** Power: on

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.214 am [debug](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** refreshResponse: status = [dev_name:Wi-Fi Smart Plug With Energy Monitoring, hw_ver:1.0, rssi:-65, latitude:42., err_code:0, type:IOT.SMARTPLUGSWITCH, deviceId:8006C6AD0B18DD184F25C95D49FFD628173504D6, mac:50:C7:BF:01:EE:E5, icon_hash:, active_mode:schedule, updating:0, led_off:0, on_time:259, feature:TIM:ENE, relay_state:1, oemId:FFF22CFF774A0B89F7624BFC6F50D5DE, alias:energy plug, model:HS110(US), hwId:60FF6B258734EA6880E186F8C96DDC61, fwId:00000000000000000000000000000000, sw_ver:1.2.5 Build 171206 Rel.085954, longitude:-83.]

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.096 am [debug](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** sendCmd: command = {"system" :{"get_sysinfo" :{}}} // device IP = 10.0.10.19, action = commandResponse

[dev:263](http://10.0.10.220/logs/past#dev263)2019-09-30 11:24:37.090 am [debug](http://10.0.10.220/device/edit/263) **energy plug 4.5.01** refresh

Thank you!

1 Like

Jason,
Thanks for reporting the error. I have updated the driver. The url for either copy or import is:

https://raw.githubusercontent.com/DaveGut/Hubitat-TP-Link-Integration/master/DeviceDrivers/TP-LinkEM-Plug(Hubitat).groovy

Please report on failure or success.

Dave

Dave,

I'm happy to report a success - it works exactly as designed! Thanks for your hard work!

Jason

Thanks for the updates. I've just updated and it's all working well. I like the bolding in the logs as well, and you can be sure that I'll be utilising that little gem. I've not seen it in any logs before.

Is it possible to get the retry count increased to at least 5? With some of the most recent updates, I've started to get the setCommsError: Parent commanded to poll for devices to correct error. warning, which results in a flood of warning messages as the parent app searches for devices. The previous retry limit of 5 seemed to work a majority of the time.

Another option would be to make the retry count a configurable option.

Updated to allow 6 retries. I also increased the command time-out. I am interested in the TP-Link devices you have installed. Can you provide
Device Type (i.e., HS100)
Number of each device type
Devices you are seeing commands repeated.

Dave

I have 4 HS105s and 1 HS300. I looked through my logs, and it looks like every single one of them has had to retry connections at least once in the past 1-2 days. The HS300 has to retry far more frequently (and each occurrence requires more retries before success) than the HS105s.

1 Like

let me know if the update works.

Installing my second TP-Link Multiplug. I've added the plug to the KASA app and am now running the TP-Link app and I the HE app cannot find any new devices.

This happened with my first TP-Link Multiplug and I cannot recall exactly what I did to make it work.

Anyone?

Found an error in the application and updated today. Assure you have updated the drivers and app to latest version.

It fixed Itself. I guess the hub needed time to find the IP address.

Looks like the update is working for me. Thanks!

Can you check the drivers again? I think the driver for the TP-Link Multi Plug and the TP-Link Plug-Switch are the same driver. I got HE to find my devices but when I go to add the devices my log indicates I am missing the driver.

2019-10-08 07:45:29.737 pm [warn](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Failed to install Holiday 2. Driver TP-Link Multi-Plug most likely not installed.

[app:4162](http://192.168.7.57/logs#app4162)2019-10-08 07:45:29.734 pm [info](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Adding device: TP-Link Multi-Plug / Holiday 2.

To reduce maintenance time, I reduced the number of drivers and types. To avoid confusion, I kept the same eight gitHub file names but the driver name will change. This does not impact currently installed devices, but to install new devices you need the new drivers. The following devices have new types (but same function).

Multiplug now uses the combined plug-switch type.
Energy monitor Multiplug now uses the combined Energy Monitor Plug type.

There were other changes, but for those, the types did not change.

Ok then I am more perplexed. I have two (2) TP-Link Outdoor Multi-Plug switches. I installed the first plug about 3 months ago and it works fine with version 4.3. I updated the drivers and app to version 4.5.

I have now added a second TP-Link Outdoor Multi-Plug switch. The HE app recognizes the existence of the multi-plug, but when I go to add the device and hit 'Done' I receive the following log and the device does not add.

2019-10-09 06:41:12.179 am [warn](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Failed to install Holiday 2. Driver TP-Link Multi-Plug most likely not installed.

[app:4162](http://192.168.7.57/logs#app4162)2019-10-09 06:41:12.175 am [info](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Adding device: TP-Link Multi-Plug / Holiday 2.

It is as if the app is looking for the Mule-Plug driver and it is not there. However, it must be there because I am using it for the other TP-Link device.

Read up one post. Your posts probably crossed.

I read his post and there seems to be an issue. I've installed all the 4.5 drivers from the GitHub repository.

Nonetheless, when I try to add my new Multi-Switch Plug, I receive the following error:

[app:4162](http://192.168.7.57/logs#app4162)2019-10-09 06:56:42.412 am [warn](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Failed to install Holiday 2. Driver TP-Link Multi-Plug most likely not installed.

[app:4162](http://192.168.7.57/logs#app4162)2019-10-09 06:56:42.408 am [info](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Adding device: TP-Link Multi-Plug / Holiday 2.

[app:4162](http://192.168.7.57/logs#app4162)2019-10-09 06:56:42.405 am [warn](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Failed to install Holiday 1. Driver TP-Link Multi-Plug most likely not installed.

[app:4162](http://192.168.7.57/logs#app4162)2019-10-09 06:56:42.386 am [info](http://192.168.7.57/installedapp/configure/4162) **4.5.01** Adding device: TP-Link Multi-Plug / Holiday 1.

I've deleted/overwritten the old (version 4.3) multi-plug driver and cannot find it in the repository. Therefore, having installed all the drivers and still receiving this message, I am stuck.

..... and it works! :slight_smile: Thank You!

I've tried to scroll threw and find an answer so I apologize if I missed it. I just went through and updated the app and all drivers. My plugs (HS100 and HS103) are working great! Also, my HS200 switches and HS220 dimmers are working wonderfully too.

The problem I'm having is my 3-way HS210 switches. When I control it from HE, the command is sent and action is performed, but the state of the switch doesn't change until the device refresh interval. If I change the refresh interval to "5", then turn the switch from off to on... it takes up to 5 minutes for the switch to show the correct state. Am I doing something wrong with my HS210?? All my other switches and plugs updates their status correctly once the action is sent. I don't get it.