TP-Link KP115 Disconnecting - Community Experiment?

OK - I think I have an explanation for the weird disconnect behaviors of my Sony TV and my Washing Machine smartplugs. I noticed that both of them had disappeared from Sense this evening, so I decided to look at the Kasa app to see what was going on. Here’s the “reliability” chart showing the Sony TV and Washing Machine smartplugs as disconnected.

If I look at the Sony TV, showing as disconnected, in the Kasa app, I notice a very tiny power draw, less than 0.1W, while my Apple TV, which shows as connected, is drawing well over 1W. The Washing Machine, showing as disconnected, is showing less than 1W (0.69W) on Kasa. My hypothesis is that Sense probably rounds any usage less than a threshold of 1W down to 0. And from what I have seen, Sense doesn’t do a lot to differentiate between 0 and NA. I’ll have to look for places where the Sony TV shows as connected, but with the TV off, to see if the power is above 1W at that point in time.

Sony TV on HS300

Apple TV on the same HS300 as the Sony TV

Washing Machine on HS110

Update

I’m not sure if my theory is completely right. Sense does seem at least partially capable of delineating between zero and NA in export. If I look at the distribution of extremely low usage values coming out of my smartplugs, I do see some actual zeros, mostly coming from my Washing Machine smartplug, and a much smaller smattering from other devices.

If I look to see how the Washing Machine’s zero usage hours are distributed across a year, it looks pretty even (below) leading me to believe that there’s a fairly stable mechanism at work here - not likely a Sense or firmware update has caused a change of interpretation of of zeros…

So my next path of inquiry is going to be looking at the stream of data coming from the Washing machine smartplug to see how it varies.

1 Like

I used to have many of my HS110’s not having their power samples recorded by Sense, as outlined in this past thread: https://community.sense.com/t/smart-plug-power-data-glitches/8710.

It is much better now, after replacing the mesh wifi network I was using before with a fully hard wired UniFi AP (6 nanoHDs) deployment. Might help also that I also have all the IoT devices (Sense, HS110s) on their own network, so their broadcasts and UDP traffic are confined. I still see evidence that some HS110s not having their power data recorded by Sense for minutes to hours at a time, though this is much less of an issue now. (A few times that I’ve caught a case like this live with my new home network and tried using the Kasa app to access the plug, the Kasa app was successful; I don’t think the issue is with the plugs.)

1 Like

Thanks for the refresh on that history and your old wireshark sleuthing… By and large, my TP-Link / Sense communication has been well behaved. I have them all, including the Sense, on a second network/subnet, though it uses the same APs and wired infrastructure as my main network. And the main mode of misbehavior is when Sense seems to lose some of them for an extended period. That’s typical easily corrected by a Sense power cycle. But I would like to figure out the selective issue with my Sony TV (shared HS300) and Washing Machine smartplugs.

ps: Still planning to upgrade to a full Ubiquiti system for the house, but I’m kind of waiting for the WiFi 6 version of the Access Point In-Wall HD, due to the way I currently have my infrastructure set up.

I’m still experimenting, but away for a couple days so I can’t test some of my thoughts. So far, I have discovered that most of my TP-Link smartplug “outages” are cases where the smartplugs are solidly connected to my IoT network and visible via the Kasa app, just not visible to Sense.

What Have I Discovered So Far
Using the hourly Sense export file as a measure of “reliability” I have discovered that Sense fails to create an hourly entry for a smartplug under the following conditions:

  1. An actual connectivity issue, where Sense doesn’t seem to see a pre-existing smartplug on the network. In that situation the device appears in the “off” part of the device list with an “n/a” on the control button.

  1. When the smartplug is turned off via the Kasa/Sense On/Off button. In that case it is in the “off” part of the device list and the control button says “off”

  1. When the smartplug is using a very small amount of power (less than some critical threshold) and ends up in the “off” part of the list, but still “on” per the control button.

But small fluctuations in power can take that same device into the “on” part of the device list a couple minutes later.

How Does Sense Decide On vs. Off vs Standby ?

The Kasa app and Sense use the same mechanism to obtain realtime power information from the all the smartplugs on the network. They broadcast the following command to all the devices on the local subnet:

{"emeter":{"get_realtime":{}}}

HS110s receiving that message will send a message back to the requesting IP address of the following form (with a little encryption in between)

