Everything about Internet of Things and more

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

Gearbest  promotion

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:

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:

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.

ESP8266 Arduino Tutorial - Push notification messages example
Arduino code example

- replace the dots with your Wi-fi credentials and
- your deviceId from pushingBox account
#include <ESP8266WiFi.h>

// PushingBox scenario DeviceId code and API
String deviceId = "*************";
const char* logServer = "api.pushingbox.com";

const char* ssid = "**********";
const char* password = "***********";

void setup() {
  // Sending a notification to your mobile phone
  // function takes the message as a parameter
  sendNotification("Hello World from ESP8266!");

void sendNotification(String message){

  Serial.println("- connecting to Home Router SID: " + String(ssid));
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
  Serial.println("- succesfully connected");
  Serial.println("- starting client");
  WiFiClient client;

  Serial.println("- connecting to pushing server: " + String(logServer));
  if (client.connect(logServer, 80)) {
    Serial.println("- succesfully connected");
    String postStr = "devid=";
    postStr += String(deviceId);
    postStr += "&message_parameter=";
    postStr += String(message);
    postStr += "\r\n\r\n";
    Serial.println("- sending data...");
    client.print("POST /pushingbox HTTP/1.1\n");
    client.print("Host: api.pushingbox.com\n");
    client.print("Connection: close\n");
    client.print("Content-Type: application/x-www-form-urlencoded\n");
    client.print("Content-Length: ");
  Serial.println("- stopping the client");

void loop() {}

The most complete Arduino Starter Kit

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!

Gearbest  promotion

Share on: Facebook Twitter Google+

6 Replies to “Internet of Things project – Android push notifications | ESP8266 Arduino Tutorial”

  1. GeeksTips says:


  2. Jeen says:

    Hi .Great tutorial..Can you also send me the circuit diagram showing connections between ESP8266 and Arduino ?

  3. Tri Ananda says:

    Thank you for your tutorial! it’s help me..

  4. Mark says:

    Doesn’t seem to work for me, followed the tutorial, got all of the tests to work when pushing the message from pushingbox to pushbullet, but when it came to the code, it wouldn’t push the notification when I uploaded the code. My WIFI creds are correct as is my ID, so I’m quite stumpted as to why it wouldn’t upload. Maybe a video would help to show if I missed anything?

  5. Collin H says:

    Thanks alot,
    It works like a charm.

Leave a Reply

Your email address will not be published.