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


Sure enough that was it! It is working accordingly. No issues either. Would be nice to have drop down selection verses entering a number. Example: 1.5 does not work. Causes an error. Let me know when you go gold with this driver and I will update accordingly.

[dev:272]( 11:56:40.517 am [info]( Fireplace - Left: Power: off / Brightness: 50% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:60, saturation:100]

[dev:272]( 11:56:40.515 am [info]( - Left color is Azure

[dev:272]( 11:56:40.514 am [info]( - Left Color Mode is RGB

[dev:272]( 11:56:29.069 am [info]( Fireplace - Left: Power: on / Brightness: 50% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:60, saturation:100]

[dev:272]( 11:56:29.068 am [info]( - Left color is Azure

[dev:272]( 11:56:29.063 am [info]( - Left Color Mode is RGB

[dev:272]( 11:56:20.382 am [info]( Fireplace - Left: Power: on / Brightness: 100% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:60, saturation:100]

[dev:272]( 11:56:20.379 am [info]( - Left color is Azure

[dev:272]( 11:56:20.377 am [info]( - Left Color Mode is RGB

[dev:272]( 11:56:09.193 am [info]( Fireplace - Left: Power: on / Brightness: 100% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:60, saturation:100]

[dev:272]( 11:56:09.191 am [info]( - Left color is Azure

[dev:272]( 11:56:09.190 am [info]( - Left Color Mode is RGB

[dev:272]( 11:55:52.861 am [info]( Fireplace - Left: Power: on / Brightness: 75% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:95, saturation:100]

[dev:272]( 11:55:52.858 am [info]( - Left color is Rose

[dev:272]( 11:55:52.856 am [info]( - Left Color Mode is RGB

[dev:272]( 11:55:49.470 am [info]( Fireplace - Left: Power: off / Brightness: 75% / Circadian Mode: normal / Color Temp: 0K / Color: [hue:95, saturation:100]

[dev:272]( 11:55:49.469 am [info]( - Left color is Rose

[dev:272]( 11:55:49.467 am [info]( - Left Color Mode is RGB



Just installed this code to work with my HS100 plugs but I seem to have a problem. I installed the app no problem and then added the one plug I had which shows up as a device. I can control this plug no issues.

I have then added another 2 plugs to the Kasa app and they show up fine. When I go in to the App in Hubitat to add the two new plugs, the new plugs show up in the drop down and I can select the plugs. However when I click "Done" a very quick error message (Unexpected Error) appears momentarily and tells me to check the logs. When I check the logs the only events showing are all " [info] TpLinkToken updated to...".

In the Status window for the device I can see the two new plugs/devices in the "devices" metadata.

I don't know where else to look or check and I don't seem to be able to increase the logging level either.

Any ideas?


I decided to delete the App and re-install it. This time all three plugs were available to select and all three added fine (though I did still get the Unexpected Error message). So it seems that you can add the plugs once when you install the app but you can't add additional plugs once it is installed.


i have tested both scenarios (add all and add one and then rest) without error. Let me work to duplicate the issue.


What App name. There are two out there.


Hubitat TP-Link/Kasa Manager it's v3.5 and was updated 24/11 by you (I think!)




Still have not encountered the problem. I am testing carefully and will get back.


Thanks very much. Anything I can do to help?

I was wondering. When I added the account at the very beginning I only had one plug on it. This worked flawlessly. I then added the other two and couldn't add them through the app. When I deleted the app and re-added it all three plugs were there from the start. I'm wondering if it's a mismatch when you first add the account? i.e. the application can't add plugs unless they're there when you install/add the app.

It might explain why I could only add one plug initially and why it worked for all three when I deleted and reinstalled the app after I'd added all three plugs to Kasa.



I have been able to duplicate the momentary error (Unexpected Error). And while trying to find the problem, I started encountering the devices not adding. Do not know why. I am currently trying to capture the problem issues. We may just have to accept the Unexpected Error (if I can find why on the non-installation).




I am having refresh issues with the new parent/child app. Last night the TP-Link had a communication error with one of my outlet devices which resulted in my rule becoming false and the bedroom lights to go on at 2am while we were sleeping.

Any ideas what might be going on?


Inherited from the platform that shall not be named.

I have coded three potential states for plugs/bulbs: on, off, and offline. Offline is attained when a communications error is received from either the Application (Kasa Account) or the node.js applet. This allows the error to report to the android/IoT interface. Let me experiment and see how the dashboard handles this error. If it does nothing, then I will remove the off-line.

Otherwise: Any automation would have to account for all three. If you have a rule that does not account for this, then what you are seeing is possible.


Are you hub or cloud version? What explicit device is having a problem?

Note: When power is removed from a bulb and then restored (power failure or external switch), the bulb will recover in the on state. (This is true for my Zigbee and TP-Link bulbs). I assume this is to allow for a switched bulb to behave as a normal bulb when the switch is activated (off or on).


I am using cloud currently. In RM I do not account for anything besides if the outlet is on or off. Should I move to node? Will this eliminate the comms error if there was any hiccups on refresh-cloud?


Don't go to the node. It will be the same problem. I will investigate the Hubitat norm for switch status and fix driver accordingly. Will adjust other areas as required.


Initial investigation complete. To keep you informed, I will be modifying the device handlers today to remove the off-line status from the switch state. Will follow-up with a rework to handle device health.


Update 3.5.03. Modified Drivers to eliminate Switch states other than on/off. These may have been causing errors in some routines. Additionally, this conforms the attribute switch to standards.

Recommendation: Not required unless you are encountering errors.


I have updated all handlers. Will let you know as I see stuff. Thanks for everything Dave!


HS110 Energy Monitor Plug

Need Beta Tester. I have ported the HS110 Energy Monitor Plug Driver to Hubitat and need a tester to evaluate (test) the functionality before integrating into the baseline.

Any takers.


I only have a HS100 at the moment. Could be a good excuse to go buy one though :wink:



I am thinking of it also. I have an electric car and would like to see the charging consumption. But ......


Hrm, I'm having the issue where devices show up to install (cloud based), you can check them, and then click done, but nothing ever adds. I previously added an HS105 no problem.
Then I updated the driver and app. I tried again (I'm adding both an HS100 and HS105). The HS100 added, but the HS105 just doesn't want to add. Should I just go ahead and delete the app and try to reinstall it?

Dunno how much it matters, but when looking at the settings (? the gear icon), there are two "selectedDevices" entries, one with the plug that won't seemingly add, and one with the two successful plugs.


This is exactly what I did and it solved my problem. I had a problem where I could only add plugs that had been registered in Kasa when I actually added the app. It gave the exact same symptoms as you describe. Deleting the app and re-adding it sorted it. djgutheinz is aware of the issue and has replicated it but not sure he's managed to fix it yet.