While You Were Gone: Getting Alerts If Our Camper Storage Doors Open

TenFootStripes
By -
0

Storage doors are an easy target, and it’s impossible to keep an eye on them when you’re miles away from the campsite. Whether we’re out exploring for the day or just heading into town for a few hours, the camper spends a lot of time sitting unattended. We wanted a way of knowing exactly when a storage bay gets opened the moment it happens, rather than coming back later and realizing something is missing.

Camper parked by itself at a campsite surrounded by stillness
When the campsite goes quiet and the camper stays behind


The Brains: ESP32 and Home Assistant

We use Home Assistant as the smart hub for our camper with ESPresense installed on an ESP32 development board handling the heavy lifting for presence detection. So, to keep this project simple, I used that same ESP32 to pull double duty. Since it was already running ESPresense to monitor whether we were at camp or not (and publishing it to an MQTT broker), I also set it up to monitor our storage bay doors. We supplement our presence detection using the wireless client list from our Mikrotik LTE router, but that's for another post.

On the ESP32, I configured pins 12 and 13 to be Button 1 and 2 in the ESPresence web interface with internal pull-ups. A tiny magnetic reed switch was installed on each storage door and wired to their respective pin on the ESP32. When a door opens and the magnetic circuit breaks, the ESP32 registers the change and publishes it to MQTT.

Configuration page for ESPresense button settings with timeout and trigger options visible
This screen is found by clicking "Click here to edit other settings!" at the bottom of the main menu


One big "real world" benefit of using ESPresense here is the built-in "debounce" timeout, which defaults to 0.5 seconds. If we’re driving down a bumpy road or a door jiggles in the wind, it won’t trigger a false alarm. The sensor only fires if the door is actually opened and stays open for a moment.

Converting Raw Data to Proper Sensors

To make these behave like actual doors in Home Assistant, rather than just generic buttons, I used template sensors in Home Assistant to wrap them into binary_sensor entities:

 
# storage_doors.yaml
# Converts ESPresense sensors (on/off) into door-type binary sensors

template:
  - binary_sensor:
      - name: "Storage Door Rear"
        unique_id: storage_door_rear
        device_class: door
        state: >
          {{ is_state('sensor.espresense_camper_button_1', 'ON') }}

      - name: "Storage Door Side"
        unique_id: storage_door_side
        device_class: door
        state: >
          {{ is_state('sensor.espresense_camper_button_2', 'ON') }}

Using the reed switches makes the hardware side as simple as it gets. There are no batteries to change and no complex wiring. It is just a closed circuit that breaks when the door opens.


The Automation: Only Alerting When it Matters

The goal was to avoid notification fatigue. We don’t need an alert when we are the ones opening the doors to grab gear. The automation only triggers if the door opens AND both of our person entity locations are set to not_home:


alias: Alert Rear Door
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.storage_door_rear
    from:
      - "off"
    to:
      - "on"
conditions:
  - condition: state
    entity_id: person.cerinia
    state:
      - not_home
  - condition: state
    entity_id: person.tommy
    state:
      - not_home
actions:
  - action: notify.family_phones
    metadata: {}
    data:
      message: Rear storage door was opened and no one is at the camper.
      title: Rear Storage Door Alert
mode: single

The automation for the side door is essentially identical, just swapping the sensor, the message, and the title. The beauty of this setup is that it only reacts in the one situation we actually care about: someone opening a door while the camper is unattended. All the other times, opening doors while we’re around, moving gear, or just checking on things, it stays silent.


Home Assistant push notification on a phone showing a rear storage door alert while no one is at the camper.
This is what we see if a storage door is opened while we’re away from the camper. No checking, no guessing—just a quick alert when something actually happens.


Why We Like It

The best part of this project was how much we got out of a single piece of hardware. Since the ESP32 was already sitting there handling presence detection, it was easy to just wire in a couple of reed switches and let the board handle the extra workload. It saved us from adding more "smart" clutter to the rig or having to keep track of a bunch of separate battery-powered sensors that eventually die.


It’s exactly the kind of setup we prefer: simple, hardwired, and out of sight. Having that extra layer of security integrated directly into what we already built takes a huge weight off our shoulders. It lets us actually head out and enjoy wherever we’ve traveled to, knowing that if something does happen back at the site, we'll be the first to hear about it.


Post a Comment

0 Comments

Thanks for stopping by! All comments are moderated for spam and clarity.

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

We use cookies to track your site preferences, not your trail through the woods. Happy camping!
Ok, Go it!

TenFootStripes | Camping, Simple Living & DIY RV Tech