Problem with updates (Blink.Write) from App / Web / Automations after a couple of hours runtime

I’m currently facing an unusual issue and I’m hoping to get some insights. I’ve been using a Blink app to manage a small greenhouse in a 24-hour setup for quite some time. Everything was working smoothly since I switch to new Blynk cloud a long time ago. I haven’t made any changes to the code or the hardware. However, over the past week, I’ve encountered some problems.

Initially, I noticed that my automations (triggererd from Blynk.Cloud) , like controlling the lights, were no longer functioning as expected. Upon investigating further, I realized that any changes I make from the app, web console, or automations aren’t being recognized by the device anymore do not matter witch widget is use. It’s as if the device isn’t responding to any modifications. I suspect that Blink.Write might be involved in this issue. Strangely enough, the device itself isn’t frozen – it’s online and continues to update temperature and other sensor readings normally.

To regain control, I have to perform a reboot, which temporarily solves the problem for around 15 to 16 hours. After that time, the same issues resurface.

In an attempt to troubleshoot, I updated my library a few days after identifying the problem. However, this didn’t have any effect on the underlying issue.

If anyone has encountered something similar or has any suggestions on how to address this, I would greatly appreciate your input.

Thank you in advance.

• Hardware model + communication type:
ESP32 DevBoard with Wi-Fi
• Smartphone OS (iOS or Android)
iOS 3.5.7
• Blynk cloud (paid account)
• Blynk Library version (problem accuses with 1.x I recently updated to latest 2. Release with no effect on the Problem)

Do you have only one piece of hardware connected to Blynk, or are there other dev boards that use the same auth token?

Are you using virtual datastreams or digital datastreams (you mention Blynk.Write, which I assume means BLYNK_WRITE(vPin) which would imply virtual datastreams)?

What version of the ESP32 core are you using?

Seeing your full sketch (with sensitive data redacted, and properly formatted with triple backticks) would be useful. Seeing the serial output from the board when this occurs may also be useful, but I appreciate that this might be challenging.

Pete.

Hi Pete,

  1. I have 2 devices, but they’re both individual apps with own Auth Token.
  2. I used Virtual PINs
  3. How do i get out which ESP32 core i’m using … not sure about that
  4. See the code below (let me know if you need the other includes a well)
  5. Is very hard to get the HW output for me but i can try … but i don’t write a a lot to serial at all.

main.cpp


// Fill-in information from your Blynk Template here

#define BLYNK_TEMPLATE_ID "xxxxxxxx"
#define BLYNK_TEMPLATE_NAME "xxxxxxx"

#define BLYNK_FIRMWARE_VERSION        "1.2"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#include <Arduino.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>


#define APP_DEBUG
#define USE_ESP32S2_DEV_KIT
#define PIN_UPTIME V29
#define BLYNK_GREEN     "#23C48E"
#define BLYNK_BLUE      "#04C0F8"
#define BLYNK_YELLOW    "#ED9D00"
#define BLYNK_RED       "#D3435C"
#define BLYNK_DARK_BLUE "#5F7CD8"

#define led 26
#define onboardLed 13
#define ventilator 14
#define luefterLow 33
#define luefterHigh 25
#define DHTPIN 4
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);

#include "BlynkEdgent.h"
#include <ezTime.h>
BlynkTimer timer;
#include "AVariablen.h"
#include "ASystemFunc.h"
#include "AGrowFunc.h"



void setup()
{
  Serial.begin(115200);

  dht.begin();
  digitalWrite(resetPin, HIGH);
  pinMode(resetPin, OUTPUT);

  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);
  pinMode(onboardLed, OUTPUT);
  digitalWrite(onboardLed, LOW);
  pinMode(ventilatorPin, OUTPUT);
  digitalWrite(ventilatorPin, HIGH);
  pinMode(luefterLowPin, OUTPUT);
  digitalWrite(luefterLowPin, HIGH);
  pinMode(luefterHighPin, OUTPUT);
  digitalWrite(luefterHigh, HIGH);

  for (int thisReading = 0; thisReading < numReadings; thisReading++) {
    readings[thisReading] = 0;
  }
  for (int thisReading = 0; thisReading < numReadings1; thisReading++) {
    readings[thisReading] = 0;
  }

  // Timer setzten
  timer.setInterval(10000, WifiSgn);
  timer.setInterval(60000, Uptime);
  timer.setInterval(120000, alarm_notify);
  timer.setInterval(60000, licht_anaus);
  timer.setInterval(60000, timestamp);
  timer.setInterval(55000, sendSensorDTHaussen);
  timer.setInterval(10000, sendSensorSoil);
  timer.setInterval(30000, abluft_auto);
  BlynkEdgent.begin();
}

