I had that problem a few years ago on the fridge and freezer at the house. I found online a DIY door alarm that ran on a battery. It had a timer that you could set somewhere between 30 seconds to 2 minutes or so. Think it was less than 10 bucks to build.
Scott and Deanna Brandstetter
2014 Tiffin Allegro Bus 45LP
Domicile and current home, Jacksonville, FL