Will a helper solve this or should i change device brands?

I have a shelly gen4 plug to monitor our fridge usage, the device’s Watt draw entity will randomly spike for exactly 2 seconds from around 150W to exactly 4,388 watts, this in turn would cause the device’s KWH entity to spike accordingly, and in, turn spike the energy dashboard, i tried filtering with a helper to weed out the dropping to 0 then back to normal values thing, however this spike still survives filtering and still makes it through to my graphs and reflects on the helper itself. contacting shelly was no help either, their end showed no spikes in wattage from the device, so i’m at a loss on where this number is coming from. I have another, different shelly device that does not exhibit this random spikes in home assistant (while reading 0W when nothing is plugged into it’s outlet).
if a helper will resolve this, what else besides trying to filter KWh do I need to do?

That sounds like how fridge compressors actually work. They draw a lot of current when they start up. Share the history graph of the power sensor.

Is it connected to an inductive load like a motor or compressor?

1 Like

the working shelly (the other one not subject of the query), runs an air conditioner

attached are images for the shelly monitoring the fridge where the problem lies
the shown KWH on the entity is over a 4 month period, when the issues happen here, the energy graph shows one giant spike

I have been manually hand truncating the whole numbers from the statistics every day to keep the graphs correct, i will follow up with the energy dashboard graph when it happens again

That doesn’t sound right. Typically, a fridge compressor upon startup will be 2-3x for that initial moment. I’d assume something is wrong with the fridge, if that’s what’s being reported. Either the compressor is going, or could be a number of things, like a step converter or a transformer on the line. Keep a close eye on that fridge. If you aren’t monitoring the temperature, you might want to start.

it struggles to maintain a straight temp inside (it wildly fluctuations between 28 and 55F for the fridge side, 0F and 20F for freezer side), hot side seems normal, this is what its non spiked graph looks like


and the tempuratures


*shown temps are for the past 24 hours, wild fluctuations happen over the course of a week and during 85 degree weather

Perishable is actually my expertise. I’m a warehouseman for a major grocery store in my region and I work in a gigantic refrigerator all day, lol. FWIW, some fluctuation is typical, but +/- 30 degrees is pretty wide. A fridge should be 36-38F and a freezer should be 0F, both within 10-15 degree fluctuations from those marks.

EDIT - I had to re-read your post, but that behavior seems fine as far as temperature. I had thought it was a +/- 30 degree spread, but no, I read it wrong. But still… that wattage spike tells a tale of it’s own if it’s legitimate. Perhaps, try a different energy monitor to see if you get the same results. Could be a faulty shelly device…

Is your electricity utility electricity metering calculated by average or peak demand?

Very high startup currents for compressors are normal. The shelley is probably giving you instantaneous values as and when it sees them, so is probably working correctly. Depends on how measurements are made (say every second or millisecond or minute) and how often they are reported (every second or minute) as to how accurately your shelley follows the consumption figures of your electricity meter. The measurement is taken at a point in time by the shelley, not over an interval.

Automation filters can exclude or average your figures to account for this normal operation, but are the resulting data points stored accurate?

Having a fridge that has a ‘lazy’ thermostat with well balanced hysteresis is going to consume far less power than one that is switched rapidly around a temperature range of half a degree. Food inside a container inside your fridge is going to exhibit thermal mass changes at far far lower response speeds than your sensor is measuring unless the sensor is also embedded in an object that exhibits corresponding thermal lag. At the end of the day, shouldn’t you be concerned about food temperature, not internal fridge air temperature? Ultimately the aim is you are controlling bacterial growth in food and reducing spoilage by reducing temperature.

Compressors that are failing due to low gas and low lubricating oil will cycle, the thermal cutout overheating, the compressor cooling, and the cycle repeating until it can start properly. There are a number of components involved - the relay, the start capacitor, and the motor itself. Putting the back of your hand close to the side of the compressor motor and also listening will soon tell if it is struggling. You shouldn’t burn your hand. The compressor should start immediately and run for a few minutes. If it is clicking, not starting, groaning, place a service call. A regas and correct amount of oil is going to be far cheaper than a new compressor and associated equipment. Your compressor may be dying. The increased electriciry consumption that reflects compressor operation is fairly spaced apart, indicating that cooling is not needed often to maintain required temperature. Are you also measuring room temperature? Fix the fridge, not the stats.