BLYNK_WRITE(V4) {
  licht = param.asInt();
  if (debug == 1) {
  Blynk.virtualWrite(V1, timestamp_debug + "-Licht:" + String(licht) +"\n");
  }
}

BLYNK_WRITE(V5) {
  h_i = param.asInt();
}

BLYNK_WRITE(V11) {
  co2_ppm = param.asInt();
}

BLYNK_WRITE(V12) {
  TVOC = param.asInt();
}

BLYNK_WRITE(V19) {
  debug = param.asInt();
}

BLYNK_WRITE(V6) {
  t_i = param.asInt();
}

BLYNK_WRITE(V15)
{
  maxTemp = param.asInt();
}

BLYNK_WRITE(V16)
{
  maxH = param.asInt();
}

BLYNK_WRITE(V20)
{
  targetRLF = param.asInt();
}

BLYNK_WRITE(V9)
{
  intervalcount_max = param.asInt();
}

BLYNK_WRITE(V18) {
  switch (param.asInt())
  {
    case 0: // Item 1
      alarm_not = 1;
      Blynk.virtualWrite(V1, timestamp_log + " Alarm: An\n");
      break;
    case 1: // Item 2
      alarm_not = 0;
      Blynk.virtualWrite(V1, timestamp_log + " Alarm: Aus\n");
      break;
    default:
      alarm_not = 1;
      Blynk.virtualWrite(V1, timestamp_log + " Alarm: An\n");
  }

} 

BLYNK_WRITE(V33) {
  switch (param.asInt())
  {
    case 0: // Item 1
      alldays = 1;
      Blynk.virtualWrite(V1, timestamp_log + " Automatik Beleuchtung: Auto\n");
      Blynk.logEvent("status_led-belechtung", String("Automatik Beleuchtung eingeschalten"));
      break;
    case 1: // Item 2
      alldays = 0;
      digitalWrite(ledPin, HIGH);
      licht = 0;
      ledLicht.setColor(BLYNK_RED);
      Blynk.virtualWrite(V1, timestamp_log + " Automatik Beleuchtung: Manuell Aus\n");
      Blynk.logEvent("status_led-belechtung", String("Automatik Beleuchtung: Manuell Aus"));
      break;
    case 2:
      alldays = 0;
      licht = 1;
       digitalWrite(ledPin, LOW);
      ledLicht.setColor(BLYNK_GREEN);
      Blynk.virtualWrite(V1, timestamp_log + " Automatik Beleuchtung: Manuell An\n");
      Blynk.logEvent("status_led-belechtung", String("Automatik Beleuchtung: Manuell An"));
      break;
    default:
      Blynk.virtualWrite(V1, timestamp_log + " Automatik Beleuchtung: Auto\n");
      Blynk.logEvent("status_led-belechtung", String("Automatik Beleuchtung eingeschalten"));
      alldays = 1;
  }
  // Serial.println("DEBUG: V33 OK");

}

BLYNK_WRITE(V35) {
  switch (param.asInt())
  {
    case 0:
      Blynk.virtualWrite(V1, timestamp_log + " Umluftventilator Aus\n");
      Blynk.logEvent("status_umluft-ventilation", String(" Umluftventilator Aus"));
      digitalWrite(ventilatorPin, HIGH);
      ledVentilator.setColor(BLYNK_RED);
      break;
    case 1:
      Blynk.virtualWrite(V1, timestamp_log + " Umluftventilator An\n");
      Blynk.logEvent("status_umluft-ventilation", String(" Umluftventilator An"));
      digitalWrite(ventilatorPin, LOW);
      ledVentilator.setColor(BLYNK_GREEN);
      break;
    default:
      digitalWrite(ventilatorPin, HIGH);
      ledVentilator.setColor(BLYNK_RED);
  }

}

