How does a smart plug measure power?

How do smart plugs measure/calculate power? Do they measure current directly? I’m curious what components are necessary to make basic power measurement work.

I can only speak for the tp-link / Kasa plugs… they measure line voltage and wattage (current) and report it to the sense meter locally.

Here’s the data sheet on the measurement chip inside the venerable HS110. The first diagram shows how you might do both voltage and current measurement. The A inputs measure voltage via a voltage divider, and the current by measuring the voltage across a precision shunt resistor. The B input is current only, measuring the voltage from a CT (current transformer), like Sense does. Pretty sure that the HS110 uses the shunt resistor approach.

2 Likes

One more note - since we’re talking about AC power, power measurement requires many voltage and current samples per cycle. And the power number produced is an RMS (root mean square) power value from across multiple cycles.

And then of course on top of “power measurement”details @kevin1 provided there’s the issue of how you get that information into Sense.

The Kasa and Wemo devices need a whole bunch of WifI components and processing to transmit the ADC data into the cloud or to allow Sense to poll for it. There was a day when that was the hard part but now it’s almost incidental to the relatively onerous task of squeezing high power electronics into a smaller and smaller package.

Interesting to consider the form factor of a power strip vs Kasa300 strip. Basically the same. The ideal form for the “inline” single-outlet Kasa is really about the size of a plug on the end of a standard cable. Squeezing electrons in the wrong ways = heat = problem. Hence the difficulties.

1 Like

Thanks, guys. Great info here. The issue that prompted the question is that I’ve been using a pair of smart plugs to help confirm some of the devices that Sense has detected. In doing so, I’ve learned that Sense is missing about 30%-50% of the actual energy used by my washing machine. I suspect that my HVAC blower is similar. For appliances like these, I’m a bit leery of using smart-plugs for long-term monitoring because of the reduced capacity when connected to motor loads, and I really don’t need or want a device that can turn off. I just want an always-on power monitor. I know I can use the flex sensors for this, but I have more loads in this situation than a pair of sensors will accomodate. So, it seems like the options are:

  1. Build my own ESP32-based monitor w/ CT, integrate with Home Assistant, and push the data into Sense via the Kasa Emulation. Or buys something OTS like the Shelly EM…
  2. Hack an existing Kasa/Wemo smart plug to bypass the internal relay and other components that may reduce capacity while attempting to keep the power monitoring and communication functions intact.

Are there any examples of someone trying Option #2?

I can’t speak to hacking one, but I did try to make an old KP-115 smaller by sawing off its chin, but accidentally sliced through the very bottom of the circuit board. It look like I just severed the wires, so anyone with any slightly good soldering skills could wire this back up. If you want this “dead” unit to experiment, let me know.

I guess I would ask myself: Can I get something that will reliably give me ground truth Sense-like accessible/actionable data with notifications and fault detection potential and so on for <$87.50/circuit.

=$350/4

Meaning: my Option #3 was to get an additional Sense.

Thanks for the offer, but I’m still in the “is it possible?” stage…I may never actually make it to execution.

No argument that the power monitoring of Sense is top-notch, but I’m also interested in the less granular data that tells me if my furnace is using 5% of my total energy or 15%…no decimal point required.

Can you “nest” a second Sense under your main monitor like this? When you put it like this, it seems on-par with other options in the $60-$120 range. Still too rich for me, though. This also assumes you can segregate your loads onto individual circuits, which isn’t always the case. It seems that if you can make a KP125 for $15, you can make a 15 amp dedicated power monitor (in 120 or 240 VAC) for the same price. It’s the switching component that limits the current and voltage capacity.

So far the best bargain I’ve found for monitoring multiple circuits is the IotaWatt. $45 per circuit for the first 4, and expandable to 14 circuits prings the cost down to $25. Its individual preference whether this is “accurate enough” and it’s still centrally located at the panel, so I’m not likely going to head this route either. For individual loads it looks like the Shelly EM might be the front-runner, but its 4x - 5x my $15 target price. And depending on the application, it could inch towards $100 by the time you add accessories like a plug/receptacle end, case, power source, etc.

