Check if refridgerator is left open via energy use?


#1

1) Give a description of the problem
I’ve got a new device Zoon ZEN15 that reports energy usage. I’m using this DTH:
LINK
2) What is the expected behavior?
Either use the data directly from the DTH or calculate it in webCore. I’d like to pick an expected energy usage that is normal (ie 500Wh per hour) and alert me if the usage exceeds that threshold. Since the refrigerator duty cycles, I can’t just use a raw number. But, I can measure the typical usage per hour and if it’s exceeded by, say 10%, get an alert?

3) What is happening/not happening?
Newb

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

REMOVE BELOW AFTER READING

I’m very new and literally just found webCore. I’ve used Core in the past, but looks like it’s time to move into the future! Thanks for any help!


#2

Not really a webcore answer… But I think you’d be better off just getting a window door contact sensor. That’s what I have on my refridgerator in the garage. The sensor on the fridge door, the magnet on the freezer door.

WebCoRE piston, If fridge door stays open for more than 5 minutes, send notification.

You can find an MCT-340e contact sensor that works with SmartThings for $10 (though it looks like the prices are closer to $18 now.


#3

Not really a solution for me. When the fridge or freezer is left open it has always been just slightly ajar and likely not enough to “break” the contact. This is exactly why I went the route of energy consumption…
Thanks for your comment.


#4

Is only reporting every 50 watts really going to give you an indicator that it’s left open?


#5

A refrigerator duty cycle is say 25% on and 75% off. When it’s left open it can run continuously, so the amount of energy used per hour should go up significantly.


#6

Per hour…so it will take an hour for you to be notified that the fridge is left open? There are sensors out there that would let you see if the door was open. Heck, they do it for the little light inside the fridge, right? If this is that big a problem that you’re trying to find a sensor that works reliably, I would think you’d want immediate notification.

In fact, most modern fridges do this automatically. My Samsung fridge, which is one of the cheaper models, beeps like crazy when the door is left open too long.


#7

I do find it interesting that in this help section, everyone is trying to convince me that I don’t want what I have asked for help with. Strange. As for Ryan780:

  1. Yes, knowing that the fridge has been open for an hour is useful
  2. Little light? Sometimes it is the fridge, sometimes the freezer
  3. Modern fridge? It is in my garage and is like 20 years old

#8

So I have been playing with my options here, but since I am new to webcore, I am confused.
How do I setup a variable that records the energy attribute for my fridge every 30 minutes? I think that I can use that as my compare in the piston… If ([device].energy - @kwh_last) > 0.3 then trigger
I can’t figure out how to get @kwh_last variable set to use for the comparison to the current value. This approach will require that I figure out how much the [device].energy is changing every 30 minutes nominally, of course.


#9


Check this thread out. It all depends on what info is passed back to ST and when. My guess is that you would have to set up a variable and do the math yourself either on a timer or based on other events. Not going to be easy I tell you that. KWh are reported back, you would have to take the reading and subtract the previous reading to see how much it changed and whether that amount was over your threshold. I still don’t think it’s going to work reliably. But hey, you keep trying.


#10

I remember someone sticking a multi sensor near where the cold air would be seeping out of the freezer and that is what was used for alerting. Maybe it was in the old ST threads.


#11

I don’t have an energy monitor, but have a few ideas on how you could accomplish what you’re after. Would you mind posting up a green snapshot of your latest attempt so I can pull in a copy? I’ll post up one or two approaches you could use to get the result you want (assuming what I have in mind works with the data available from your energy monitor).

Offtopic: assuming from your name you’re a fellow gearhead??


#12

Fellow gearhead yes, but as I’ve moved to electric vehicles my handle is more symbolic these days…
I think I have a decent approach. I am checking every 15 minutes instead of every 30…


#13

Tesla or other? I love the immediate torque but can’t get over the lack of soundtrack… the engine note from the car I picked up a couple months ago puts a silly grin on my face every time I drive it!

I see what you’re going after there. Quick question before I try to offer up any other solutions (yours looks as though it should work, or be real close to it)… are any of those variables that start with @ used by other pistons?


#14

Yes Tesla. Also a Fiat 500e, but that’s somewhat embarrassing :wink:
Anyway all the @ variables are only for this piston. I created so many just to observe the trend and help me pick the right threshold for the trigger. I probably ought to keep a running average, it might be more useful. Also a record of the maximum might be interesting too. Any comments welcome as I’m an admitted newb


#15

Ha, my wife used to have a Miata so I know your pain!

Here’s one sample using an array for a variable - takes away a lot of the manual labor you did in your original. If it’s clear as mud, let me know and I’ll walk you through the thought process.

I made this one in case there was some desire to have the 10 measurement intervals you had. I’ll post up an even more simplified one in a few minutes:


#16

Here’s another method. Using the TEST button on this piston will initialize your variables so the rest of the piston will execute correctly.

I don’t have an outlet so just change the expressions where I put [YourOutlet : energy] to physical devices and choose your outlet.


#17

Thank you very much for the replies! I think I was using all global variables simply because I didn’t know better. I will likely change them all to local. I like the test reset functionality. I should be able to combine this all now, the big unknown is finding a threshold that works.