Internet of Things project – Android push notifications | ESP8266 Arduino Tutorial

How to send push notifications to Android or IOS with ESP8266 - geekstips.jpg

What is the purpose of an IoT project if you cannot access it live from everywhere using your smartphone? Even the name of the concept itself – “Internet of things” – suggests the idea of having remote access to your “things” from any place at anytime. In this ESP8266 Arduino tutorial you will find a 3 steps simple method to send push notifications messages from your IoT project to your smartphone using a standalone cheap a Wi-Fi module.

Examples of IoT applications that requires push notifications:

  • Temperature monitoring
  • Flood / water level monitoring
  • Natural methane gas monitoring
  • Baby wake-up noise alert
  • Door opening sensor
  • Smoke detector

Push notifications from ESP8266 Arduino compatible Wi-Fi module to Android / IOS mobile devices

Is it hard to do it?

Nope, this shouldn’t take more than 30 minutes to make it work. This esp8266 arduino tutorial is so simple that you will just love it at the end. Follow the next steps and in no more than 20-30 minutes your Android or IOS smartphone will receive a push notification like this:

IoT project - Android push notifications | ESP8266 Arduino TutorialProject requirements:

  • ESP8266 Arduino compatible module (Amazon %)
  • 3.3v Power supply for ESP8266 module (Amazon %)
  • Smartphone (Android or IOS) (Amazon %)
  • Wi-Fi Internet connection available (your home router will work)
  • A way to upload code to your ESP8266 (see complete tutorial here)

Note: If you don’t know what an ESP8266 is, you should read this complete ESP8266 module tutorial first, and than continue.

Were do you start?

Step 1: setup the PushBullet service (free)

Pushbullet is an internet service which for SMS sending, notification management and file sending between your mobile devices and pc.”

First you need to go to PushBullet and make a new free account. Activate your account, login in the website and you will see the next screen:

IoT project - Android push notifications | ESP8266 Arduino TutorialClick on you mobile OS type (Android or IOS) or go in the apps market / Google play and search for PushBullet and setup the application on your mobile device using the same account you’ve just created. After that you should see your mobile smartphone in the Devices menu.

IoT project - Android push notifications | ESP8266 Arduino TutorialGo to Settings menu and create a new Access Token by pressing Create Access Token button.

IoT project - Android push notifications | ESP8266 Arduino Tutorial

IoT project - Android push notifications | ESP8266 Arduino TutorialGet the access token and save it to a notepad text file.

Step 2: Setup PushingBox, IoT notification center (free)

“PushingBox is a cloud that can send notification, emails, tweets based on API calls in real time.”

Go to PushingBox, create a new account for free and login. Go to Dashboard and click on My Services – > Add a service. Select PushBullet service from the list and you should see the following screen:

IoT project - Android push notifications | ESP8266 Arduino TutorialGive it a name, and paste your pushbullet token which you should have in your notepad text file and submit the form. After that go to My Scenarios and add a new scenario. You should now be able to add a new Action to your scenario.

IoT project - Android push notifications | ESP8266 Arduino TutorialThe text between the $param$ signs will be your HTTP GET parameter, you will see in the code later. You will be able to replace each parameter like that with your data like temperature or humidity. Save the action and go back to your virtual scenarios list. You should be able to see your new scenario and copy the DeviceId.

IoT project - Android push notifications | ESP8266 Arduino TutorialStep 3: Code example for your ESP8266 Arduino compatible module

This code is very simple to use, it just connects to your Wi-Fi router and then sends a HTTP request to pushingbox API related to your unique device ID. Modify the code by replacing the **** with your Wi-Fi credentials and your PushingBox deviceId. Upload the code to your ESP8266 and test it.

Final thoughts

You can send notifications just by using PushBullet standalone, without PushingBox but in order to do that you need to use HTTPS requests with secure connection, and you may consider finding a certificate. Also you need to send a specific data model in JSON format. For more information read the PushBullet API documentation. I use PushingBox because it offers many services, not only for PushBullet, and also the API documentation for PushingBox seems more clear.

PushingBox and PushBullet are two incredible powerful free platforms which you definitely need to try them if you are building an Internet of Things project. I recommend you to test them, the APIs are quite easy to work with, and the features are freaking awesome for paying nothing.

Also if you are interested in monitoring temperature and humidity with Arduino or ESP8266 you can read this Arduino temperature sensors tutorial.

Hoping that this article inspired you, i kindly invite you share this articlesubscribe my YouTube channel and join the communities on social networks. Please feel free to comment or send suggestions / remarks so i can improve the content quality!



1 comment » Write a comment

Leave a Reply

Required fields are marked *.