Alternatively, your door is being left open, often by the fridge being overloaded and the door being jammed closed, or people opening the door and forgetting to close it while they get distracted or are thinking about the contents while the door remains open. Cool air loss is related to time the door is left open. Some fridges have alarms with a timer to chime as a reminder. You may need to replace these with an air-raid siren and flashing strobes if teenagers are present, or somebody with dementia is at home.

Your door seal may be brittle and not sealing properly all the way around. Is it clean and making contact all the way around? Any rusty mating surfaces that may be catching, especially in the parts you cannot easily see at the bottom or near the hinges?

Is your fridge overloaded, so air cannot circulate inside for even and efficient cooling? Is the internal fan working? The consumption figure going to zero would tend to indicate it is not working, the constant 120 watts interrupted by spikes indicating the fan is probably working most of the time, and there may be other factors interrupting it, such as a defrost cycle cutting power to the fan as well as the compressor.

Have you done a spring clean and full defrost? Found the bits hidden right at the back, from last year or the year before, well past their use-by date, embedded in ice?

Is the back of your fridge facing a window and exposed to the heat of the afternoon sun? The heat exchanger to get rid of the extracted heat is usually through the back of the fridge, and it will struggle if it is obstructed for airflow or subject to external heating. Is there a gap behind the fridge for unobstructed airflow? Can you increase it by two inches (pull it out away from the wall) and see how much it makes a difference? Is the wall behind the fridge getting hot in the afternoon? The gradual temperature rise in the late afternoon would tend to indicate this.

Close observation and listening to your fridge and comparing it with a known good one can be enlightening.

Now to human factors:
Who gets up around 5am and leaves the fridge door open for lengthy periods? Gets home around 3.30pm and goes to bed around 9pm and uses the fridge often? You may want to add a door switch sensor to both your fridge and freezer and monitor that over a few weeks to look for usage patterns. These may closely correspond to the human element in temperature variations. A simple discussion about efficient fridge usage (combined with the graphs you have collected) may be all that is necessary to save considerable money.

temp monitoring in home assistant is being done through switchbot meters placed inside the fridge with BT bridges placed both in front the fridge, and from the shelly gen4 plug acting as a bridge behind the fridge, i have a door sensor monitoring opening and an automation to make loud noises in the house for leaving the door open
image


*stopwatch counts cumulative total time throughout a period between midnight and 11:59:59PM the same day the door was open before self resetting

this is the working shelly PM3 when i ran the AC and this is what it’s watts look like (it responds the same pace as the gen4 plug) which is the ballpark behavior i would expect from a meter


