I’m going try the same for all my TP-Link smartplugs. I only have one KP115 and my usage of it today is a little non traditional.
I’m going to work backwards instead - look for Sense outages over past history, then try to see if I can diagnose.
Unless Kasa/TP-Link has some hidden logging or one diddles deeply with IFFFT, I’m not sure there is a good way to get good info on when Kasa sees dropouts… Sense on the other hand is very good at showing dropouts that last more than an hour via export. Plus one can actually spot shorter dropouts in the Device Power Meter. Here’s how to find dropouts from an hourly export file using Excel - oddly, I discovered several devices/smartplugs that have gone offline this very morning.
Read the Sense exported data into Excel and select the the column names and data below. Create a Pivot Table from that data.
Look for any empty cells in the Pivot Table. Those are the entries where Sense missed an entire hour worth of smartplug data. I can see 3 issues and one normal “error” from this data. 1) Two of my HS300s look like they haven’t reported in the last hours, the one in Family Room, and the one feeding the media for our Master Bedroom. 2) My Washing Machine HS110 appears to be fairly intermittent. 3) My Roamer KP115 looks intermittent, but that’s a smartplug that I turn on and off via the switch and Sense “button” - it’s actually still when I look at the Sense Devices list (‘off’, not ‘n/a’). So blanks can stem from either disconnects or intentionally off smartplugs.
This is a bit of an eye chart, but it highlights what Sense has seen hourly from all my TP-Link smartplugs from Oct until today. The tragic thing is that I haven’t been tracking every disconnect event carefully, but I can at least look into today’s disconnect more carefully.
A few key points about the chart below:
Separated out by smartplug type and each of the outlets on all 3 HS300’s are grouped together
Green is a good hour of data, orange is disconnected hour. As I mentioned earlier, disconnected are when the smartplug data doesn’t make it back to Sense across an entire hour, but this includes the situation where a smartplug is turned off via the Kasa or Sense on/off switch. I switch 4 of the smartplugs outlets off an one manually so they can be discounted in the chart (KP115 Roamer, both Sonos’s, and the Ford Energi charger).
Excellent work @kevin1. You results are rather interesting (of course). Correct me if I’m wrong, but I see the following:
There are times where the KP115 does disconnect, as reported by multiple (frustrated) users in other threads
It seems this is not just for the KP115, as the HS300 also does disconnect.
Did I read your findings correctly?
If so, I guess the next question is: For the Kasa App to calculate stats of energy usage over the whole day, it must somehow store the usage data (either on the plug, or in the App). If the data is not there, that suggests that there is no storage on the plug and that also means the Kasa App is always talking to all the smart-plugs? … or am I reading too much into that?
I’m using the KP115 in a way that creates those “dropouts”. Sense produces the same lack of exported data for either an hour disconnected “n/a”, or an hour with the smartplug in “off”. Sense knows the difference but doesn’t produce different export data for that hour. So the orange ins not an indicator that my KP115 is disconnecting - my use model today makes it hard to test for that.
All three HS300’s have had disconnect issues from my Sense at different times. I seem to remember power cycling my Sense breaker once too get things reconnected in Dec. I’m also not sure what’s going one with the smartplug outlet associated with my Sony TV in the master bedroom. It seems to go in and out much more frequently than some of the other outlets in the same HS300.
I view this as kind of a map for investigating different issues. First and foremost, I’m trying to figure out what is going on with my Master and Family Room HS300’s.
Sense does not “see” outlets on either of those, even though the Kasa app does.
To answer your last question, TP-Link power monitoring smartplugs do save daily and monthly historical information, so the communication is not constant. Sense uses the realtime call, but the Kasa app also uses the other two that are supported by the smartplugs.
Get Realtime Current and Voltage Reading
Get Daily Statistic for given Month
Get Montly Statistic for given Year
Thank you for a very thorough presentation/analysis. I’ll be doing something similar on my data over the next few days and will report what my specifics are. Others have reported they see their plugs turn from solid blue to blinking blue (i.e. completely disconnected from their network) and I have not seen that with my plugs. I’ve also come to the same conclusion as you have. To prove the next point will require a bit more work, but I think the community (all of us) need to separate the issues and get to the bottom of which is the faulty component. There could be three separate issues:
Smart plug completely disconnecting from the network (flashing blue lights)
Smart-plug still on network, talking to Kasa, but not to Sense
Smart-plug talking to Sense but not to Kasa
I suspect most of the reported issues will center around 1 & 2, and not sure if 3 is at all possible. Also, if the plug stores data locally as you’ve indicated, then 2 is not that big of an issue, at least if one is only after daily usage statistics.
Are you still having issues with the Kasa HS-300’s as shown in the screenshots? I’ve shared the threads about folks having issues with KP-115’s internally. From what I’ve seen (and I may have missed something in your analysis), it’s not very clear from the reports I’ve seen if it’s a Sense problem or a Kasa problem. Suspicion here is that this is a network issue, but that will take some work to prove.
Yes - still seeing the issue this AM. Could very well be networking issues, but not obvious signal strength ones. One of the HS300s not reporting now, is only a few feet away from an access point. The HS300 that is still reporting on Sense, is associated with the same access point as Sense. I think my first step today is to reboot all the access point.
Let me know if anybody there want to take a look at my data.
Update: when I went to reboot the access points, I noticed that the still-reporting HS300, is associated with a different one than I had thought. It is attached to the same one as one of the misbehaving HS300s. And the reboots did not fix.
Actually I think my particular issue was being caused from some furniture that was rearranged last night and impacting the wifi signal strength to the Sense itself. We’ve temporarily moved the offending furniture and I’m going to keep an eye on things.
Next iteration ! A power cycle of my Sense monitor caused both the errant HS300s to reconnect, so all those outlets are back online reporting data. I also made 3 cosmetic changes to my charting.
I removed the 3 smarplugs that I toggle on and off from the Sense app and the Kasa app manually. They were showing as disconnected, when they were really functioning correctly but just off. I suspect that’s because the smartplugs don’t report back to the “emeter” command when they are in off mode, even though they are responsive to other TP-Link commands.
I also added the responses of the overall Sense meter itself. There were 9 missing hours in 2020 when either my Sense monitor or network was out, where Sense did not log any data at all (missing hours in the exported data). This is important since it lets me differentiate between the Sense Monitor being the issue vs. smartplug/Sense communication.
I have shortened my charting period to just 2021, just to simplify my identification fo current issues.
Given the “reliability” chart above, I’m going to look at 2 things:
The weird disconnect behaviors of my Sony TV and my Washing Machine smartplugs. The Sony TV is especially weird because it is part of a shared HS300 (or so I thought), yet it appears to disconnect when all the other outlets are still connected.
The short outage in virtually all smartplugs around 2-3 in the morning on Jan. 7th. I added the Sense Monitor to the chart to see if this issue corresponded to a total outage of the Monitor, but the answer is no.
Heres’ a closer view on item 1. I included the Sense monitor, plus a companion outlet on the same HS300 as the Sony TV, to see if any patterns emerge. Pretty clear that one shared HS300 outage in November is reflected in both the Sony TV and the Apple TV. Other than that, it looks like the Sony TV outlet on the HS300 is intermittent in responding to Sense. It also looks like there is some commonality in Dec connection issue between the separate Sony TV outlet and the Washing Machine HS110, while not affecting Apple TV out let on the same HS300 as the Sony TV. Officially weird !
Here’s a close look at that period of time in the main Power Meter. It looks like my Sense monitor did indeed get disconnected for a couple short periods of time with some data dropouts, around 1:45AM and around 3:57 AM. But never for a complete hour, hence no data export dropout for the entire hour.
Second update: Turns out, moving the furniture back did make the wifi signal for the Sense back to normal, but the data from the KP115 is still lagging behind. I didn’t take a screenshot when the washer ran today, but it was the same as the one above. There were gaps in the data that backfilled after the washer finished.
The KP115 is sitting at -55 dBm and the Sense at -65 dBm. While not the greatest signal, it’s working for everything else. The HS110 that my network rack is plugged into, which is also in the laundry room, is sitting at -69 dBm and not dropping any data at all in the graph.
The router in my network rack does have wifi capabilities, but it’s disabled and I have a Unifi UAP-AC-Lite centrally located in my house. I’m considering turning the wifi on my router back on and connecting just the Sense and the 2 plugs in the laundry room. The laundry room is right next to the garage, which is where my breaker box is. My only concern with that is the router is enclosed in a metal box… not sure how much better the signal might actually be if at all.
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.
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…
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.)
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:
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.
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:
HS110s receiving that message will send a message back to the requesting IP address of the following form (with a little encryption in between)
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.
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.
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.
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.