Mailbox theft is a growing concern for many homeowners. Not only can it result in the loss of important mail and packages, but it can also compromise personal information and identity. We have had our mailbox pried open, and have had some packages taken. The first thing that we did was to replace the mailbox with a stronger locking mailbox. This makes it harder for people to pry open the box, and it prevents people from reaching their hands in to grab the letters or packages.
But a locking mailbox doesn't completely solve the problem, it just adds barriers to slow potential mail and package thieves. I also wanted to implement something that would minimize the time that mail remains in the mailbox.
There are several goals that I wanted to accomplish with these notifications
- Generate notifications, on my phone and in the speakers in the house, when new mail is received.
- Generate reminder notifications, if new mail has been sitting in the mailbox for too long
- Generate notifications, if the mail retrieval door has been left open too long
- Turn on the lights in the front of the house (primarily landscape lights) if the mailbox door is opened after midnight.
For these notifications, I needed to determine when the doors, for new mail and the one where the mail is retrieved are opened. I was able to use two Aeotec SmartThings Multipurpose Sensors to do this. For the new mail door, I placed the sensor on the right side of the mailbox, where the magnet is mounted to the bottom part of the moving door.
For the mail retreival door, I mounted the sensor on the left side of the mailbox. Since the door has a thick lip, I needed to use some shims to make sure that the sensor aligned with the magnet.
Since these sensors are Zigbee sensors, that rely on RF signals, the metal sides of the mailbox significantly reduced the range for these signals. The Zigbee controller in the house wasn't able to get data from these sensors. The mailbox is about 20' from our house, and luckily there is an outlet on the corner near the mailbox. I added an Enbrighten Zigbee Outdoor Plug-In Switch to my Zigbee network, and plugged it into the outdoor outlet that is closest to the mailbox. This switch was able to bridge the signals from the sensors in the mailbox to the rest of the network.
With the sensors reporting data, here are the automations that I created
New mail notifications
This automation is triggered when the new mail sensor is opened. But, since I didn't want to wake up our kids if someone opens it at night, I added a condition that this should only get triggered between 9am and 10pm. The automation looks something like this, in Home Assistant:
- When the new mail sensor is opened and the current time is between 9am and 10pm, run the following steps
- Send a notification to phone (via Home Assistant Android Android app)
- Set the "mail arrived" helper boolean to true
- Set the "mailbox last triggered" datetime helper to the current timestamp
- Send a "You've got mail" TTS message to be spoken on the speakers around the house
Reminder notifications
This automation is triggered, for me, at 5 and 8pm. When the trigger fires, it checks to see if the "mail arrived" helper boolean is true. If it is, then it sends the reminder notifications. This looks something like the following:
- At 5pm and 8pm, check whether the "mail arrived" boolean is true. If it is, then:
- Send a notification to the phone
- Send a "Remember to get the mail" TTS message to be spoken on the speakers around the house
Reset Mail Delivered
This automation is triggered when the mail retrieval door is opened. It looks something like the following:
Notification if the Mail Retrieval door is opened too long
This is an pretty easy automation, where a notification is generated if the mail retrieval door is opened for more than a minute. It looks something like this:
- If the Mail Retrieval sensor is opened for longer than a minute, then:
- Generate a notification on my phone, with some text like "Mail retrieval door left open"
Turn on lights when mailbox is opened at night
For this automation, I want to trigger some lights to be turned on, if the mailbox door is opened late at night. The automation looks something like:
- When the new mail sensor is opened, and it is after midnight and before 6am, then run the following steps:
- Turn on the front landscape and garage lights
- Wait 10 minutes
- Turn off the front landscape and garage lights
Future changes
Here are some changes that I will probably make in the future
- Merge these automations into a single automation, using multiple triggers and conditions;
- This would allow this collection of automations to be enabled/disabled as a single unit
- Change from the tts.cloud_say to the notify.google_assistant_sdk service
- If the speakers are playing audio when a notification happens, the tts.cloud_say will cause the audio to stop. The new notification service from the google assistant sdk is supposed to not have this problem.
- Remove the "mailbox last triggered" helper, as it isn't used.
No comments:
Post a Comment