Safedrop: A Smarter, Safer Mailbox

AT&T Developer Hackathon is bundled in with the annual AT&T Developer Summit held at the ritzy and gaudy Las Vegas. I had the pleasure of attending this event, which straddled 2015 and 2016. It was a wild New Years for sure — absence of a fake notwithstanding.

Cue the competition, in a spacious, terraced auditorium towards the back of the Palms Hotel:

The view from the balcony office we were able to cop ;)

I was fortunate enough to worm up with a team of good guys from Oracle, who had ran up to the balcony and set up shop in a box room on the balcony, offering a little solace from the buzz of the main floor. Namely, there was Os, Yuhua, JP, and me, who had all collectively chosen to hunker down and build something cool for a weekend.

The event’s theme was mainly IoT, with various subcategories relating to different fields where IoT could conceivably make the world better. This goes hand-in-hand with the release of AT&T M2X, a recently announced platform for creating and managing such internet connected tools and things. All of the vendors and presenters at the event peddled gear and advice on IoT development, and high-tech gifts rained from the sky (far better than the run-of-the-mill CalHacks t-shirt giveaways I’m accustomed to at school). We quickly organized our thoughts and devised a feasible and catchy project:

Behold! The Safedrop.
The Problem:

During the holiday season, people purchase deliveries from the internet more and more, which are susceptible to delivery theft.

Our Solution:

An IoT-connected mailbox that keeps track of what packages the owner is expecting, and securely stores delivered packages which pass a barcode scan test.

We were also able to create a companion mobile app with which the owner could view their deliveries and open Safedrop. Finally, to prevent funny business from the deliveryperson’s end, a webcam was installed inside the box, which streams a live feed of the package deposit to the owner’s app each time it is opened.

Process and Execution:

Physically, we used a cardboard box for the prototype, opening up at the top. On the front of the box, we cut out holes for an Android phone screen and its camera to work as the barcode scanner interface. The locking mechanism (a simple servo) and webcam were all hooked up to an Intel Edison module, which rides atop a basic Arduino chip. The companion app ran on another Android phone.

Code-wise, I was in charge of managing the Safedrop box interface. The Intel Edison board came with an SDK, which works best with Cordova, so I picked it up. It was wild to work with, since I’m typically a web developer and an Android developer, but Cordova kind of melds the two worlds together in an interesting way. After finding a barcode scanning library and hacking it to make it work with an Android phone’s front camera, I could easily hook up a call to begin the unlock procedure on the physical box — turning the servo, turning on the webcam, and whatnot.

Os created a cute and nicely functional companion app, Yuhua constructed the IoT server with AT&T M2X and MQTT which could communicate between box and app as well as store the webcam streams. JP worked on the design of the app and box, and put together and nice slidedeck for us to play during our pitches.

I had challenges with both the physical build as well as the code. Finding a way to construct our Safedrop in a way that wouldn’t mean an absolute mess of wires and cables inside was actually more gymnastics that I was expecting.

For our apt and effective use of the Intel Edison chip and its suite, including the Cordova app, we were able to net ourselves the Intel Edison Second Place Sponsor prize! Each of us on the team received the newest Intel fitness watch, the Basis Peak.

If you’d like to learn more about my project, or build one such thing yourself, I put all the exact nitty-gritty details in an Instructables post.

Hope you enjoyed the ride!