[RELEASE] TP-Link Plug, Switch, and Bulb integration

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.

The devices (HS100, HS103, HS210 and HS220) use the exact same driver.

Could you turn on debug logging, turn on and off, then post the HS210 logs here. Also, after changing, select events from the device detail page and copy the last 10 or so events (as image) here. Will allow me to see if the driver has some hiccup in it.

Dave

Also, make sure you have the latest driver from gitHub. The HS210 may be busy when the refresh is sent and not replying. The newer driver has error handling for that case.

Dave

I updated the driver today. You can see in the logs below.
Summary...
1st Test: Turned on the switch using HE at 2:21:27. Switch showed "ON" at 2:21:35. 8sec delay
2nd Test: Turned off the switch using HE at 2:21:43. Switch showed "OFF" at 2:26:35. 5min delay
3rd Test: Turned on the switch using the actual switch on the wall at 2:27. Switch showed "ON" at 2:31:35. 5min delay
4th Test: Turned off the switch using the actual switch on the wall at 2:32. Switch showed "OFF" at 2:36:35. 5min delay

dev:2922019-10-09 02:36:35.446 pm info Stairs 4.5.10 Switch: off

dev:2922019-10-09 02:36:35.441 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-33, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:36:35.105 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:36:35.091 pm debug Stairs 4.5.10 refresh

[[[ Physically turned OFF the device at 2:32]]]

dev:2922019-10-09 02:31:35.487 pm info Stairs 4.5.10 Switch: on

dev:2922019-10-09 02:31:35.482 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-33, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:284, feature:TIM, relay_state:1, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:31:35.105 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:31:35.090 pm debug Stairs 4.5.10 refresh

[[[ Physically turned ON the device at 2:27]]]

dev:2922019-10-09 02:26:35.595 pm info Stairs 4.5.10 Switch: off

dev:2922019-10-09 02:26:35.590 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-33, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:26:35.126 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:26:35.112 pm debug Stairs 4.5.10 refresh

dev:2922019-10-09 02:21:44.234 pm info Stairs 4.5.10 Switch: on

dev:2922019-10-09 02:21:44.229 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-32, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:16, feature:TIM, relay_state:1, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:21:43.835 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"set_relay_state":{"state":0}},"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:21:43.817 pm debug Stairs 4.5.10 off

dev:2922019-10-09 02:21:35.469 pm info Stairs 4.5.10 Switch: on

dev:2922019-10-09 02:21:35.464 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-32, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:7, feature:TIM, relay_state:1, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:21:35.125 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:21:35.111 pm debug Stairs 4.5.10 refresh

dev:2922019-10-09 02:21:27.769 pm info Stairs 4.5.10 Switch: off

dev:2922019-10-09 02:21:27.764 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-32, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:21:27.347 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"set_relay_state":{"state":1}},"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:21:27.327 pm debug Stairs 4.5.10 on

dev:2922019-10-09 02:21:24.378 pm info Stairs 4.5.10 Switch: off

dev:2922019-10-09 02:21:24.373 pm debug Stairs 4.5.10 commandResponse: status = [system:[get_sysinfo:[dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-33, latitude_i:397741, err_code:0, longitude_i:-1047512, deviceId:8006C1A110AD328E244E86EB28396A9419FB63C9, mac:AC:84:C6:38:3B:09, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairs, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.6 Build 181210 Rel.091146]]]

dev:2922019-10-09 02:21:24.000 pm debug Stairs 4.5.10 sendCmd: command = {"system":{"get_sysinfo":{}}} // device IP = 192.168.1.12, action = commandResponse

dev:2922019-10-09 02:21:23.985 pm debug Stairs 4.5.10 refresh

Initial thought - device is taking about 1/2 second to turn on. Returned state is still off. (coordination time with second switch?)

will research tomorrow. I think this is good data. I will probably have an updated driver for you to test. I may have to slow down my driver to accommodate this switch.

Hi @djgutheinz,
I just reinstalled my home network (new broadband), and reset everything from routers, modems etc. As part of that, went through Hubitat to update my systems, as my bulbs no longer worked. I assumed this was because IP addresses did change (new router caused this), so went to reinstall the newest version of your App (4.5)
All of my TPLink devices are found, except for 2, and they are both the LB120 bulbs.

Is there any possibility that there is something in the detection of the LB120 bulbs that differs from all the other bulb types/switch types (I have LB100, LB130, and HS110 all which detect) .

I've never had problems with this app before. NOTE: the devices are all visible on my router, and they all work fine with the Kaza App. I can confirm that the IP addresses of all the detected devices match the router's indications also (no out of date IP addresses)

Any assistance would be appreciated!

The LB120 and 130 use the exact same controller, wifi hardware, and firmware, so there should be no problem.

Attempt:

  • Open the Kasa App on your phone.
  • See if you can see and control your "missing" LB130.
  • If not, reset the devices and reinstall into the Kasa App (to set IP address).

I had a similar router change out and had to reinstall two devices into the Kasa Account. They did not follow to the new router.

Thanks Dave. Had to remove and replace them in the App twice (even though they were working in the App), but then they finally showed up. Thank you!!

@djgutheinz

Dave - updated to latest app/driver code for everything. Now getting this error on the HS100(US) plug using the TP-Link Plug-Switch:

dev:3392019-10-11 04:06:03.399 pm errorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 220 (commandResponse)

After an update, run Preferences on each device. This updates and enables some variables; including shortPoll.

After I get back home (2 weeks), I will look for ways to preclude this on the next release.

1 Like