{"emeter":{"get_realtime":{"current":0.028915,"voltage":120.798141,
"power":0.527563,"total":18.045000,"err_code":0}}}}

HS300s respond with the same data, with current and voltage reversed and in different units

{"emeter":{"get_realtime":{"voltage_mv":121917,"current_ma":177,
"power_mw":16194,"total_wh":90051,"err_code":0}}}}

And the KP115 response is in the same units as the HS300, but with current and voltage reversed. Note that the response below is for a situation where the KP115 is turned off via the Kasa/Sense On/Off switch. So there’s no specific data returned that tells that the smartplug is turned off.

{"emeter":{"get_realtime":{"current_ma":0,"voltage_mv":122525,
"power_mw":0,"total_wh":107,"err_code":0}}}}

Sense explains a part of the categorization On/Off/Standby mechanism here:

What’s not explained is the threshold between Off and Standby. I’m going use a java utility that continuously samples select smartplugs, to see if I can figure out the power/current threshold that triggers Sense to switch between case 3A (Off) and 3B (Standby) above.

1 Like

So I think my issue is actually just a display bug… It appears as if data in the device power graph just doesn’t show correctly. Every time I open the device power meter, the almost exactly 10 minute window where the graph shows 0W shifts to the right… even if there was data showing there before. It’s pretty easy to see in screenshots.

If you look at the last one, there is a gap showing 0W from 9:57 - 10:08. But if you look at 2 screenshots beforehand, you’ll see that there was previously data showing for 10:02. Another thing that points to display bug is the fact that if I look at the timeline, it just shows the device turning on, but not off yet. I also have notifications for on/off and I haven’t gotten a notification that the washer turned off.

Screenshots





What’s interesting though is that this only seems to affect my washer, which is the only device I have connected to a KP115.

Here is my network rack on an HS110 that is also in the laundry room.

It’s not a connection issue either. I implemented what I mentioned above

The KP115, the network rack HS110, and the Sense are now all on a separate wifi network (still all on the same subnet). Sense’s connection improved to -55 dBm and the 2 smart plugs are sitting around -35 dBm now, so their connection improved significantly.

I had originally thought I was getting false positives about the washer finishing, but those were notifications from my Hubitat. I tweaked a few settings there and that stopped, so I am pretty sure there are no actual data dropouts in my case.

1 Like

OK, I caught one in the act, sort-of… I finally got around to trying to trap my Washer HS110 transitioning between Off and Standby to see if I could figure out at what power threshold(s) that occurs. First, I turned on all three alerts (On, Off and Standby) for the Washer smartplug.

Then I let it go for a few days to see if there was a pattern. It looks like there is some good hunting in the morning !

Next I set up the CollectKasa.jar utility to sample my Washer HS110 smartplug every 5 seconds. More on that utility and links here.

Finally I looked closely at the Power data coming out of my Washer HS110 close to the 5:30AM and 9:11AM timeline alerts above.

I’m able to see the event that likely caused the 5:30 AM transition.

But I came up empty on the 9:11AM event. Then again, I was looking at a 5 sec. sample so I might have missed that one crucial data point.

Then again, it might not be as simple as that. If I look at a bigger stretch of the morning, it sure looks like there should have been some other transitions detected, that weren’t. Hmmm.

Still experimenting with what power level or other causes Sense to oscillate between Off and Standby for my HS110 on my Washing machine. I’m doing occasional scraping of my web app Timeline to pull transition points and chart. I had charted earlier, but the choice of bin size in histogram makes a big difference in what one can infer from the same data - thoughts ??? This is a chart of how many transitions take place (timeline alerts) in each part of the day.

Bins = 24 - one for each hour

Bins = 7

My first post here. I came for the exact topic you are talking about. I have three KP115s that drop out about once a week. The first two times this occurred it was between 7:30 and 8PM but I do not remember the exact time. The last two times this happened it occurred at exactly 7:55 PM. All three plugs go at the same time. They show N/A on the device page. The Kasa app sees them and can control them. The Sense app does nothing. The only method I have tried to get them to respond is by unplugging them from the wall and re-plugging them.

I’ve got a TP-Link router which I switched to just before I installed the KP115s for the first time.
So as I am reading this thread, I go to look at the devices and they are off line at exactly 7:55. Two of the plugs had TV’s on them with a 100 watt load or higher. The third plug had a 2-watt load on it.

The fact that it dropped out at least twice at the exact same time makes me believe it is a router or app interface issue but that is just a guess at this point.

