My Mailbox Automation - Documented

My wife and I like to know when the mail has arrived and then go retrieve it. We don't have issues in our safe neighborhood with mail theft, but if we did that would be even more reason. Combine that with my need to continue to find home automation projects to keep me busy led to tackling the mailbox.

The majority of my home automation network is Z-wave. My daughter's room is at the front of the house facing the street and where the mailbox is located, about 30ft away from her bedroom window. In her room I have a GE smart in-wall switch and a GE plug-in smart switch for lights, both are main powered repeaters and support beaming.

The mailbox is entirely made from metal which lead to the first issue to overcome. I went outside and tested a Z-wave contact sensor and it would report events outside the mailbox, but not while inside. Which then lead me to find a contact sensor with dry contact and then use a separate reed magnetic sensor.

Parts list:

The key with the dry contact sensor and magnetic reed switch is I can put the switch inside the metal mailbox and the contact sensor outside.

Ok so now I have a working sensor that triggers when the mailbox is open/closed, now for the automation side.

Automation steps:

  • Created a virtual switch in HE called "Mailbox Status".
  • Created Simple Automation Rule 1.1 rule that when the contact sensor is opened it turns on the virtual switch.
  • Passed the status of the virtual switch through Maker API > Homebridge > Apple HomeKit.
  • Created HomeKit automation that when the virtual switch turns on to play a single chime bell on the Apple HomePod Mini located in the kitchen/living room area.
  • Created an Apple Shortcut where at anytime you can ask any of the HomePods throughout the house "Hey Siri, has the mail arrived?". The shortcut checks the status of the virtual switch and responds with either "Yes, the mail has arrived" or "Sorry, the mail has not arrived yet".
  • Created a Rule Machine 4.0 rule that each day at midnight resets the virtual switch to off, so the next day the automation cycle can repeat.

So now each day the second the mail is delivered we get a chime bell played. If we miss the chime we can at any time ask Siri if the mail has arrived yet and she will let us know. The automation all works instantly, as I can hear the chime and look out the window to see the mailman pulling away from the mailbox.

8 Likes

These Ecolink sensors are amazing. I use one to monitor power outages at my house. Having the external connections like that is a game changer.

I would love to do this with my mailbox, but in my neighborhood the mailboxes are bunched together. So mine is with 4 others and is across the street and about 2 houses down. I have thought about trying this, but I really don't think I could keep a reliable signal with that distance. If I buried a repeater at the edge of my property, it might work, but that would just be a mess. Also, I live in a cold climate. So even if it reached, the battery would probably last a week in the winter time.

1 Like

Luckily, I have a plastic mailbox and a zigbee contact sensor works. I'm surprised at the range and cold weather performance.

I use the same hardware suggested in the thread. The battery is holding up really well this winter, we've been -2 to 20 for the past week. Its been installed a little over 9 months and the battery s 80% (if you believe battery reporting.

I'm surprised to see that level of cold weather performance. I hope you are talking in °F? Because that is similar weather to where I live. Maybe I'll pick one up and give it a try!

1 Like

Yes in F. I have it set up for Alexa to say "you've got mail"... and send a text message to my phone.

Good to hear. Yeah a couple weeks back we had -10°F weather, but its began warming up since then. I do like the larger battery on the ecolink sensors. I've had a few around a year (inside on doors) and haven't touched them. I'm hoping they make it 2-3 years before needing replacement

I have sensors on my gates. It is mainly to trigger my security lighting when a gate is opened at night. The side effect is that when the mail or a delivery arrives I get a "Front gate open" alert on Alexa. It works really well.

Recently I've been noticing that often it will go a few days without an alert. I was wondering if the sensor was having range issues or the Alexa integration had failed as I should have plenty of junk mail over the days. One day I was looking at my Ring gate cam and caught one of the mailmen reaching through the fence and putting the mail in the box.

Just when you think the system is failing somebody finds a new edge case. :smiley:

Add a mercury switch inside the case for tilt sensor goodness!!!

edit: maybe not for THIS application though!!

Our mail lady will drive into our driveway and walk the mail to our garage... Ive been thinking about license plate recognition with the Rpi to capture this...

Have any of you had issues with this Ecolink sensor dropping off? Grabbed one, to use with a wired reed switch (on my front gate) that's wired underground back to my house about 15ft so to keep the sensor indoors. But the sensor has become "unavailable" or guess you'd say dropped off the mesh twice in a day and all I knew to do was exclude and re-add it.

It is the only Z-Wave sensor I have and currently, it's about 5 ft from the hub, lol.

It was finicky when added 1st time. It added, but LED stayed on and battery dropped to 80% while I was trouble shooting. I excluded and re-added, and the LED went off and it worked as expected and battery has held 80%, but has fallen off 2x.

Was there a handler script for this? It only comes up as a Generic Z-Wave Contact Sensor.