BLYNK_WRITE(V30) {
  switch (param.asInt())
  {
    case 0:
      Blynk.virtualWrite(V1, timestamp_log + " Abluft: Auto - Intervall Lüften an\n");
      Blynk.logEvent("status_abluft", String(" Abluft: Auto - Intervall Lüften an"));
      
      intervalenable = 1;
      break;
    case 1:
      Blynk.virtualWrite(V1, timestamp_log + " Abluft: Auto - Intervall Lüften aus\n");
      Blynk.logEvent("status_abluft", String(" Abluft: Auto - Intervall Lüften aus"));
      intervalenable = 0;
      break;
    default:
      intervalenable = 1;
  }

}

BLYNK_WRITE(V37) {
WaterValue1 = param.asInt(); 
}

BLYNK_WRITE(V38) {
AirValue1 = param.asInt(); 
}

BLYNK_WRITE(V39) {
WaterValue2 = param.asInt(); 
}

BLYNK_WRITE(V40) {
AirValue2 = param.asInt(); 
}


BLYNK_WRITE(V36) {
  switch (param.asInt())
  {
    case 0:
      luefter_auto = 0;
      Blynk.virtualWrite(V1, timestamp_log + " Abluftventilator Aus\n");
      Blynk.logEvent("status_abluft",  String("Abluftventilator Aus\n"));
      digitalWrite(luefterHighPin, HIGH);
      digitalWrite(luefterLowPin, HIGH);
      ledLuefter.setColor(BLYNK_RED);
      break;
    case 1:
      luefter_auto = 0;
      Blynk.virtualWrite(V1, timestamp_log + " Abluftventilator 100%\n");
      Blynk.logEvent("status_abluft",  String(" Abluftventilator 100%\n"));
      digitalWrite(luefterHighPin, HIGH);
      digitalWrite(luefterLowPin, LOW);
      ledLuefter.setColor(BLYNK_BLUE);
      break;
    case 2:
      luefter_auto = 0;
      Blynk.virtualWrite(V1, timestamp_log + " Abluftventilator 80%\n");
      Blynk.logEvent("status_abluft",  String(" Abluftventilator 80%\n"));
      digitalWrite(luefterHighPin, LOW);
      digitalWrite(luefterLowPin, HIGH);
      ledLuefter.setColor(BLYNK_DARK_BLUE);
      break;
    case 3:
      Blynk.virtualWrite(V1, timestamp_log + " Abluft: Auto\n");
      Blynk.logEvent("status_abluft",  String(" Abluft: Auto\n"));
      luefter_auto = 1;

      //      if (luefter_auto >= 1) {
      //      digitalWrite(luefterHighPin, LOW);
      //      digitalWrite(luefterLowPin, HIGH);
      //      ledLuefter.setColor(BLYNK_DARK_BLUE);
      //      }
      break;
    default:
      luefter_auto = 0;
      digitalWrite(luefterHighPin, HIGH);
      digitalWrite(luefterLowPin, HIGH);
      ledLuefter.setColor(BLYNK_RED);
  }

 }



 
 
void loop() {
  timer.run(); // Initiates BlynkTimer
  BlynkEdgent.run();
}

AGrowFuction.h


void resetNotifiedT()
{
  notifiedT = 0;
}

void resetLufter__auto_T()
{
  lufter__auto_T = 0;
}

void resetNotifiedH()
{
  notifiedH = 0;
}

void licht_anaus()
{

  if (alldays == 1)
  {
    if (licht >= 1)
    {
      digitalWrite(ledPin, LOW);
      ledLicht.setColor(BLYNK_GREEN);
      if (licht == 1)
      {
        Blynk.logEvent("status_led-belechtung", String("Beleuchtung An"));
        Blynk.virtualWrite(V1, timestamp_log + " Beleuchtung An \n");
      }
      licht = licht + 1;
    }
    else if (licht <= 0)
    {
      digitalWrite(ledPin, HIGH);
      ledLicht.setColor(BLYNK_RED);
      if (licht == 0)
      {
        Blynk.logEvent("status_led-belechtung", String("Beleuchtung Aus"));
        Blynk.virtualWrite(V1, timestamp_log + " Beleuchtung Aus \n");
      }
      licht = -1;
    }
  }
}

