[DEPRECATED] Kasa Plug, Switch, and Bulb integration

Changed the first letter for poll & refresh to UPPERCASE - Poll, Refresh
Made no difference - still doesn't show up as a device with that capability to pick it.

Out of interest I did just try something simple, as trying to select it as a switch for an on/off command in RM, and it DOES show up...


Sorry - missed something the first time I looked...

Change you driver code as follows:

metadata {
definition (name: "(Hub) TP-Link Plug-Switch",
namespace: "davegut",
author: "Dave Gutheinz") {
capability "Switch"
capability "Sensor"
capability "Actuator"
capability "Refresh"
capability "Poll"

Note that I changed the word 'command' to 'capability' as this is what lets other apps know what capabilities are supported.

1 Like

@ogiewon Dan, changed the code as suggested. Got an error:


Changed line 35 to capability "Polling" - the allowed me to save the driver successfully [looked at some of the other drivers I had]

In RM the device is now showing up in the "Refresh and Poll" listing, but still not in the "Poll these devices" listing. I do not claim to understand the magic at all. However, I can now refresh it in RM, making me a happy camper.


1 Like

Try "Polling" instead of "Poll"

Sorry about that... working from memory

Will fix on next release.


Will you be able to update the drivers to accomodate the new scenes capabilities? In this thread I am having issues with the TP-Link bulb driver not providing the correct events and attributes. Reference this thread for the context:

Is that a custom driver you are using for TP-Link bulb?

It is DaveGut's TPLink he ported over from ST. I don't believe HE natively supports WiFi Color Bulbs like TP-Link.

Yes, we don't have that driver. Your problem is probably with that driver. I think @mike.maxwell addressed that issue in the other thread. This has nothing to do with Groups and Scenes, other than that this app expects color bulbs to conform to the standard Mike pointed to.

I agree completely. Asking developer @djgutheinz what he might be able to do to the driver to conform to HE standards.

Here are the examples @mike.maxwell was mentioning to me.

Driver code samples


What is the upgrade path from current driver/app scenario? Do I have to recreate devices?

Excellent job! Though the naming change of the app totally freaked me out as I am looking for TP-Link not Hubitat TP-Link lol!

Hi Dave (@djgutheinz)

Thanks for your fine work!!

I previously had a functional Node config running on a Pi with 2 TP-Link HS105 devices using TP-LinkHub_v2.js

  • Updated the *_v2.js file to *_v3.js
  • Updated TP-Link Plug-Switch (Hubitat).groovy
  • Added TP-Link Hubitat Manager.groovy

Initially got this error in the Hubitat TP-Link/Kasa Manager log

Restarted the PI & then got this; ALL OK!!!


As both devices were already there & functional, I deleted 1 device.

I also updated the following in the remaining plug:


In theory the Hubitat TP-Link/Kasa Manager should now discover the plug I deleted from the system earlier... However, it just sits at this screen & never discovers anything:


I am also now getting this error:


I am sure this error is because the node server crashed and that a restart will fix it, but I am also sure the crash will happen again...


Restarted the Pi, was OK for a short while & back to the error state:



Had to update all my devices with installation type but all is working and migrated. Now to look at you local json implementation as I do have a dedicated Pi3 for the home.

Are the devices working? Indications from the last message is the node.js applet was not running at the time. For PCs, I use a bat file that restarts the node when it stops for an error; however, there may be an untrapped error that is causing the crash on the pi3.


Yup I am good

I have been using the local node server since @djgutheinz released it for hubitat It has been rock solid for me.

1 Like

HS107 and HS300 now supported

Added support to HS107 and HS300. One issue. For Hub (Node Applet) installation, the user must manually update the label after installation. A temporary label is created on initial installation. (I am working on this shortfall.)

Just updated the Node Applet to eliminate an error while polling for devices. It was crashing on a socket close. Added a "try" routine to preclude crash. Applet available on the new GitHub link.