Any thoughts/opinions? THanks! :slight_smile:

There is not a customer driver (handler script) that I am aware of. My Ecolink sensor is using the "Generic Z-Wave Contact Sensor" built into HE.

I would venture to say you might have gotten a bad sensor, the behavior you describe I am not seeing. My sensor as you can see is outside on the mailbox approx 30ft from the nearest repeater inside the home and I have no issues. So yours 5ft away from the HE indoors should be no issue.

Very good, thanks!

It's been back on a 4-5 hours and functioning. Wait and see what it does. Hope it's not a problem child.

This is one area where SmartThings interface was nice, telling you certain sensors were offline right on the main screen. Only reason I saw it was I was looking to see about the driver.

Thanks for this idea! I've wired up my reed switch and the contact sensor and it's all working (not yet installed in the mailbox, but paired with HE). However, the wires that came with the reed switch are too short for how it's going to fit in my mailbox (it's in a brick enclosure). I'm assuming that I can just extend the wires? Do you know if there are any gotchas if I do that (type of wire, length of wire etc.)?

I've heard of people extending these wires over a long distance (think buried in the ground connecting back to a garage). Just grab a spool of stranded 2-wire from Home Depot/Lowe's that is the same gauge (likely 24-26ga) as the leads on the reed switch and you will be fine any distance you need within the brick mailbox.

1 Like

Tried Lowe's and the smallest size they have is a 20 (the switch wires are 24 awg). Just ordered from Amazon :crossed_fingers:t3:

1 Like

Can you explain your failure a little better? Is it showing as offline in the IDE? Or is it just not sending the commands of open/closed?

These sensors are battery sensors, and seem to use a very little amount of power. They have a 2-3 year battery life. I believe these sensors go into a sleep mode where Hubitat will think that they are offline, but when the contact sensor is actually triggered it wakes up and sends the command.

I notice this with a couple I have. I have one monitoring an egress window in my basement, and one monitoring the power from utility. Both of these sensors are rarely ever used. Honestly, the power outage one is used more, but typically when I am simulating an outage.

They show offline all the time, because they are not being 'woken up' and forced to send a command. Though, within seconds of the power going out, I get a notification on my phone. Whether its been a day since use, or a month, the sensor always seems to be reliable.

The other point of concern would be that you're using an external sensor. Try to verify that the external sensor is actually reliable, so you know the Ecolink device is working properly. It blinks the light green anytime the reed switch changed. If you have someone toggle your reed switch, and you watch the light you should see it change every time the reed switch is opened or closed. If not, then you may have a wiring or reed switch issue.

I have 4 of these devices most I have had over a year now. I believe the battery reporting on all of these devices shows over 80%. I expect the battery to at least last 2 years for me, but we shall see. I highly recommend these sensors, as I have only had good luck with them. Though, it is possible you did receive a bad one.

1 Like

Hey there, thank you for a nice query AND explanation about a few things regarding this sensor.

Well, not sure I can add very much to what I stated really. BTW, it has been a good citizen for a few days now.

Initially, it paired and the green light stayed on solid however it was not functional. It also went from from 100% battery to 80%

I excluded and re-added, seemed ok. Green light was out as expected now. I Went to look a few hours later and it was non functional and offline. Excluded/re-added, all well for a few a hours... It malfunctioned again later that day and I excluded/Re-added, and it has been great since. And oddly THEN the battery went back to 99%. So far I have not seen it disconnected or offline. Like it wasn't adding properly, but that's beyond my pay grade. It's acting different now, it's working. All three times it was offline in the IDE and not recieving/sending O/C commands.

The reed sensor on the gate is functioning properly. Wiring is new and connections are good/crimped sealed, heavy outdoor jacketed phone cable. Ran alongside CAT5 (not currently in use) and buried in PVC electrical tubing about 12 or so ft and runs into a basement wall with the sensor inside about 12 ft from the HE hub now.

But again, it's back up and been great for a few days now with battery back at 99%. Seemed like it was not pairing correctly? Seems odd that would happen.

I did a similar thing for gate open/close sensors , but with LoRa instead of zwave (due to distance).

That doesn't really help anyone on hubitat today, but I mention it as LoRa and Zwave LR work very similarly.

So eventually things like this will be pretty easy, even over long distances, with Zwave LR (which the C7 hub will support sometime after SiLabs releases it to the world).

I'm very much looking forward to it.

1 Like

It seems like you have some really odd stuff going on. Your wiring to your contact sensor sounds good, so I would assume that is not your problem area. Given what's going on with the sensor, it sounds like it may be faulty.

Honestly, I'd recommend buying another and trying it out. If it works good, then just return the one you currently have and call it a day. If it doesn't work, then you may have something else going on. Though, I don't want to open that can of worms until we have to.

If I were in your shoes, I would just get another sensor and see how it performs compared to the one you have.

1 Like