HELP - Blynk Not Updating

Hello, I have been a happy Blynk user for over a year now with about 4 or 5 ESP Arduino devices sending data to the cloud. But I have troubles off and on with my hydro monitor when making changes to the code. When I leave it alone it runs perfect. It is only when I am making changes and downloading a zillion times when suddenly it stops working. And over the year or so of developing the code this issue has only happened 3 or 4 times but it is very tiring and I would like to understand why and fix it for good.

Each time it has happened I have tried the following with no success:
-Google and check forums.
-Revert back to previous versions of firmware that were working.
-Reboot my computer and try again.
-Get annoyed and quit and come back the next day.
-Annoy my Friend who introduced me to Blynk. :wink:
-try another ESP8266 with the same code.

Meanwhile, my other 3 or 4 devices are working fine, although I am not touching them, they are just running and updating Blynk throughout this problem.

What happens is eventually after poking around and ripping my hair out it starts to work again and I have no idea why it stopped and no idea why it is working again.

It feels like the Blynk server gets mad and ignores the virtual pins on this one device for some random time?

I send out the following serial data and it I think it is the same working or not but below is not working:
[568] Connecting to

502[13361] Connecting to
503[20510] Connecting to
503[27658] Connecting to
505[34784] Connecting to
505[41913] Connecting to

I am running:
-Arduino 1.8.13
-Blynk Ver 0.6.1 by Volodymyr Shymansky
-ESP8266 Commmunity Ver 2.7.4 board manager

Below is my code:
// Average high time is 88.60mS by Scope
#include <ESP8266WiFi.h>

#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char ssid[] = "????";
char pass[] = "???";
const int HydroPin = 5, HBeat = 16;
unsigned long time_now = 0, monthlyPulseCount = 0;
//int period = 60000;                               // time delay is one minute
int period = 6000;                              // delay is six seconds
unsigned int nowPulseCount = 0, wattHours = 0;
static bool flagClearMonthlyPulseCount = 0; 

// provide a way to clear totalPulses from the app
  flagClearMonthlyPulseCount = param.asInt(); // save status

// this interupt just counts risting pulses (one puls per watt)
ICACHE_RAM_ATTR void wattCounter() {
// call this for every pulse from hydro meter
void wiggleHeartBeat(){
  static bool flipflop = false;
  pinMode(HBeat, OUTPUT);
  if(flipflop == true){
    flipflop = false;
    digitalWrite(HBeat, HIGH);
    Blynk.virtualWrite(V30, 0);       // tell app a puls came in;
    flipflop = true;
    digitalWrite(HBeat, LOW);
    Blynk.virtualWrite(V30, 255);     // tell app a puls came in;

void setup() {
  pinMode(HydroPin, INPUT);
  Serial.println("The Hydro Monitor");
  WiFiClient client;
  Blynk.config(auth, "", 80); //CONNECTION TO THE BLYNK SERVER
  //Blynk.begin(auth, ssid, pass);
  monthlyPulseCount = 0;
  attachInterrupt(digitalPinToInterrupt(HydroPin), wattCounter, RISING);
  time_now = 0;                           // make sure zero for first entry into loop.

void loop() {
  // count pulses for one minute
  nowPulseCount = 0;
  do {
    pulseIn(HydroPin, HIGH, 10000000);
    nowPulseCount++;                    // count high pulses 
  } while (millis() - time_now < period); // has a minute elapsed?
  // reset timer for next minute while we do stuff.
  time_now = millis();
  wattHours = nowPulseCount * 60;        // we counted for one minute convert to one hour.
  Serial.print(nowPulseCount); Serial.print(","); Serial.println(wattHours);
  Blynk.virtualWrite(V31, wattHours);
  Blynk.virtualWrite(V35, monthlyPulseCount);
  Serial.println("wiggle heart beat");
  // now check to see if we are being asked to reset the monthly count
  if (flagClearMonthlyPulseCount != 0){
    monthlyPulseCount = 0;
    Serial.print("Clearing Monthly pulse counter");
    Blynk.virtualWrite(V35, monthlyPulseCount);
  // now update blynk

Well, first of all, you should read about this…

Then you should read this…

especially the part that says …

NOTE: After Blynk.config(...) is called, your hardware is not yet connected to the server. It will try to connect while until it hits first instance of or Blynk.connect() routine.


Pete, thank you that is my problem and I have a simple version that works now so I need to back port it to my other projects.

What I still don’t understand however is why does it work most of the time and the sometimes spaze out when I am changing the code?

And why does a previous release that was working no longer work?

Is there something with Blynk I need to reset or clear?

It’s a bit like saying “sometimes my car won’t start - why is this” it’s impossible to say without more specific information.


Yes, the car analogy, I understand. Things are working well now. Thank you for your help.