I bought the KP115s to track the tvs. Two of them are plasma’s and they are noisy beyond belief. I haven’t entered any info on what is connected to them as I didn’t think it would make a difference, but I see in another thread it helps the AI software,

Any help in solving this issue is appreciated.

1 Like

I have problems (still) with the 3 KP115s I am using. The Kasa app sees them with no problem and reports the power they measure, but Sense loses them. The only thing that brings them back is unplugging and re-plugging them.

Like you, I have a TP-Link router. Mine is a Deco M9 Plus mesh system (2 units). On the Deco forum there is a thread about Wemo plugs losing connection; the solution was turning off beamforming. I tried that but it only brought the KP115s online for a few hours and they remain off (to Sense) since that time.

Also, my three plugs disappear from Sense the same moment as each other. I have looked at the power meter graph and have seen two of them (the third was powered off and not drawing anything) stopped being recorded within the same second of each other. One is on my refrigerator, one on the garage door opener, the third has the lights over my workbench.

@bobnarad , @demiller9,

A couple things to look for…

  1. Some of my temporary disconnects, as you describe (Kasa works, but Sense is seeing n/a) happen when there is also a momentary dropout fro my Sense monitor. If you can identify timeframes for missing Kasa/Sense data, take a look at the main Sense Power Meter for that timeframe to see if it also had short outages like below.

  2. The fix for me in some cases has been turning off NDI, then turning it back on. Occasionally I have also just power cycled the Sense via it’s breaker.

