[Wemos] BlynkTimer working, but no data is sent

• Hardware model: Wemos D1 mini (wifi)
• Android 9, web blynk.cloud
• Blynk server
• Blynk Library version v1.0.1 (github latest)

I can see timer is working by observing the blinking LED.
However, no messages appear in Serial monitor after Blynk is connected to wifi.

In blynk.cloud I see the metadata is updated, device is marked Online, but no sensor data or events are displayed.

Also without Blynk.begin and Blynk.run sensors work and I can see reports in Serial monitor.

Please help.

START
11:37:33.565 -> [103] Connecting to shu_****
11:37:37.773 -> [4333] Connected to WiFi
11:37:37.773 -> [4333] IP: 192.168.99.140
11:37:37.773 -> [4333] 
11:37:37.773 ->     ___  __          __
11:37:37.807 ->    / _ )/ /_ _____  / /__
11:37:37.807 ->   / _  / / // / _ \/  '_/
11:37:37.807 ->  /____/_/\_, /_//_/_/\_\
11:37:37.807 ->         /___/ v1.0.0-beta.1 on ESP8266
11:37:37.807 -> 
11:37:37.807 -> [4340] Connecting to blynk.cloud:80
11:37:37.912 -> [4443] 

Sketch:


#define BLYNK_TEMPLATE_ID "*****"
#define BLYNK_DEVICE_NAME "Garage Temperature and Smoke Sensor ESP8266"
#define BLYNK_AUTH_TOKEN "*****"
#define BLYNK_PRINT Serial

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

#define SMOKE_PIN D2
#define TEMP_PIN D1

char ssid[] = "shu****";
char pass[] = "****";

long current = 0L;
long lastDhtCheck = 0L;
long lastSmokeCheck = 0L;

int CHECK_INTERVAL = 60*60*1000;

BlynkTimer myTimer;

OneWire oneWire(TEMP_PIN);
DallasTemperature sensors(&oneWire);
float Celcius = 0;
float Fahrenheit = 0;

int ledVal = LOW;

void tempEvent()
{
  sensors.requestTemperatures(); 
  Celcius = sensors.getTempCByIndex(0);
  Blynk.virtualWrite(V1, Celcius);
  Serial.println("Temperature" + (String) Celcius);
  if (Celcius > 60) {
    Blynk.logEvent("temperature_rising", "3D printer Temp " + (String)Celcius);
  }
}

void smokeEvent() {
  Blynk.logEvent("TEST", "The test");
  digitalWrite(LED_BUILTIN, ledVal);
  ledVal = !ledVal;
  Serial.println("Loop");
 
  int smokePresent = digitalRead(SMOKE_PIN);
  Serial.println("Smoke detector " + (String) smokePresent);
  if (smokePresent == LOW) {
    Blynk.logEvent("smoke", "SMOKE");
    Serial.println("SMOKE detected");
  }
  Blynk.virtualWrite(V3, smokePresent);
}


void setup()
{
  pinMode(SMOKE_PIN, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);
  // Debug console
  Serial.begin(115200);
  Serial.println("START");
  sensors.begin();

  myTimer.setInterval(1*1000L, smokeEvent);
  myTimer.setInterval(60*1000L, tempEvent);
  
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);  

  tempEvent();
  smokeEvent();
}

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

That’s an old library, you should be using 1.0.1

Pete.

Updated the original post, tried with 1.0.1, same result.

Your ISP might be blocking port 80, so you could try….

Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 8080);

Pete.

Thank you for suggestion.

That did not help.

The device appears as “online” in dashboard, but no data is sent.

15:49:30.225 -> [4335] IP: 192.168.99.140
15:49:30.225 -> [4335] 
15:49:30.225 ->     ___  __          __
15:49:30.225 ->    / _ )/ /_ _____  / /__
15:49:30.225 ->   / _  / / // / _ \/  '_/
15:49:30.225 ->  /____/_/\_, /_//_/_/\_\
15:49:30.225 ->         /___/ v1.0.1 on ESP8266
15:49:30.225 -> 
15:49:30.225 -> [4342] Connecting to blynk.cloud:8080
15:49:30.336 -> [4443] R

Looks like I was throttled. Probably ran the event pushing in loop without the BlynkTimer.

Today everything works (except Serial).