Create your own Smart Fridge!

by Kenny Myburgh on June 23, 2021
Caught In Action

Why not create a simple smart home automation to announce when your fridge door has left open ?

If there was a Rand for every time I have asked who left the fridge open I would be a person with a lot more smart home accessories!

I am sure this happens in every household and to be honest this was more in an effort to draw attention to the fridge door being open, as on so many occasions the family grabs a bottle of water or their lunch for the day on the way out to school or work and only noticed when everyone arrives back home.

For this DIY project I figured adding a camera to the mix would add some entertainment and validity to my suspicion of who is commonly at fault, but after a few weeks of seeing it in action we were quite surprised at the results...

 

What Hardware I used for this project:

You can turn your fridge into another one of those smart home devices by making use of the following hardware.

 

Milney Hub, Zigbee, Ezviz

 

Method used:

The configuration is quite straight forward once you have your Home Assistant and Zigbee Bridge/dongle integration in place. Simply pair the Aqara door sensor with ZHA followed by mounting it to the fridge door which would detect when opened.

The Ezviz camera was a spare which I integrated with Home Assistant and then mounted in such a way to get a clear picture of the said perpetrator in action(This took some trial and error).

Once the hardware was in place it was a case of creating an automation for the camera which would first take a snapshot when the fridge door is opened and then if it is left open for 5 minutes trigger a separate automation that announces that the fridge has been left open on our Google Home speakers followed by a push notification to my wife and I Home Assistant smart home app with the alert and snapshot that was taken.

Automation:

 #Camera Snapshot#

alias: Kitchen Fridge Snapshot
description: 'Takes a Snapshot when the fridge door is opened as evidence!'
trigger:
    - entity_id: binary_sensor."YOUR_ENTITY"
     from: 'off'
     platform: state
     to: 'on'
condition: []
action:
    - data:
          filename: /config/www/fridge/snap.jpg
      service: camera.snapshot
      target:
         entity_id: camera."YOUR_ENTITY"
mode: single

#Fridge Notification#

alias: Fridge Door Open
description: 'Announcement on Google Home & Push Notification to Phones with Evidence'
trigger:
    - platform: state
      entity_id: binary_sensor."YOUR_ENTITY"
      from: 'off'
      to: 'on'
      for: '0:05:00'
condition: []
action:
   - service: notify.notify
     data:
         message: Fridge door is open, please check and close
         title: 'ALERT: Fridge Door Open'
         data:
             image: http://10.10.8.8:8123/local/fridge/snap.jpg
   - service: tts.google_translate_say
     data:
         entity_id: media_player."YOUR_ENTITY"
         message: >-
         Attention, The fridge door has been left open. The culprit information has           been forwarded to the authorities. Please proceed to close the door as             soon as possible.
mode: single

 

Guilty Verdict

It turned out that my wife was as guilty of leaving the fridge open as my youngest daughter...

BACK TO TOP