Detecting Fridge Door Openings Without a Door Sensor

I recently stumbled upon an interesting challenge in my smart home setup: detecting when my fridge door is left open without using a physical door sensor. While I have most of my devices connected via Tasmota PowerPlugs, including the fridge, I noticed that leaving the door open was an issue I wanted to address proactively. Here’s how I approached it and the solution I came up with.

The Problem

Normally, my fridge compressor runs for a few minutes and then shuts off. However, if the door is left open, the compressor runs for much longer periods. I realized that by monitoring the power usage of the fridge, I could detect when the door was left open without needing a physical door sensor.

The Solution

I started by analyzing the power usage data of the fridge. I observed that the compressor typically runs for about 20 minutes, consuming around 40W on average. After that, it shuts off for about 45-50 minutes before starting again. This pattern allowed me to set a threshold for detecting unusual activity.

I created a Blockly script that triggers a notification if the average power consumption over the last 30 minutes is equal to or exceeds 40W. This script is linked to the power plug controlling the fridge and updates every time the power value changes.

The Results

This setup has been in place for about six months now, and it has successfully notified me at least twice when the fridge door was left open. It’s been a reliable way to prevent energy waste and potential food spoilage.

Areas for Improvement

While the system works well, there are a few areas where it could be enhanced. For instance, it doesn’t account for other reasons why the compressor might run longer, such as power cuts or routine cleaning. Additionally, once the notification is triggered, it continues to send alerts until the average power usage drops below the threshold. Adding an acknowledgment feature to stop the notifications once addressed would be a great addition.

Conclusion

This project has been a fun way to leverage existing smart home hardware to solve a practical problem. It shows how creative thinking can turn everyday devices into smart solutions. If anyone has suggestions for improving this setup or similar ideas, I’d love to hear about them!