void sendSensorSoil()
{
  Blynk.syncVirtual(V5, V6);
  topf1 = topf1 - readings[readIndex];
  topf2 = topf2 - readings1[readIndex1];
  // read from the sensor:
  readings[readIndex] = analogRead(soil_sensor1);
  readings1[readIndex1] = analogRead(soil_sensor2);
  // add the reading to the topf1:
  topf1 = topf1 + readings[readIndex];
  topf2 = topf2 + readings1[readIndex1];
  // advance to the next position in the array:
  readIndex = readIndex + 1;
  readIndex1 = readIndex1 + 1;

  // if we're at the end of the array...
  if (readIndex >= numReadings)
  {
    // ...wrap around to the beginning:
    readIndex = 0;
  }

  // if we're at the end of the array...
  if (readIndex1 >= numReadings1)
  {
    // ...wrap around to the beginning:
    readIndex1 = 0;
  }

  // calculate the average:
  topf1_average = topf1 / numReadings;
  topf2_average = topf2 / numReadings1;

  output_value1 = topf1_average;
  moisturelevel1 = constrain(map(output_value1, AirValue1, WaterValue1, 0, 100), 0, 100);

  output_value2 = topf2_average;
  moisturelevel2 = constrain(map(output_value2, AirValue2, WaterValue2, 0, 100), 0, 100);

  Blynk.virtualWrite(V7, moisturelevel1);
  Blynk.virtualWrite(V8, moisturelevel2);

  if (debug == 1)
  {
    Blynk.virtualWrite(V1, timestamp_debug + "-T1-M:" + String(moisturelevel1) + " Out:" + String(output_value1) + " wet:" + String(WaterValue1) + " sry:" + String(AirValue1) + "\n");
    Blynk.virtualWrite(V1, timestamp_debug + "-T2-M:" + String(moisturelevel2) + " Out:" + String(output_value2) + " wet:" + String(WaterValue2) + " dry:" + String(AirValue2) + "\n");
  }

  Blynk.virtualWrite(V21, output_value1);
  Blynk.virtualWrite(V22, output_value2);
}

void sendSensorDTHaussen()
{

  float h_a_raw = dht.readHumidity();
  float t_a_raw = dht.readTemperature();
  // h_a = dht.readHumidity();
  // t_a = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

  if (h_a_raw <= 100)
  {
    h_a = h_a_raw;
  }
  else
  {

    if (debug == 1)
    {
      Blynk.virtualWrite(V1, timestamp_debug + "-DHT22-Lesesefehler RLF:" + String(h_a_raw) + "\n");
    }
  }

  if (t_a_raw <= 45)
  {
    t_a = t_a_raw;
  }
  else
  {

    if (debug == 1)
    {
      Blynk.virtualWrite(V1, timestamp_debug + "-DHT22-Lesesefehler Temp:" + String(t_a_raw) + "\n");
    }
  }

  Blynk.virtualWrite(V51, h_a);
  Blynk.virtualWrite(V50, t_a);
  if (debug == 1)
  {
    Blynk.virtualWrite(V1, "DEBUG - DTH22 - Aussen - Temp:" + String(t_a) + " RLF:" + String(h_a) + " \n");
  }
}

void alarm_notify()
{

  String notifyStringT;
  String notifyStringH;

  // h_i = bme.readHumidity();
  // t_i = bme.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

  if (alarm_not == 1)
  {
    Blynk.syncVirtual(V5, V6);
    // Blynk.virtualWrite(V1, timestamp_log + "- Test 1 "+  t_i +" "+ maxTemp+" "+notifiedT +"\n");
    if (t_i >= maxTemp && !notifiedT)
    {
      notifiedT = true;
      notifyStringT = "Temperatur IST:" + String(t_i) + " SOLL MAX:" + String(maxTemp) + "\n";
      // Serial.println(notifyStringT);
      Blynk.virtualWrite(V1, timestamp_log + "-" + notifyStringT);
      Blynk.logEvent("alarm_innenraum_temperatur", notifyStringT);
      timer.setTimeout(1200000, resetNotifiedT);
    }

    if (h_i >= maxH && !notifiedH)
    {
      notifiedH = true;
      notifyStringH = "Luftfeuchtigkeit IST:" + String(h_i) + " SOLL MAX:" + String(maxH) + "\n";
      // Serial.println(notifyStringH);
      Blynk.virtualWrite(V1, timestamp_log + "-" + notifyStringH);
      Blynk.logEvent("alarm_rlf", notifyStringH);
    }
  }

  if (debug == 1)
  {
    Blynk.virtualWrite(V1, timestamp_debug + " - BM280 - Innen - Temp:" + String(t_i) + " RLF:" + String(h_i) + "\n");
  }
}

