Story
I have a nearly all my devices connected with a Tasmota PowerPlug, this incl. the fridge.
I left it open one afternoon and noticed it an hour later, by getting distracted by noise of the fridge compressor.
Normally the my fridge compressor is only working for a few minutes, then it shuts down.
The Idea
As I saw the power usage chart, I thought it must be possible to detect if the compressor is working longer then expected. This would indicate that we have an issue there and a notification can be sent.
My solution
At first determine the how long the compressor is on usually and how much power is used in average.
I used the power chart and found, usually the compressor is working about for 20 minutes by using about 40 W in average. Then it takes about 45-50 minutes until it starts again.
This means the average power over 30 minutes must be lower than the average value when the compressor is working.
On the other hand if the average value over the last 30 minutes is >= W, the compressor is working much longer than the usual 20 min.
I created a blockly script which is triggers a notification, if the average power over the last 30 minutes is larger than or equal 40 W.
This script is triggered every time the power value is updated by the corresponding power plug item, in my case âPowerPlug06_PowerPlug06Powerâ
Result
I have this setup in place since 6 month and I was notified at least 2 times because a door was not completely closed.
What to improve
Obviously there can also be other reasons (e.g. power cut, cleaning) than an open door, or it take a while until you can close the door.
The script does not stop sending notifications until the average value is below the trigger threshold.
Here an acknowledgement functionality would be useful.