[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I actually did just use the Kasa app earlier this week, but the app did update since then. Regardless, didn't fix the issue when I readded my credentials.

Give it a day or two and try again. If it is a change in the API, it will eventually reach my integration and I should be able to work then.

I found the problem. Apparently 2FA got enabled in my account somehow. Anyway, mystery solved I guess.

1 Like

Can you please replace the code that is generating these Logs:

with the Hubitat standard 'Enable descriptionText logging' Preference:

input "txtEnable", "bool", title: "Enable descriptionText logging", required: false, defaultValue: false

Doing so enables users to completely disable logging and adds your drivers to the txtEnable group in Preference Manager.

Thx

I will think about it in a future release.

So as a result of the prime day sale I purchased an HS300 power strip. The TPLink forums are not clear on whether the random reboot issue is resolved. What have other HS300 owners seen? Will the integration allow me to see if the strip reboots itself?
I just updated to 1.0.12 build 220121

Thanks Folks

The integration does not look for reboot of the strip. There is actually no strip-data to determine last reboot time.

I do not have the latest HW version. I have never had issues with random reboots.

1 Like

Thanks DJ. From reading it does appear the outlets will flip on/off if the strip should reboot on it's own, so will that on/off cycle show?
And what is your firmware ver?

No. The on/off is not detected in the software during the reboot. Too short a period.

In honesty, there are ways to detect after the fact (using the discontinuity in on_time for the plug (i.e., 56032 in one report and 100 in another); however, the use-case is relatively obscure and the additional periodic processing would come out of hub resources.

Thank you. I'm concerned about using the strip as I intended, to power all my SBC's- Hubitat, HA, Octoprint, ST and wanted to be certain the random reboot issue was fixed

I will not be making any changes. You can already disable the information logging using "Enable information logging" in preferences.

As far as Preference Manager, this captures the preferences within the installed devices on your hub. So it should be there in yours. This is the copy from mine.

image

I was using an older version that didn't have this Preference. Sorry for the confusion.

So the problem with using

Preference 'Enable information logging' (name:infoLog)

instead of

Preference 'Enable descriptionText logging' (name:txtEnable)

Is that your driver has it's own entry in Preference Manager (on my hub):

image

rather than being one of many that use txtEnable that I can mass enable or disable:

Drivers each using a different Preference input for the same function defeats the purpose of Preference Manager.

Standards are good. Native Hubitat drivers use:

input "txtEnable", "bool", title: "Enable descriptionText logging", required: false, defaultValue: false

I appreciate the work you've done. Just offering a suggestion to make it a bit better.

1 Like

Understand the intent. I will see the impact to existing users on update and make the determination for a future release.

Update: Looking on my system, there is no standard. The built-in apps are relatively consistent in the Name and Title since the Hubitat staff uses common libraries for development. However, the community developers did not (do not) have access to these libraries for our developments; therefore, there are a range of implementations.

Finally, updating a preference name is NOT an easy street. Doing such an update is fine for new installs; however, for legacy installs it can cause the system to not operate properly.

1 Like

Thanks for all you work here Dave! :grinning:

1 Like

I'm using the Kasa HS300, I've installed the Kasa Integration in the normal manner. Hubitat was able to pull in the device names and other information for each plug. However even though there are Current States showing information, it does not seem like anything more is updating after the initial data pull. Polling Interval is set to 30 seconds.

Most recent log for one of the plugs (all are similar) show:

2022-10-18 06:53:06.168 AM[warn]Dehumidifier 1 6.7.1: parseUdp: Response is too long for Hubitat UDP implementation.
Device attributes have not been updated.

Any ideas? So far I've been able to search for any issues I've encountered on other devices/functionality and found what I needed, so far on the Kasa stuff I'm stumped.

Thanks.

Is this the built-in Kasa integration or the community ? Either way, the following applies:

Caught it yesterday during some testing.

Command itself is working; however, the response to the command is failing (it is too long). The attribute should update on the poll command or a REFRESH being executed (per testing). A community app fix will be out TODAY. I will negotiate with the Hubitat staff an update to the built-in integration.

Dave

This is the built-in Kasa integration inside Hubitat. I'd be willing to uninstall that integration and go with the community one, sounds like that fix might be much quicker. I assume I can find that community integration at the top of this thread?

Thanks!

Update is now available.

Link to top of forum for install instructions and location links.

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

1 Like

Version 6.7.2 of the Community App is now available.

Fixes following issues:

  • HS300 truncated responses: Fixed installation and driver code to correct issue with HS300 messages becoming too long. Correction levels:
    • Message manipulation to make response usable
    • If that fails, reset comms for the device to "altComms" . This uses rawSocket communications which are slower - but it solves the truncation issue.
  • Hubitat password storage of certain characters. When the password is stored in Hubitat, it will convert special characters (i.e., "<", ">") to escape sequences. Fix replaces the sequences for "<" and ">" with the actual characters.

Cosmetic changes for better match with Hubitat "built-in" drivers.

  • Removed version from the logging window.
  • Use common preference and preference name for info and debug logging
  • Cleanup of the app removing some misleading display items.

Dave

1 Like

Just FYI I will wait for the built-in integration, only because I'm not confident I can do the community install as it looks to be more complicated than I would be comfortable with. I can wait.

Thanks!