Maybe I’ll crack open a KP125 just to see whats possible…

There’s also ESPSense, a custom component for esphome. I’m guessing you already have HomeAssistant so SenseLink or emulated Kasa would work too, but this lets the device report directly back to Sense:

My 2c - get your hands on an HS110. Swap out the Omron relay for something that is rated a little higher that has 5V operation.

I think all the Kasa are cloud locked except the hs110, not sure what physically opening the others will get you unless you are going to flash your own FW

Hmmm… or just add a 14AWG jumper across those relay pins…

2 Likes

If your dead set on never having it turned off. I would use a multi meter, looks like control board is low voltage and the and the feed is not. Plug it in, turn it on and see what voltage you have on pin 1 and 8… then see which one turns off with the button then goto the transformer and wire a jumper from the transformer to the 1 or 8 pin depending on which one looses voltage. Should click as soon as you plug it on… and pushing the buttons won’t turn it of. The HS110 is rated at 15 amps.

If you are going to report from HA, maybe a micro switch that has energy monitoring (zigbee/ zwave) would be easier and I’m sure that many of them have a auto restore to which ever power status you were in before or have connect the switch leg to line.

1 Like

While the HS1XX definitely have their place in the mix, I just want to put out a thought:

There is a minimum sample frequency below which fault detection and “ground truth” (to a certain extent) become degraded. Imagine, for example, how inadequate Sense would be in disaggregation if it only sampled every half second. While Sense DCM via the Flex (or Main) sensors isn’t directly contributing to disaggregation improvement it obviously does inform the algorithm and improve the data. And regarding the immediate advantages it’s fully integrated in a reliable way with minimal fiddle.

This leads me to a philosophical rationale for bias in favor of using multiple Senses where possible for dedicated-circuit or clustered power hungry devices: If the goal of Sense is to have a minimal hardware platform installed in a panel then “success” after installing a 2nd or 3rd Sense might be to give them away or use them elsewhere. It’s a similar philosophy to having a roaming smart plug, just that it can roam to a friend or another house. In the best case smart plugs roam toward doing remote switching (not useless I grant you) while the Sense data integration has been superseded .

I would go far as to suggest that Sense could offer a “linked” price discount somehow. If the accounts and devices are linked you get a rebate-per-year or some such. Or perhaps we go down the path of Pro features vs Standard. The SubSenses (with 4 DCMs) are linked automatically because they are recognized as reading the same power signatures as the Sense on the Mains(#1). Meaning: hard to cheat.

(#1) This would also, I think, encourage Sense to do disaggregation on the DCM circuits and to use the DCM data in real time to improve Mains disaggregation.

4 Likes

I’m planning to get a couple HS110s and go forward from there. Thanks for all the info!

1 Like

Let us know how it goes. I think you’ll have to search on eBay since the HS110 is out of production. But I agree that the HS110 is the right product if you want to modify - packaging for the HS300 and KP115/125 doesn’t leave any room for “mods”.

Just got this done this afternoon. Soldered a jumper between pins 3 & 4 and another between 5 & 6. Pins 3 & 6 are the incoming 120 VAC and 4 & 5 are the switched outputs. So far so good. With the jumpers in place, the output is always hot. Switching the unit on or off no longer has any effect. With my furnace plugged in and idle, I’m measuring 8 watts. The house hasn’t cooled off enough for the furnace to kick in just yet.

2 Likes

8 watts is about right for the furnace control electronics and power to the thermostat.

FWIW, i was able to add my two KP125 plugs without a Kasa account or the Kasa app. They are labeled as “Seamless Setup with the Google Home App.” All setup was done in Google home and they were immediately detected within Sense, Home Assistant, and the Hubitat platform (all with local WiFi access, no cloud polling that i am aware of) without providing any account credentials.