@kevin1
I have looked at the power meter for the time when the plugs stopped reporting usage, and posted screen shots of that here ( KP115 worked 2 days now missing from Sense - #8 by demiller9 ). There is no gap in the power meter, yet the timeline told me (shown in post #11) that the refrigerator and the garage door opener went offline at 5:40 AM.

And just slightly off track, I replaced the workbench KP115 with an HS300 which has been in since Jan 27 (8 days) and still appearing in Sense. The KP115 I took off the workbench is now plugged in elsewhere with no load at the moment.

1 Like

I discussed this with @RyanAtSense and he confirmed that we’re aware of the issue due to a set Standby → Off threshold of .5W. We’re aware that this could present some issues with On/Off timeline notifications and are exploring ways to address this in the future.

If you’re seeing the issue, please write in a ticket to support@sense.com so we can track it.

Thanks @JustinAtSense,
That explains a lot given the power values I see coming from my Washer HS110. It’s also not such a bad choice giving the range I’m seeing for the standby power of Washing Machine. Only a little of the tail dips below 0.5W, or off.

So no issue - merely “functioning as intended” for right now. I might try to see whether setting a threshold of 0.5W gives the same timeline results, but I suspect not for a couple reasons.

  1. My 4 sec samples aren’t the same as the 6 sec samples that Sense is pulling form the Kasa, and there’s really no way to force them to be the same, even if I were to stretch my sample period to 6 sec. Given the way the data bounces around, there’s no guarantee that the next periodic sample is going to be close to the previous one.

  2. I seem to remember from Jonah, that there also might be a little “hysteresis” in the incoming data so that it is smother and filled when there is some small amount of missing data. But he didn’t share the size of the hysteresis window. So no way to duplicate that.

Thanks again. I think I will add a Wishlist Item to add a Standby → Off similar to Standby → On threshold.

And I can check off the intermittent data export output for my Washer and for my Sony TV as being related to this threshold.

Thanks to @JustinAtSense at Sense, I can close out my 2 week+ reliability testing of Sense with my Kasa devices. Over the past 5 weeks I have had Sense/Kasa hourly exported data dropouts for the following 4 reasons:

  1. Kasa plug manually turned off for most of the time for devices “KP115 Roamer”, “Ford Energi Charger”, “Sonos Dining”. Unfortunately, this means I wasn’t really looking closely at the long term reliability of the only KP115 in my house (Next step ?)
  2. Kasa plugs oscillating between “Off” and “Standby” for “Sony TV”, “Washing Machine”. The current threshold is 0.5W. These devices have “Standby” usage that is occasionally less than 0.5W. That’s where no data was exported.
  3. Sense monitor issue that caused some dropped Power Meter data. Also caused dropout of 2 hours worth of exported data for all Kasa smartplugs.
  4. Mysterious issue between Sense and 2 entire HS300s. Unknown origin, but both HS300’s remained visible in Kasa app throughout. Solved by power cycling Sense monitor.

Conclusion: Current reliability chart looks good once two issues are addressed. It’s important to also realize that there are several legitimate reasons for Sense/Kasa to fail to report data for specific hours in the export file (manual off, drifting below off threshold). No major glaring issues with Kasa/Sense reliability, by this measure.

Next steps. Rearrange usage to better test KP115. Look more closely at Kasa data during this period of any other anomalies.

On Feb 8th, my three KP115’s fell off the Sense app at 7:56PM. One minute later than the previous drops. I thought for sure they would drop again on Feb12, so I eagerly waited for them to drop at 7:56. Nothing. Turns out I was a day early because they dropped on Feb 13th at 7:56PM. It cannot be an accident that they drop at the same time. Again the Kasa app could connect to them just fine.
So I have some questions, if anyone happens to know.
Do the KP115’s communicate directly to the Sense app or do they go to the Kasa app first?
Are they polled or do they just broadcast their info?
Thanks in advance.

Kasa smartplugs are polled by the Sense monitor every 2 seconds using a broadcast “emeter” request packet. All Kasa smartplugs with power monitoring respond. The Kasa app does similar but it sends several requests, including a request for daily energy and monthly energy.

Get Realtime Current, Voltage and Power Reading
{"emeter":{"get_realtime":{}}}

Get Daily Statistic for given Month
{"emeter":{"get_daystat":{"month":1,"year":2021}}}

Get Montly Statistic for given Year
{"emeter":{"get_monthstat":{"year":2020}}}

1 Like

I just swapped my loan KP115 over to a new application where I will have it turned on all the time. So I’m just beginning my reliability experiment with it. We’ll see how it compares to the other Kasa devices in my houses. In this year the HS300’s have proved touchier than all the HS110s I use.

And the Sony TV and Washing Machine operate at Sense’s margin for standby vs. totally off, hence the intermittent colors.

1 Like

OK - So far my lone KP115 has shown great reliability, at least at the hourly reporting level. Ever since I transitioned the smartplug from my subwoofer, where I had the KP115 off most of the time due to my use model, to one of my three garage door openers, it has reported good non-NA values for all of those hours. The KP115 has been running for more than the ~1 week that @drjb suggested and it has been 100% rock solid despite being in the middle of my garage, fairly distant from all access points.

If I look at the KP115 Power Meter for that same period, I do see 4 very short dropouts (blue circles), plus one weird drop in Aways On power of my garage door opener (in yellow), but that level of dropout could have come from me rebooting access points, new Sense firmware, etc.

When I push down into to those dropouts, I do see very short lapses like the ones below, but those are in the realm of a access point reboot or a new load of Sense firmware:


**Update - Still no drop by my KP115 after 2 weeks **

The verdict - My KP115 on my network is very reliable (so far).

1 Like

I’ve found the KP115 to be VERY reliable … and the Wemo Insight plugs to be very UNreliable.

I had noted some general random disconnections of random devices after adding ~a dozen or so devices on the network (bring the total between 50-60 IP addresses … with all the “known” devices having ‘fixed’ IP addresses assigned to their MAC addresses in the DHCP server). The random disconnects were not limited to WiFi devices, either, which led me to investigate the DHCP server more critically.

Sidebar on the network: TP-Link router (router/DHCP server/Firewall only, no WiFi), connected to switches. Deco X60 & X20 mesh running in AccessPoint mode, with 6 of the 7 nodes hardwired to the switches.

After some reading on the TP-Link forums, I decided to replace the TP-link router with a Ubiquity EdgeRouter-4 … and so far the random disconnects have disappeared. The EdgeRouter-4 handles much higher traffic peaks; my reading of the TP-Link issues was that its DHCP software was not 100% solid.

The jury is still out on the Deco mesh; I haven’t had enough time to judge whether the router replacement has ‘fixed’ all the WiFi issues or not.

None of that, however, really directly relates to the Sense limitations in having more “ground truth” reporting devices than the current Sense device can reliably handle (~20 max).

1 Like

I updated the firmware in my Deco router 6 days ago and my 3 KP115 plugs are all working solidly now. I have had them since early January and they would not work more than 2 or 3 days before Sense stopped reporting them, although they looked fine in the Kasa app. (I have posted an update on the thread I started in January about the problem KP115 worked 2 days now missing from Sense - #30 by demiller9).

1 Like