[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I think Dave has labelled them as deprecated within HPM, but the driver code itself does not refer to it being deprecated.

It appears to be an error in the EM Monthly Statistics Processing as it crosses the year. I could not duplicate until today when the year changed. Now occurs and is repeatabie (i.e., fixable). Fix out TODAY. For now, disable the EM functions.

Thanks for catching the error. You (Australia) are the leader in going to the new year.

2 Likes

I will check this out today. I think it may be due to the same issue of the date used for getting the EM data. You should probably also disable EM until tomorrow.

They are deprecated for new installations. I have merged all the plug-switch drivers into a single driver for future installations and installs. HOWEVER, the previous EM Plug, Multi Plug and EM Multi Plug drivers are maintained for backward compatibility. (same code, a switch at the top).

I did this to reduce code effort and also reduce errors when new Hubbers install a plug. Too many times getting driver not downloaded error.

I thought my hub was running slow, logged in an saw the alert, what device it was then came here to see this. Disabled EM for now.

@sburke781 are you using influxdb logger? What are you logging to get the hub temp, and what tags in grafana to display it? I have "log hub properties on" but can't find anything in grafana that looks like hub temp.

1 Like

Hub Info driver

And yes, I send the attributes from this to Influx / Grafana

1 Like

I did find it from under tags "hub id" = 1. That's the value logged from influxdblogger. But I'm curious to see what else I can log.

I'm obsessed with graphing everything in grafana. :slight_smile:

1 Like

Driver will give you few options :sunglasses::

        attribute "latitude", "string"
        attribute "longitude", "string"
        attribute "hubVersion", "string"
        attribute "id", "string"
        attribute "name", "string"
        attribute "data", "string"
        attribute "zigbeeId", "string"
        attribute "zigbeeEui", "string"
        attribute "hardwareID", "string"
        attribute "type", "string"
        attribute "localIP", "string"
        attribute "localSrvPortTCP", "string"
        attribute "uptime", "number"
        attribute "lastUpdated", "string"
        attribute "lastHubRestart", "string"
        attribute "firmwareVersionString", "string"
        attribute "timeZone", "string"
        attribute "temperatureScale", "string"
        attribute "zipCode", "string"
        attribute "locationName", "string"
        attribute "locationId", "string"
        attribute "lastHubRestartFormatted", "string"
        attribute "freeMemory", "number"
        attribute "temperatureF", "string"
        attribute "temperatureC", "string"
        attribute "formattedUptime", "string"
        attribute "html", "string"
        attribute "jvmTotal", "number"
        attribute "jvmFree", "number"
        attribute "jvmFreePct", "number"
        attribute "cpu5Min", "number"
        attribute "cpuPct", "number"
        attribute "dbSize", "number"
        attribute "publicIP", "string"
        attribute "zigbeeChannel","string"
        attribute "maxEvtDays", "number"
        attribute "maxStateDays", "number"
        attribute "zwaveVersion", "string"
        attribute "zwaveSDKVersion", "string"        
        attribute "zwaveData", "string"
        attribute "hubModel", "string"
        attribute "hubUpdateStatus", "string"
        attribute "hubUpdateVersion", "string"
        attribute "ntpServer", "string"
        attribute "ipSubnetsAllowed", "string"
2 Likes

I had 2 devices that I noticed in the log a couple of days ago had an alert telling me to "Save preferences". So I opened them both up and just clicked save preferences and nothing else. Now these 2 devices are seriously misbehaving and causing high load on the hub. It might also be causing high DB growth.

The top 4 are all kasa devices (though only the top 2 are having issues). The washer and dishwasher are both on a KP115. I do have it set to poll once a miniute, but I've always had it set to that with no issues. I am using the latest version of kasa from HPM.

In the device log, I see multiple entries every minute. So it seems to me like it might be polling to much. Actually I just turned on debug logging and the log scrolls so fast you can't even read it without pausing.

Both of these are using the kasa em plug driver. Should I change to the new one? Kasa Plug Switch right?

Turn off the EM Preference setting for now, Dave is working on a fix atm, shouldn't be too far away... and he can guide us on how best to transition the code. You may want / need to reboot the hub after changing the EM setting... just in case.

I turned the em monitoring off but my log is still being spammed by these 2 devices.

Restart the hub if you can, well you'll have to really...

Yup, that caused it to finally settle down. And my db size went back down to 6 from 847, so that's a plus too. Weird that my other 2 devices aren't causing issues, but they're on an HS300 so using the EM multiplug driver. I guess the bug didn't exist there.

Thanks for the help. I'll just sit back and patiently wait for an update.

1 Like

I'm assuming the HS300 doesn't have energy monitoring? (Would be nice if you could get a board that had EM... )

It does. I use it to tell when my TV turns on.

Ah, that's what I remember now, we don't have the HS300 here in Oz, just KP303, which doesn't have EM.... Maybe one day.... :slight_smile:

I see version 6.5.1 in HPM with a patch note of

Hot fix to for Energy Monitor functions going into loop on month = 1

1 Like

I was keen as well :slight_smile: I might need to do a repair, think the driver name on my old C-4 might not line up...

Initial report looks good. I turned on debug logging and energy monitoring back on for both devices and I see them reporting in just once every minute like they should be.

Thanks @djgutheinz for the quick fix!

1 Like

Same problem here with EM plug and DB overload.
Did a repair of Kasa integration in HPM and FIXED!
Problem with New Year? Y2K all over again?
Thanks to Dave for the hot fix.