Kasa Devices Spamming HE

Well the logs seemed to stabilise right out, then I realised the Kasa plug wasn't polling at all anymore. I had also had the power trip to the laundry. Checked everything and the device in question managed to cook itself.
Be wary folks! This one is only about 18 months old too

Wow, I'd heard of that kind of thing in Europe or the states, but not out here. If you decide to replace it you could get one of the slim one's instead.

1 Like

Remember, the HS100/110 is a 15 Amp device. But a caution is duty cycle at 15 Amps. I would ask TP-Link the proper profile for these plugs relative to 15 Amp duty cycle.

Final caution: Device is rated to 104 F (about 40 C). If directly behind a device that generates a lot of heat (or a non-air-conditioned space in the summer), the local environment may exceed that limit (i.e., directly behind a space heater). Make sure the device has ventillation in high load uses.

PS - it could have also just gone bad.

1 Like

Hi there! I'm actually still seeing this same problem. I've gone through the song and dance of disabling EM, rebooting, re-enabling, etc. My drivers are the latest, as of 1/4/22 -- the 6.5.1. I've verified the code has your latest changes/fixes in them.

When I enable debug logging for one of the devices, I'm seeing an absolute flood of information. I've even tried disabling the EM features and rebooted, as I'm not relying upon EM monitoring, but it doesn't seem to fix it. It is stuck in this loop, over and over. I see the following lines repeated hundreds of times a minute.

dev:6582022-01-11 04:08:55.949 pm debug[EM Plug / 6.4.3 / Modem - Slim 3]| sendLanCmd: command = {"emeter":{"get_monthstat":{"year": 2022}}}

dev:6582022-01-11 04:08:55.940 pm debug[EM Plug / 6.4.3 / Modem - Slim 3]| setThisMonth: Energy stats set to 18.45 // 1.85

dev:6582022-01-11 04:08:55.937 pm debug[EM Plug / 6.4.3 / Modem - Slim 3]| setThisMonth: response = [month_list:[[year:2022, month:1, energy_wh:18452]], err_code:0]

dev:6582022-01-11 04:08:55.930 pm debug[EM Plug / 6.4.3 / Modem - Slim 3]| setEngrToday: [energy: 18.45]

dev:6582022-01-11 04:08:55.927 pm debug[EM Plug / 6.4.3 / Modem - Slim 3]| setEnergyToday: response = [month_list:[[year:2022, month:1, energy_wh:18452]], err_code:0]

This appears to be inside the distEmeter() method. I have my polling set to 30 minutes, trying to reduce the impact, but that seems to be irrelevant. I can't really pinpoint from where this issue might be coming. I am not sure if somehow the device is truly sending a bajillion events into the hub or not. Do you have any other thoughts on how to trace down what is going on?

As a confirmation, it was fine until January 1, when we started seeing the issue. I updated the drivers last week after I found this thread, but the issue persists after numerous reboots and config changes.

@djgutheinz will be best to guide you through this, but in the meantime I would review the name of the driver referenced in the device page, the compare that to the code and update time in the drivers code page.

1 Like

It looks like you may not have updated the driver version. Do a Save Preferences on the device. The logs indicate 6.4.3 (the broken version). Version is 6.5.1. If you use HPM, update the driver manually instead.

Dave
PS - The top of the EM driver should look like the below:

/*	Kasa Device Driver Series
		Copyright Dave Gutheinz
License Information:  https://github.com/DaveGut/HubitatActive/blob/master/KasaDevices/License.md
6.5.1	Hot fix for loop in EM Month Stat Processing due to month = 1
===================================================================================================*/
//def type() { return "Plug Switch" }
def type() { return "EM Plug" }
//def type() { return "Multi Plug" }
//def type() { return "EM Multi Plug" }
def file() { return type().replaceAll(" ", "-") }
def driverVer() { return "6.5.1" }
2 Likes

Hi there,

I do see that code in my driver. Hrm. I've definitely updated the preferences as you suggested many times as I've toggled on/off the EM reporting.

How could this be using old driver code? I only have one listing for the EM driver to and it's the 6.5.1. I do use HPM, so I will try a manual update, but how could it be using the old driver if I've rebooted many times and I only see the new code?

Tried to post a screenshot, but it's failing on me. Will try the manual update, but what about trying to delete it entirely and re add it? Will that screw up my existing devices?

Thanks for the ideas!

1 Like

You may have two copies of the driver installed by accident. One is attached to the device and the other is the one you updated. It has happened before.

Also check the type name on the Device's Edit page. Use the drop down and see if there are two copies of the driver. We will get this fixed!

I'm pretty sure I had this situation and needed to go through each device and repoint them. I was probably a bit behind on previous upgrades so had probably missed doing the migration some time ago.

1 Like

I've been able to discover that it is indeed using an old driver; 6.3.2, in fact. I see that in the data blog for the device. I'm still trying to figure out how and why, but you've pointed me in the right direction. I will update back if/when I get it to take the new driver. I assumed that HPM took care of this, but it seems like something got gummed up somewhere!

2 Likes

Hi there,
Thanks again for the help. After trying a bunch of things unsuccessfully, I was going to go and remove all the devices and start over. Before doing that, I tried to "install new devices", which I've had to do in order to update IP addresses in the past. Turns out this updates the drivers, too!

TLDR; rerun the "install" inside the app to update all the devices' drivers (and ips, etc) to fix the issue.

Thank you so much for supporting this!

1 Like

Very happy you are fixed and running. Very mortified you had the issue to begin with.

Yep. That is also in the instructions for updating the system (access from app using the ? in upper right corner).

1 Like

Thank you again! I admit I did not realize the app needed to be updated as well. Now I do! Appreciate all the support.