Blynk v.20 - No notification received but yet says reached limit

Hi,

I am using Blynk 2.0 with a dh11 sensor which reports the temp/humdity fine but the notification isn’t getting pushed to my phone though I have “You will no longer get new events today.” on the console timeline.

I had a quick browse on the previous discussions but have not spotted something that can help.

Any pointers would be much appreciated.

Code:
#define BLYNK_TEMPLATE_ID "id"
#define BLYNK_DEVICE_NAME "Temperature and humidity monitoring"
#define BLYNK_AUTH_TOKEN "token"

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
 

#include <DHT.h>

char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "ssid";
char pass[] = "pwd";

#define DHTPIN 2          // Mention the digital pin where you connected 
#define DHTTYPE DHT11     // DHT 11  
DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;

void sendSensor(){
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.println(t);
  Blynk.virtualWrite(V5, t);
  Blynk.virtualWrite(V6, h);
    Serial.print("Temperature : ");
    Serial.print(t);
    Serial.print("    Humidity : ");
    Serial.println(h);


  if(t > 30){
   // Blynk.email("my email", "Alert", "Temperature over 30C!");
    Blynk.logEvent("temp_alert","Temp above 30 degree");
  }
}

void setup(){
   Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);
  dht.begin();
  timer.setInterval(2500L, sendSensor);
}

void loop(){
  Blynk.run();
  timer.run();
}

Please edit your post and add triple backticks ( ``` ) before and after your sketch.

You can send 100 events only per devices per day.

Thanks John. Done the editing part. Yes, I am mindful that the limit is 100 per 24 window. Any reason why I don’t get the notification on my phone though?

triple backticks look like this ( ``` ).

John has given you triple backticks to copy/paste (twice), but you’ve decided to use different characters.

Please edit your post and use the correct triple backtick characters otherwise your code will be deleted.

I’d also suggest that you post screenshots of how your Event, and the Notification tab of the event, are configured.

Pete.

Pete, I had a go at it again. I did not realize I had to use John’s. Sorry about that. I have attached a screen capture my event settings.

according to the images, your event code is ( temp_to_high ) not ( temp_alert ).
It should be like this

Blynk.logEvent("event_code", "optional message");

As John has said, you are using the wrong event code. Also, you don’t have any code to prevent multiple notifications being sent for the same over temperature situation.

You should read this…

Pete.

Thanks gents. I’ve commented out that part of the code to avoid max’ing out the limit. I will correct it tomorrow. Will indeed read the faq Pete. Cheers for the pointer. As I am just starting this setup, would deleting the device and re-creating it allow me to send the notification again without waiting the time limit to lapse?

I guess so, give it a try, but use a different template/device name.

Pete.