, the fridge monitor however, spikes and shows around 1,400KWh energy instantly in the dashboard attributed to just the fridge (which i am still waiting for it to happen again so i can get a screenshot of the end of this chain shown

If you are able to access it easily, post a photo of the label on your internal fridge fan and also the compressor motor so we can see the make, model, and power figures. These can then be correlated to your graphs.

so the shelly has done it again for the fridge, all of the above pertaining to the fridge is causing this on the energy graph, again, using helpers to filter out the zero drop does not stop this particular issue

After you have checked the fridge is actually plugged in properly (no arcing), post your filter and helper code [properly </> formatted please] in case there is logic flaws.
Any entries in the HomeAssistant system error log?

Two megawatts usage over a week would tend to indicate the figures are being recorded wrong, or you would have a utility bill the size of the US military last week! For a realism comparison, what does your house meter say for consumption for the current reading and that recorded on your last power bill, averaged out over the period? Is the consumption figure in kilowatts or megawatts?

Please post those photos of the labels on your fridge fan and comoressor. Your shelly may be getting overloaded by compressor startup current, especially if the compressor is not functioning correctly. Let us know the make and model of the fridge also

the utility bill does not reflect the inflated reading in Home assistant… the fridge is crammed in a perfect concave and only has a gap on the top (approx. 6 inch), and vent grills drilled on the backside and left side so i cannot access the compressor, i have a photo of the data sticker inside the fridge compartment

here is the filter helper’s graph and configuration



state:
{{ states('sensor.shellyplugusg4_48f6eece18c0_energy') | float }}
availability:
{{ states('sensor.shellyplugusg4_48f6eece18c0_energy') | float > 0 }}
helper and its availability template was set up from the UI and based on fixing the persumed cause being home assistant treating the device going offline as 0kwh, and online as its original value (treating the difference as actual additional usage) since that was the only cause i could find being talked about

What does the current (amps) graph look like when the power spike happens? be sure to include units in the graph.

I’m still assuming that it’s not real. But you should try plugging the fridge into a different power meter plug and watch that for anomalies. or use a kill-a-watt meter and watch it manually when the compressor kicks on.

Thanks for specifying the make and model. This Whirlpool unit is quite common and sold widely, both in 110volt and 230 volt versions across the world. Unless disturbed by moving them, they should give you decades of reliable service. At less than five years old, it should still be going well. Please remember to change the water filter for the ice maker regularly, as the black gunk that often collects can be quite unhealthy and have nasty bacterial growth.

My earlier comments about spacing for airflow to dissipate the heat still apply. The user manual gives acceptable clearances which are often ignored at great expense in higher power consumption on an ongoing basis.

Your fridge is also sipping power for the ice maker, which accounts for the occasional small blips in the first graph you posted. The two compartments have separate recirculating fans, hence the higher constant power draw of around 120watts on an ongoing basis.

Unfortunately, the fridge compressor start surge current draw of 20amps is far over the capabilities of your shelly, which is only rated for 16amps. I’m surprised it hasn’t caught on fire yet. The temporary overload for the few tens of seconds it takes the compressor motor to come up to speed is most likely the source of your wildly inaccurate figures the shelly is reporting, going to zero and also to very high values, and possibly self protection kicking in, the shelly probably resetting and reporting wild figures as it does so. A perusal of the data values reported at the wild swing points would be interesting.

For safety reasons, I would disconnect the shelly straight away and investigate another device capable of handling higher surge currents. Look for something that is comfortable with 25amps or higher to be on the safe side. If you are lucky, your shelly may still be functional in other, smaller demand power monitoring roles, at best the power measuring portion may be weakened by constant overloads and prone to early failure. This would be indicated by charring of any surge suppressors, power capacitors bulging, and any voltage divider resistors showing evidence of overheating, clear evidence to reject any potential warranty claim.

Sorry to be the bearer of bad news - you will need to use a higher rated power monitoring device to accurately, safely, and reliably measure power draw for this double door fridge/freezer combo unit.

This is an electrical safety overload issue that no amount of data filtering or yaml code changes can remedy.

Once you have found a power monitor that will safely measure the increased current draw, I would be very interested to compare the graphs to the ones you have originally posted, and the difference leaving the fridge where it is compared to giving it a small amount of extra breathing space will do the the consumption figures. I would also be curious as to the aspect of the fridge in relation to the afternoon sun, whether this can explain the climbing graph in the afternoons, or is it related to more door openings at these times?

1 Like

Any recomendations of plugin style ones That dont require the cloud? shelly support said the gen4 im using would be safe and handle the full sized fridge/freezer, the logs also showed at no time in 4 months using it this way did its overcurrent kick in (both in home assistant, and in the shelly debug logs)

Our ice maker is broken and was turned off

A refrigerator that’s rated at 4 amps full load should only ever pull around12 - 16 amps at startup. that’s also assuming that ever single motor (compressor and both/all circulation fans) all start up at the exact same time. And that should should be in the <2-3 seconds time frame. not 10s of seconds timeframe.

I work as an electrician in a factory that has a conveyor made up 250 rolls that have normal FL amps are in the 6 amp range. These motors spin steel rolls that weigh a couple of hundred pounds. When those motors start up the inrush current is on the order of 20 amps for a few seconds. And that’s with a huge inertial mass that they need to overcome.

if you are pulling well over 20 amps for 10s of seconds then something is seriously wrong with your compressor or the shelly is giving you erroneous readings.

Also it doesn’t sound like you are switching the refrigerator on & of with the Shelly but simply using it to measure power draw. Most of the derating of these devices to lower currents for inductive loads are based on the relay contacts being damaged by the constant on/off cycles under those high inrush current loads when you use the relay to control power supply to the load. If the relays never open or close then the chances of them being damaged by the usual on/off cycles of the compressor is almost nil unless you SIGNIFICANTLY overload the current rating of the device for an extended period of time (that time is less the higher the sustained overcurrent remain in effect). Even then you will be way more likely compromise the internal wiring & electronics than the relay contacts since the relay contacts are more robust than the wiring because they need to be able to handle the slight arcing that happens during normal switching operations.

if Shelly support said that their device can handle a full sized refrigerator then I would tend to believe them. Companies aren’t usually willing to take on the financial accountability of one of there devices burning your house down by lying to you about the capabilities. Especially if they told you that in a medium that would provide evidence in a civil suit like emails or chats.

But if you really don’t trust it then there is a device I saw just a few days ago that was explicit in the description that it was made for high inductive loads like compressors, etc.

it costs $50 and is a zwave device so you will need a zwave network if you don’t already have one.

1 Like

I actually have 2 of those, have you had any issues where they would randomly reboot (thus also switching off momentsrily then back on) by itself? 1 of mine does that, then reports an appx 8x higher kwh consumption of the value at time of self reboot which was why i originally went with shelly for the fridge

Sorry I don’t have any of them. I was just looking for something to switch on & off a window AC and monitor power too.

At $50 it’s a little salty for my taste.

My window AC only pulls 4.6 FLA so I don’t think I need a $50 high power switch for the maybe 10 times a year I’ll be switching it off and on since in the winter it’ll never turn on and in the summer it’ll never turn off. the only time it’ll switch is in the spring and fall during the fluctuating temperature transitions.

You should get ahold of Zooz to see what they can do for you and maybe replace the flaky one. Especially for $50. :money_mouth_face:

and also get ahold of Shelly for the other one.

Here is the amps spiking as requested earlier, the 15 amp breaker feeding this is functional and did not trip leading this reading to appear false


The watts and kwh however did not spike and remained normal here

I still don’t know if there’s enough info to know for sure if it’s real or not.

The spike is only lasting for about 2-3 seconds which is in-line with the expected duration of a spike that could be from the compressor kicking on even tho the in-rush current higher than expected.

The breaker not tripping isn’t a good indicator either because a 15amp breaker won’t trip instantly on a current exceeding it’s trip setpoint. Breakers work on a time-current characteristic.

if the setpoint is exceeded for either just a little bit for a long time or for a lot for a shorter time the breaker will “ride through” that overcurrent.

I doubt that 40 amps for 2 seconds would be enough to trip the breaker.

Here is a (hard to actually read :laughing:) chart that shows the tripping characteristic curve for a Square D breaker. The chart represents the time to trip based on multiples of the load current for the breaker rating.

Again it’s hard to see but if you look at where the gray section starts vertically and look all the way at the bottom that is a multiple of 1 (so 15amps for a 15amp breaker). Basically at just over 15 amps it should theoretically take up to 1000 seconds to trip.

40 amps is ~2.7 x the breaker rating of 15amps so looking at the chart you wouldn’t expect the breaker to trip at that load for 4-5 seconds. 2 seconds is well within that time delay characteristic.

I agrre that the watts should have also spiked along with this current spike since that’s just the current multiplied by the voltage. so you would have expected to see the watts jump to 4800w for that 2 seconds. I’m not sure why you didn’t see that so that’s the one thing that might give an indication that the current spike might not be real. Or it could be the sampling time of the plug is too long to catch and report the watt spike for only a couple of seconds. Not likely but possible.

Kwh is power (watts) over time so you shouldn’t expect to see a change in that since the current excursion was so short.

I still think you need to try plugging the fridge into a different power monitoring plug and watch that for a while to really know for sure if the power monitoring plug is flaky or if the compressor might be slowly failing.

If both plugs show the same results then unfortunately a new fridge might be in your near future.

Hopefully I’m not being “too much” with all the info. But at least you’ll know if the fridge is going out and you can plan for that.