void abluft_auto()
{
  if (luefter_auto == 1)
  {
    // if (intervalenable == 1)
    // {
    //   intervalcount = intervalcount + 1;
    //   if (debug == 1)
    //   {
    //     Blynk.virtualWrite(V1, timestamp_log + " - Interval Zähler:" + String(intervalcount) + "/" + String(intervalcount_max) + "\n");
    //     Blynk.virtualWrite(V1, timestamp_log + " - RLF:" + String(h_i) + "/" + String(targetRLF) + "\n");
    //   }
    // }
    // if (h_i >= targetRLF || (intervalenable == 1) || (intervalcount >= intervalcount_max) ) {
    //   if (h_i >= targetRLF)
    //   {
      if (h_i > (targetRLF + 5))
      {
        digitalWrite(luefterHighPin, HIGH);
        digitalWrite(luefterLowPin, LOW);
        Blynk.virtualWrite(V1, timestamp_log + " Abluft:Auto-Lüfter 100%-RLF ist:" + h_i + "% Ziel:" + targetRLF  + "% \n");
        Blynk.logEvent("status_abluft", String(" Abluft: Auto - Lüfter auf 100%") + "\n");
      }
      else if (h_i >= (targetRLF + 2) && h_i <= (targetRLF + 5))
      {
        digitalWrite(luefterHighPin, LOW);
        digitalWrite(luefterLowPin, HIGH);
        Blynk.virtualWrite(V1, timestamp_log + " Abluft:Auto-Lüfter 80%-RLF ist:-" + h_i + "% Ziel:" + targetRLF  + "% \n");
        Blynk.logEvent("status_abluft", String(" Abluft: Auto - Lüfter auf 80%") + "\n");
      }
      else if (h_i <= targetRLF)
      {
        digitalWrite(luefterHighPin, HIGH);
        digitalWrite(luefterLowPin, HIGH);
        ledLuefter.setColor(BLYNK_RED);
        Blynk.virtualWrite(V1, timestamp_log + " Abluft:Auto-Lüfter Aus-RLF ist:" + h_i + "% Ziel:" + targetRLF  + "% \n");
        Blynk.logEvent("status_abluft", String(" Abluft: Auto - Lüfter Aus") + "\n");
      }
  }
  // intervalcount = 0;
  ledLuefter.setColor(BLYNK_YELLOW);
}

ASystemFunction.h

BLYNK_CONNECTED() {
  // Request the latest state from the server
  // Synchronize time on connection
  Blynk.sendInternal("rtc", "sync");
  Blynk.virtualWrite(V1, "\n Growbox v"+ v + "\n");
  waitForSync();
  Timezone myTZ;
  myTZ.setLocation(F("Europe/Berlin"));
  Blynk.virtualWrite(V1, "\n----------------------------\n");
  Blynk.virtualWrite(V1, myTZ.dateTime("l, d-M-y H:i")+ "\n");
  Blynk.virtualWrite(V1, "----------------------------\n");
  Blynk.virtualWrite(V1, "ready \n");
  Blynk.virtualWrite(V0, v);
  ledLicht.on();
  ledVentilator.on();
  ledLuefter.on();
  ledTest.on();
  
    }

void timestamp()
{
  Timezone myTZ;
  myTZ.setLocation(F("Europe/Berlin"));
  timestamp_debug = (String("**D-") + myTZ.dateTime("d-M H:i") + String(" :"));
  timestamp_log = (myTZ.dateTime("d-M H:i") + String(" :"));
  timestamp_short = (myTZ.dateTime("l, d-M H:i"));

}

void Uptime() {
  uptime = uptime + 1;
  Blynk.sendInternal("rtc", "sync");
  Blynk.virtualWrite(V29, uptime ); // labeled value settings

  if (firststart == 1){
  Blynk.syncVirtual(V4,V5,V6,V9,V15,V16,V18,V20,V33,V35,V36,V19,V37, V38,V39,V40);
  //  Blynk.syncVirtual();
  //  Blynk.syncAll();
    firststart  = 0;
    }
}

void WifiSgn() {

  
  Signal = (WiFi.RSSI());

  if (Signal >= -30) {
    SGN = S5;
  }
  else if (Signal <= -31 && Signal > -67) {
    SGN = S4;
  }
  else if (Signal <= -67 && Signal > -70) {
    SGN = S3;
  }
  else if (Signal <= -70 && Signal > -80) {
    SGN = S2;
  }
  else if (Signal <= -80 && Signal > -90) {
    SGN = S1;
  }
  else {
    SGN = S0;
  }

  Blynk.virtualWrite(V2, SGN ); // labeled value settings
  Blynk.virtualWrite(V3, Signal);// label value
  
}

