BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Log events blynk 2.0

wanted to ask why the log events doesn’t work with blynk 2.0 I followed the instructions Log Events - Blynk Documentation but nothing happens in my blyn console timeline here is mine code

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "vvvv"
#define BLYNK_DEVICE_NAME "bbbb"
#define BLYNK_AUTH_TOKEN "nhnz";

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
//#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
#define USE_WEMOS_D1_MINI

#include "BlynkEdgent.h"
int value = 0;
int sensorValue1 = 0;
int sensorPin1 = 0;
int some_condition = 0;
BlynkTimer timer;
void setup()
{
  Serial.begin(115200);
  delay(100);
timer.setInterval(2000L, Messungbox);
Blynk.logEvent("wasser", "Hello World,") ; 
  BlynkEdgent.begin();
}
void Messungbox(){
  sensorValue1 = analogRead(sensorPin1);
   Blynk.virtualWrite(V1, sensorValue1);         
if(sensorValue1>1011){
  Blynk.setProperty(V1, "color", "#F6070F"); 
  Blynk.logEvent("wasser", "Hello World,") ;  
      }
    }
void loop() {
  BlynkEdgent.run();
    timer.run();
}

This one won’t work, because it’s being called before the device is connected to the Blynk server.

It would also be helpful to see how your event is configured in the console, and to see some information about whether the if statement in Messungbox is ever evaluating to true.

Pete.

@Dmitriy @PeteKnight It doesn’t work for me either, I’ve tried everything with high and true doesn’t work


// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "lol"
#define BLYNK_DEVICE_NAME "TEST 2gtz8"
#define BLYNK_AUTH_TOKEN "gtzK4_xd_Vl_3";

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
//#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
#define USE_WEMOS_D1_MINI

#include "BlynkEdgent.h"
int value = 0;
int sensorValue1 = 0;
int sensorPin1 = A0;

BlynkTimer timer;
void setup()
{
  Serial.begin(115200);
  delay(100);
  pinMode(sensorPin1, INPUT);
timer.setInterval(2000L, Messungbox);
  BlynkEdgent.begin();
}
void Messungbox(){
  sensorValue1 = analogRead(sensorPin1);
   Blynk.virtualWrite(V1, sensorValue1);         
  if(sensorValue1 >50 ){
        Blynk.logEvent("water");
      }
    }
void loop() {
  BlynkEdgent.run();
    timer.run();
}

@markop please don’t post the same issue in two different topics, it gets very messy when people respond in two different places.
I’ve merged everything into this topic, I’d suggest that you focus on providing the information I asked for earlier.

Pete.

@PeteKnight the code is correct I deleted everything again, new board made new instructions and all of a sudden it works, I don’t understand the main thing is that it works now