IoT Push Notification Using Nodemcu on Phone(For Anything)

16,726

61

23

Introduction: IoT Push Notification Using Nodemcu on Phone(For Anything)

About: Nothing just a tech enthusiast and by degree an Electrical Engineer

Sending notification for messages, emails are old fashioned...

So lets make something new that is very easy and simpleNO COMPLICATED SERVER SIDE PHP HOSTING OR OTHER COMPLICATION...

Home automation, water pump level, garden watering, automated pet feeding, PIR alarm and much more whatever you want to get notified on your phones.(android/iOS)

ENJOY and be lazy but get notified!!!!!


Step 1: Components Required

the main component is Nodemcu(ESP8266) or any other equivalent development boards like adafruit huzzah, wemos d1 mini etc.

And the sensors to use depends upon your need...

I'm using the notifier to notify my previously made internet/cloud controlled project, PIR alarm circuit, ultrasonic sensor controlled water level, IR sensor door!!

After the configuration of sensors the vital thing left is programming.

To configure nodemcu in arduino please visit my previous instructables...

NOTE: Please read the whole instructable don't half read it and damage your kits, I will not be responsible :P

Step 2: ESP_Notify and Library

We can find the ESP notify application on google play store or we can get the apk from anywhere esle.

After installing the app we need to

  1. SIGN IN(using google account)
  2. press the SEND TOKENs option
  3. use your email
  4. in email you will get the USER ID, DEVICE ID and Library zip URL
  5. download the zip from the link

Once the library is downloaded you can add it to your Arduino IDE by

  1. clicking on Sketch
  2. Include Library
  3. Add .ZIP Library in the IDE and then selecting the downloaded ESP_Notify-master.zip file from your Download folder.

Step 3: CODING

To know something about the library go for the examples in arduino:

  1. File
  2. Examples
  3. ESP_Notify
  4. send_notification.

To make it work just do change 3 things your WiFi SSID (name), WiFi password and Device_Id.

Device_Id you can get from the email forwarded previous by SEND TOKENS.

So after testing the code we can now tweak it for our use like previously told...

Home automation, PIR alarm, water level alrm, IR door sensor notification

NOTE:** PLEASE CHECK THAT DEVICE_ID IS PROVIDED RIGHT AND IN PROPER QUOTATION(NO MISALIGNED QUOTATION)**

Step 4: Circuit Wise Program

I have used PIR sensor, Ultrasonic sensor, IR sensor for different works as well as in cloud controlled project I have inserted the library and used the "notifier.sendNotification(device_id,"header","message")" in desired places to get notified on my phone on actions.

According to my code I have used pin D0,D1 for Ultrasonic sensor, D2 for PIR, and D3 for IR sensor.

So download the above given code and modify it like you want.

Step 5: ESP Notify App

From the app we are getting the desired notification and its the simplest app I have found for notification with ESP8266. It's not the best but the simplest.

Pros- very easy, simple, reliable

Cons- couldn't find if parameters can be passed till now, may be added afterwards..

Thanks for the application and the easy to use procedure without going in a hectic process of app, event, php on server creation.

So enjoy and support...

Wireless Contest

Participated in the
Wireless Contest

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    23 Discussions

    1
    anammalik838
    anammalik838

    1 year ago on Step 3

    Nice Project but when i upload the code the serial moniter show this error
    "23:58:12.613 -> <HTML>
    23:58:12.613 -> <HEAD>
    23:58:12.660 -> <TITLE>Forbidden</TITLE>
    23:58:12.660 -> </HEAD>
    23:58:12.660 -> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
    23:58:12.707 -> <H1>Forbidden</H1>
    23:58:12.754 -> <H2>Error 403</H2>
    23:58:12.754 -> </BODY>
    23:58:12.754 -> </HTML>"
    wil you please advice me how i can solve this error

    0
    kedarm5
    kedarm5

    1 year ago on Step 5

    What should we write in esp notify notifier for ultrasonic sensor

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 1 year ago

    its normal one only just add this line "notifier.sendNotification(device_id,"header","message")" in the loop of the ultrasonic sensor for every test case. like algorithm- if distance >500 then D1=HIGH and after that use the aforesaid line with your message.

    0
    NirmalK31
    NirmalK31

    2 years ago

    Thanks for early reply. Sir how can receive same alert message from the same ESP to multiple mobile nos with same token.Is it possible?

    0
    NirmalK31
    NirmalK31

    2 years ago

    Thanks Sir, really very good and easy project.But why"invalid library found"was showing after compiling the code,although it is working fine. Can it work at my office?if ESP is at home.

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    yes definitely it can work in your office just need a wifi over there. same procedure. If we manually put the library it sometime shows invalid library but can be fixed if we put the files in document>arduino>library as well as program files>arduino>library. I hope it works. Thanks for checking out the project.

    0
    LuLusWorld
    LuLusWorld

    Question 2 years ago

    I'm only able to use guest WiFi so there is no password. Would it work if I just deleted the code asking for the WiFi password?

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Answer 2 years ago

    Try it. If deleting it doesnt work do one thing keep quotes as it is with nothing between tge quotes. simply "". no spaces in that. notify me if it works. I never thought of a open wifi!!

    0
    cfieiras
    cfieiras

    2 years ago

    How it works with ios? Thanks!

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    The app is not available for iOS right now. sorry

    1
    fabio123123
    fabio123123

    2 years ago

    It worked as a charm. Thank you very much!!

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    well done. Thanks for trying!!

    0
    D6equj5
    D6equj5

    2 years ago

    Good project but app tell me my email address is not usable.

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    Sorry but I don't have a clue for that discrepancy of the app. This doesn't happen usually try another gmail account!! that may help :)

    0
    gada888
    gada888

    2 years ago

    Nice project,but cannot get the app.

    0
    Fugit185
    Fugit185

    Reply 2 years ago

    I found the app easily, as normal app

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    very pleased to know that... please notify me if you tried this project!! :)

    0
    DavidMyName
    DavidMyName

    2 years ago

    One question. The Ultrasonic (HC-SR04) has 5V logic on the Trig and or Sensor output. The NodeMCU has a 3V3 logic on the input. Official the NodeMCU is not 5V (input) tolerant. You don't have any trouble? I did a project with NodeMCU and Ultrasonic and I us some resistors the level shift 5V to 3V3. I guess for long term operation it is better.

    0
    Abhrodeep Chanda
    Abhrodeep Chanda

    Reply 2 years ago

    I have my cloud controlled nodemcu project installed in my house for more than 2months. And the nodemcu may it be wemos/lolin/amica any model has a logic output of 3V3 but the max input voltage through micro usb or Vin pin can be 12V (max) but not recommended as it doesn't have heat sink with tiny voltage regulator. my power bank used in the project with ultrasonic sensor has output voltage of max 5.1V so no problem with nodemcu as its voltage regulator generate almost no heat. Same power bank but with 2 parallel output was used to power ultrasonic sensor and nodemcu, echo n trig pin can be handled with 3V3 logic. actually air acts the coolant of that negligible heat in nodemcu for 5V. So no problem :)

    0
    ErinaR
    ErinaR

    2 years ago

    awesome project...will it really work if I only include the library and use the function? i need to try this. thanks