AVariablen.h

WidgetLED ledLicht(V46);
WidgetLED ledVentilator(V47);
WidgetLED ledLuefter(V48);
WidgetLED ledTest(V2);


bool ledStatus = false;

/*************** signal init ***************/
String S0 = "no signal";
String S1 = "\u2581" ; //▁
String S2 = "\u2581 \u2583"; //▁ ▃
String S3 = "\u2581 \u2583 \u2585" ; //▁ ▃ ▆
String S4 = "\u2581 \u2583 \u2585 \u2587" ; //▁ ▃ ▆ ▇
String S5 = "\u2581 \u2583 \u2585 \u2587 \u2588" ; //▁ ▃ ▆ ▇ █
int Signal = 0;
String SGN ;
String v = BLYNK_FIRMWARE_VERSION;
int uptime = 0;
String timestamp_debug;
String timestamp_log;
String timestamp_short;


char Date[16];
char Time[16];
int t;
int h;
int t_a;
int h_a;
int t_i;
int h_i;
int maxTemp = 30;
int maxH = 65;
int targetRLF = 50;
int intervalcount = 0;
int intervalcount_max = 10;
int intervalenable = 1;
int resetPin = 12;
int firststart = 1;

char currentTime[9];
bool clockSync = false;

bool notifiedT     = false;
bool notifiedH     = false;
bool lufter__auto_T = false;


int alldays ;
int alarm_not = 1;
int manual = 0;
long startsecondswd;            // weekday start time in seconds
long stopsecondswd;             // weekday stop  time in seconds
long nowseconds;                // time now in seconds
bool isFirstConnect = true;


// Calibration for Soil Sensors
int AirValue1 ;   
int WaterValue1 ;  

int AirValue2 ;   
int WaterValue2 ;  


int soil_sensor1 = A6;
int output_value1 ;
int moisturelevel1;

int soil_sensor2 = A4;
int output_value2 ;
int moisturelevel2 ;

int co2_ppm ;
int TVOC; 

int licht;

int debug;
int luefter_auto = 0;
int luefer_auto_timer = 30000;

int ledPin = 26;
int ventilatorPin = 14;
int luefterLowPin = 33;
int luefterHighPin = 25;


const int numReadings = 20;
const int numReadings1 = 20;

int readings[numReadings];      // the readings from the analog input
int readIndex = 0;              // the index of the current reading
int readings1[numReadings];      // the readings from the analog input
int readIndex1 = 0;              // the index of the current reading
int topf1 = 0;                  // the running total
int topf1_average = 0;                // the average
int topf2 = 0;                  // the running total
int topf2_average = 0;                // the average
``

Tools > Board > Boards Manager > search for ESP32

but this does…

Pete.

I use PlattformIO & VSC. The board is linked with epressif ESP32 dev Module.

Platform espressif32 @ 5.2.0 (required: espressif32). <<< – is this the core ?

#define BLYNK_PRINT Serial

ah make sense … i started a Serial Monitoring … so far everything works and look normal

13:31:23.273 -> rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
13:31:23.273 -> configsip: 0, SPIWP:0xee
13:31:23.273 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:31:23.306 -> mode:DIO, clock div:1
13:31:23.306 -> load:0x3fff0018,len:4
13:31:23.306 -> load:0x3fff001c,len:1216
13:31:23.306 -> ho 0 tail 12 room 4
13:31:23.306 -> load:0x40078000,len:10944
13:31:23.306 -> load:0x40080400,len:6388
13:31:23.306 -> entry 0x400806b4
13:31:23.775 -> [153] 
13:31:23.775 ->     ___  __          __
13:31:23.775 ->    / _ )/ /_ _____  / /__
13:31:23.775 ->   / _  / / // / _ \/  '_/
13:31:23.775 ->  /____/_/\_, /_//_/_/\_\
13:31:23.775 ->         /___/ v1.3.0 on ESP32
13:31:23.775 -> 
13:31:23.775 ->  #StandWithUkraine    https://bit.ly/swua
13:31:23.775 -> 
13:31:23.775 -> 
13:31:26.156 -> [2545] Using Dynamic IP: xxxxxxxxxxxxxxxxxxxx
13:31:26.156 -> [2556] Connecting to blynk.cloud:443
13:31:26.754 -> [3152] Certificate OK
13:31:26.754 -> [3165] Ready (ping: 11ms).

