Overview
A number of folks have noted various issues with Kasa smart plugs when used with Sense, including recent issues with a non-Sense-compatible version of the EP25. I tried this user-written utility on Github the other day, and found it to be incredibly useful for validating communication with all my Kasa smart plugs for 3 reasons:
-
Indicative of Sense Integration - This utility communicates with the smart plugs exactly the way Sense does (via broadcasts) so results using it should be indicative of results with the Sense Kasa Integration. So if the utility sees a compatible smart plug, so should Sense. Conversely, if the utility encounters a smart plug (like the new V.26 EP25) that is incompatible or there is a network issue, neither the utility or Sense will see the smart plug. One of the big issues with the TP-Link Kasa phone app is that it uses a different mechanism so it will show Kasa devices that Sense can’t see.
-
Fast Debugging - The utility gives a result in a few seconds after invoking, so you can try varying things with your network and smart plugs and see the results very quickly. Changes in network configuration or with smart plugs can take far longer to propagate back to visible changes in the Sense app. Plus you can quickly run anytime you notice a missing device or missing data.
-
More Information - the utility gives lots of information about each smart plug, even more if the utility is used with the --debug option. And the text report the utility commands produce, can be redirected and piped in a unix environment to pull data in structured way. One use I’m thinking about is running the utility hourly (or more) using crontab to find intermittent issues that might stem from network loading.
Installation
For me, on a recent Mac, installation was easy and almost straight out of the “Getting Started” section of the Github project.
The only difference is that I had to invoke pip3 instead of pip.
pip3 install python-kasa
The only other thing I had to be aware of is that the install put the executable in the /Users/kevin/Library/Python/3.9/bin directory, so I have to invoke via:
/Users/kevin/Library/Python/3.9/bin/kasa discover
By grepping, I can see just the list of my Sense compatible smart plugs, and their models.
/Users/kevin/Library/Python/3.9/bin/kasa discover | grep '^=='
== Furnace Up - HS110(US) ==
== KP115 Roamer - KP115(US) ==
== HP LaserJet - HS110(US) ==
== Front Door Dragon - HS110(US) ==
== Kyle’s PC - HS110(US) ==
== Playroom Cluster - HS110(US) ==
== Yamaha - HS110(US) ==
== Kids Bathroom - HS110(US) ==
== Washing Machine - HS110(US) ==
== Traveling HS110 - HS110(US) ==
== Office Always On - HS110(US) ==
== Furnace Down - HS110(US) ==
== Master Bedroom - HS110(US) ==
== Recirculation Pump - HS110(US) ==
== Downstairs - HS110(US) ==
== TP-LINK_Power Strip_13D9 - HS300(US) ==
== TP-LINK_Power Strip_D4F6 - HS300(US) ==
== TP-LINK_Power Strip_FA05 - HS300(US) ==
== Ford Energi Charger - HS110(US) ==
If you are experiencing Kasa smart plug issues, I would recommend trying this utility. It can give you another view on whether the smart plugs are working the way Sense expects them to.