About the Notification function (Cannot receive notification in the mobile phone)

Hi everyone. I’m new to Blynk. Please forgive me, my English is not good.

I’ve just known this app for few days and found this app is awesome. It solves a lot of problems.

I tried different functions in the example and encountered a problem while using the notification widget.

I made use of the simplest version of the code provided in the example to trigger a notification in start up. I do add a notification widget in the phone. I can only recieve notification when the device if offline (durint reset). However, I can never receive any notificaiton during start up (I used the code Blynk.notify(“xxxx”).

Remarks:

  1. Use both iOS and Android separately
  2. Uninstall and install the app again
  3. Delete and Add the notification wiget again. (email widget as well)

I really want to solve this problem because I can make use of IFTTT or any other app to trigger other services.

Thanks all~

Regards,
Chung


/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************

  You’ll need:
   - Blynk App (download from AppStore or Google Play)
   - WeMos D1 board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "my auth token";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxx";
char pass[] = "xxxxxxxxx";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
  Blynk.notify("Hey, Blynkers! My hardware can push now!");
  Blynk.email("xxxxxx@gmail.com", "Subject", "Your message goes here");
  Blynk.tweet("Hey, Blynkers! My Arduino can tweet now!");
  Serial.println("AAA");
  
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

'''

About the Notification function (Cannot receive notification in the mobile phone)

@pclam please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

Thanks for your reminder. I just amended.

What happens if you try the sketch builder example rather than trying to send a notification in void setup?

Pete.

If I try the sketch builder example as shown below (by using the Simplest one but changing the auth token, ssid, and pwd), I can see wifi is connected in the serial monitor.

/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************

  You’ll need:
   - Blynk App (download from AppStore or Google Play)
   - ESP8266 board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxx";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxxxxx";
char pass[] = "xxxxxxxxxxxx";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

Besides, I tried to make use of other examples, Virtual write, Push Data. Both of them works fine.

Does that mean that it’s not connecting to the Blynk server?

Pete.

I guess my presentation is confusing, sorry about that. Below please find the details.

I guess it had been connected to Blynk server, since I can make use of the Blynk to control the LED on the D1 mini and get Analog data from the D1 mini.

[567] Connected to WiFi
[567] IP: 192.168.xxx.xxx
[567]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v1.0.0-beta.3 on ESP8266

[648] Connecting to blynk-cloud.com:80
[775] Ready (ping: 38ms).

Uninstall this and install 0.6.1 instead.

Pete.

May I know where should I reinstall it (v1.0.0-beta 3)? What does it refer to?

The board manager of ESP8266 or
The Blynk library or
The Arduino IDE itself?

Thanks.

It’s the Blynk library.

Pete.

Dear Pete,

Problem Solved. You are awesome.

May I know that happens to v1.0.0-beta 3? It is a newer version, why doesn’t it support notification widget?

Regards,
Chung

It’s for the new version of Blynk which is in beta testing at the moment.
Notifications are handled differently in the new version.

Pete.

I see. Thanks Pete.

Thanks for solving this problem for me. I stuck for few days. And thanks for your patience.

Really thanks!

Chung