```

No. The latest ESP32 core is 2.0.11

Pete.

okay, within platformIO it is part of framework-arduinoespressif32 (PlatformIO Registry) that incl. in my case is use the core 2.0.5 an update would be possible to 2.0.11.

That would be a good idea.

Pete.

Updated to 2.0.9 which is the latest Version i’m able to build with (darwin_arm64 host system is not supported by 2.0.11 yet).

I’ll see in a few hours if this has effect, monitor is running. Keep you posted.

@PeteKnight
I tested the new FW Build with 2.0.9 Core yesterday, same Situation and unfortunately no log reaction on Serial :confused: Any other idea ?
I’ll try today again, an older build of the FW to see if this has positive effect’s to exclude involvement of newer libs.

Is your board an ESP32, or ESP32-S2 ?

Pete.

ESP32-WROOM-32 on ESP32-DevKitC V4

Okay, it’s just that you chose an ESP32S2 as your board type…

and they are a bit peculiar about serial output use.

No more ideas at this stage, other than to find a way to use the latest ESP32 core, maybe by installing the Arduino IDE.

Pete.

Hi pete,
i needed some time to troubleshoot. I did get it to the newest core (2.0.11) and latest library (1.3.2) but with same result, problem is still there. I did activate the more detailed Serial Output and saw that indeed the Boards running well, but they lose the connection (no error message or anything on serial) at some point it don’t recognize any update coming from BlynkCloud. If i switch off Wifi Network and activate it, the ESP is restarting the WIfi, and then it again gets updated from BlynkCloud without hard-reset.
I set up a second ESP32 with same FW / Template for testing, while doing that I came back to your initial idea :

I don’t have a second device running the same auth-code. But I do use “node-red-contrib-blynk-iot” to push 4 values (temp, humidity) any other minute from MQTT to BlynkCloud using the same AuthCode.
If i terminate this sync my boards are running fine (for days now). If I activate it, the problems are back if I switch to a BlynkLib >1.1.
I’m more then sure that there is somehow a problem in node-red-contrib-blynk-iot in combination with BlinkLib >=1.1

Thx for your help, i think need to open a issue for node-red-contrib-blynk-iot

No you don’t.

The issue is that you are using the same Blynk Auth token on multiple devices. The fact that one of these is a Node-Red virtual device is irrelevant. The Blynk servers now only tollerate one connection per auth token, so if you have a connection from your ESP32 then create a connection via Node-Red the first connection (your ESP32) will be terminated and your device will go offline.
When the ESP32 re-connects (which requires a reboot because of the way your code is written) the Node-Red connection will be terminated and you’ll see “Not connected” shown next to your Blynk nodes.

I guess that one solution is to update your device via Node-Red using the REST API, as this doesn’t create an always-on connection, so won’t kick your ESP32 off of the server.
You can do this by using the HTTP Request node and if you wish you can pass values into the HTTP node using moustache placeholders.

A better solution though would probably be to stop running Blynk code on your ESP devices and send all communication via Node-Red using MQTT messaging then use Node-Red as the bridge to Blynk using node-red-contrib-blynk-iot. This is the approach I use in all of my home automation projects and it works very well.

Pete.

thx, i really appreciate your tipps/help …i’ll have s closer look on HTTP Request Node on the weekend, sound like a good idea.

Here’s a little test I set-up some time ago to figure-out a way of using the HTTP Request node with Blynk…

The Inject nodes on the left simply inject a number (1-6) and these can be replaced with the values from one of your sensors.

Which virtual pin this is sent to is controlled by the “set msg pin” Change nodes, which look like this…

image

The “set msg token” Change Node look like this:

image

The HTTP Request node looks like this:

and here’s the url to save you re-typing it…

https://lon1.blynk.cloud/external/api/update?token={{{token}}}&pin={{{pin}}}&value={{{payload}}}

You will need to change the region from “lon1” to suit your regional Blynk server (shown at the bottom of your web console, or in the “About” screen of the app).

If you’re just using the one auth token then you could omit the set msg token" Change Node and hard-code the token in the url

The msg and result debug nodes should be set to “complete msg object”…

image

and you should see a return value of 200 from the server if the update was successful.

Pete.

1 Like

Problem solved. Back in business !

1 Like