Introduction: Mailbox Notifier Using a Smartphone

About: Known in other pages as Juanke234 or L99, I'm a young person which likes to make great things with few resources.
Si lo quieres ver en español, pulsa aquí
NOTE: The original idea is from JohanMoberg's "Mailbox Notifier" project

Hi, I'm Kevin

I saw JohanMoberg's "Mailbox Notifier" project and I liked it, but I haven't got any knowledge of electronics, programming and soldering, so I decided to make this project.

For this project you will need two Android devices and a computer.

One will act as sensor and the other one will be the notifier.

The sensor device must have a proximity sensor (a piece which turns off the touchscreen when you take the phone to the ear). The notifier device can be a tablet or smartphone, but both will need Internet connection.

I won't provide the APKs I made because this apps uses an unique identifier, so you'll need to setup it yourself.

Step 1: Using MIT App Inventor

I used MIT App Inventor 2 because you can create apps without almost programming knowledge. I'm some experienced since I created other app for a forum.

To start, go here and log in with your Google account (if you have a Play Store account you will be able to publish your apps in there, not my case).

Download the files I'll leave on this step and when you are on the main screen, press "Projects▼" and select "Import project (.aia) from my computer".

First import "Sensor.aia". It's already optimized for AMOLED devices (saves battery using AMOLED screens).

Then, install "MIT AI2 Companion" searching it on the Play Store.

In your computer go to "Projects▼" and select "AI Companion". Don't close the page, we'll need it later.

Now, scan the QR or write the code on Companion and see the results.

If you cover the upper part of your phone, the letters should be yellow/brown and distance equal to 0.

Without covering the phone, the Mail Sensor text should be blue and distance 1.


If all is OK*, continue.

Step 2: Setting the Key

Once we know our device is able to work as a proximity sensor, we have to setup a 'private key'.

This is essential because it's like an identifier. Otherwise, if everyone had the same key, everyone will have the same status on all their phones (there's mail or no mail).

In App Inventor, go to "Blocks" (top right corner) and find the PersonalNotifierKey text. Here write something, but not common. Think something other people won't get (random letter/numbers or a name mixed with symbols).

If someone uses your key or viceversa, you'll get undesired effects.

If done, keep this key and go on:

Go to "Build▼" and:

  • If you have a QR scanner, press the QR option and scan it.
  • If you know about using ADB or installing APKs, select "Save .APK to my computer"
  • You will install this on the sensor device. Maybe you'll have to enable a security option to allow the installation.

Step 3: Finishing the Setup

Now import again a project, but this time use the "Receiver.aia" file.

Go again to "Blocks" editor and find again the PersonalNotifierKey text. Put the key you previously set on the sensor.

If you want, you can translate the texts to your favourite language (español, français, deutsch...) and change the colours of the alarm.

Now, do the same as before:

Go to "Build▼" and:

  • If you have a QR scanner, press the QR option and scan it.
  • If you know about using ADB or installing APKs, select "Save .APK to my computer".
  • You will install this on the notifier device. Maybe you'll have to enable a security option to allow the installation.

Step 4: Installation and Test

To install Sensor and Notifier apps:

  • Once APKs are downloaded, transfer it to your device.
  • On your device, find the file and select it.
  • If it appears a security warning, go to Settings -> Security -> select Unknown Sources
  • Come back and install the app
  • Open Mail Sensor on the sensor device and Mail Notifier on the device you'll use to check the notifications
  • Try covering and uncovering the sensor device to check the alert (it updates every 5sec)
  • If it works, put the sensor into your mailbox and you will be able to check your mail remotely
  • To stop this, press the menu button and select 'Stop this application'

If it's well used/configurated this can be used as intruder alert too.

In the video I show how this works.

Hope you find this useful

Kevin

IoT Builders Contest

Participated in the
IoT Builders Contest