I’m releasing a new app I put together to solve the headaches of standard mailbox monitoring.
Most of us start by tying a simple Rule Machine rule to a contact sensor on the mailbox: If open, announce "Mail is here!" But that simple logic usually falls apart in the real world. The mail carrier opens the box three times to fit a package in, or the UPS guy drops off a secondary delivery hours later, and suddenly your house thinks you retrieved the mail when you actually didn't.
Advanced Mail Monitor is designed to be a true state machine. It doesn't just look for "open/close" events; it uses heuristic logic to figure out what that open event actually means.
Key Features
- Built-in Live Dashboard: No need to build a separate Tile. The app features a live HTML dashboard right inside the configuration page. It shows today’s delivery/retrieval times, historical averages, contact sensor battery health, and current state.
- Secondary Delivery Protection (The Interlock): This is the killer feature. You can select exterior doors (Front, Garage) or Mobile Presence sensors. If the mailbox opens, but no one has arrived home or opened a door recently, the app knows it's a second delivery (like UPS/FedEx) and won't falsely log it as a retrieval.
- Carrier Lockout Timer: Prevents a barrage of notifications if your mail carrier opens and closes the box multiple times while organizing packages.
- Temperature Tracking: If you have a sensor that reports temperature, the app will monitor the internal heat of the box. It sends a daily warning if the temp exceeds your threshold while mail is waiting (great for protecting medications or electronics in the summer heat).
- End-of-Day Nag Reminders: Forgot to grab the mail? Set a time, and the app will check if the mail is still waiting and hit you with a push notification or TTS announcement.
- Security Alerts: Define a nighttime security window. If the box opens at 2:00 AM, it bypasses the normal logic and immediately sends a security alert.
- Deep Notification Integration: * TTS Smart Speaker announcements (different messages for delivery vs. retrieval).
- Color RGB bulb support (turns a specific color when mail is waiting, turns off when retrieved).
- Native Inovelli LED notification support.
- In-App History Log: Keeps a rolling log of the last 20 events (Deliveries, Retrievals, Lockouts, Battery warnings) directly in the app UI for easy troubleshooting.
Installation
- Open your Hubitat Elevation hub.
- Go to Apps Code -> New App.
- Paste the code from the link below.
- Click Save, then click the OAuth button (if you use external dashboards, otherwise optional).
- Go to Apps -> Add User App and select Advanced Mail Monitor.
Open Source / Do What You Want
I built this to fit how my house operates, but I know everyone's setup is different. Anyone can use this code, steal from it, or edit it. Feel free to rip out the dashboard HTML for your own apps, modify the state machine, or fork it entirely. If you add something cool, drop a comment below so the rest of us can see it!