USPS API integration? Possible?

It's apparently been done in Home Assistant. It could be done here couldn't it?

That doesn't use a USPS API; from the linked description, it just scrapes your e-mail account for the USPS Informed Delivery messages (an optional but probably often-used part of the Informed Delivery service) and does something based on that.

This would basically require a driver that can act as an IMAP client or similar, plus some work on top of that to do the above. I'm not aware of any such thing existing, likely because I'm not sure there's currently a way to handle the TLS/SSL that most e-mail providers would require to do this (or perhaps no one has found it worth the effort, but that's the biggest roadblock I think might exist off the top of my head).

2 Likes

So keep it in home assistant and connect it to HE with a virtual switch or MQTT to let your system know something happened - you could leave the messaging part in HA.

2 Likes

USPS does have an API but it is meant more for businesses. It has tracking, but is also used for shipping and returns. It also requires an account... so something most people probably would not want to deal with.

1 Like

Not sure I see the point in integrating something like that... (I'm sure there is some sort of use case but I can't see it. Ha! I'm probably just too old..lol)

1 Like

My mailbox is 800 or so feet away from the house due to the long driveway, and you can't see it. They also tend to leave packages at the garage door rather than at the front porch.

I do use the informed delivery service, and it works fine to give me emails when I get mail or package deliveries, but it would be nice to turn on an indicator light for others in the household to know that mail or a package arrived, and possibly even where to look for the delivery.

Putting aside all the opportunity for USPS + API + Sorting Machine jokes here....

This "package at the rural gate/garage/fence post/shade tree" is an issue.

While the reasonably sized locked mailbox is well configured for notifications...this package thing still causes concern.

While notifications from the least reliable of the three parcel services would likely start 'the package hunt' earlier, I think I'm about to go ahead and splurge on one of those oversized boxes for accommodating all but the fishing rod/golf club/pole saw/surf board deliveries. :rofl:

2 Likes

We have one of those big boxes, with just the opening available from behind a high fence with locked gates. We added a Aeotec doorbell button above it in a little “house”, with a sign indicating “If the package is too big, please ring bell”. You could always try putting the notification job on the delivery person, with a sign to ring buzzer when putting something in the box.

2 Likes

The button is cool but ya know, the way things are these days I like knowing when someone is messing with the mailbox at a time that it shouldn't be opened. Kinda see it as a preemptive security alert (if not mere mail bandits then someone casing the joint).

And yes I know, that radio "in a metal mailbox" should not work very well. But for some bloomin reason it does.

I’ve been thinking along those same lines… :grinning: