Blynk LogEvent Blocking from App

Good day all
I am still learning and discovering everyday, but I have come across something that I have not been able to get working.
In short, I want to get an alarm from a freezer should the setpoint for the the alarm (set in Blynk IoT) is reached, fridge stops working for instance.
But I want to use a button in App to disable the notification from time to time when the freezer is not in use.
Also I am using DS18B20 probe witch ESP32 reads a value of -127 when probe is disconnected or failed. I want to get an alarm on probe malfunction also to be disabled by the same button in app if needed.
It has taken many hours, many examples and different approaches but not working...
What am I missing here???

#define BLYNK_TEMPLATE_ID "*******"
#define BLYNK_TEMPLATE_NAME "********"
#define BLYNK_FIRMWARE_VERSION        "0.1.0"
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
#define APP_DEBUG
#include "BlynkEdgent.h"

BlynkTimer timer;

#include "OneWire.h"
#include "DallasTemperature.h"
#define ONE_WIRE_BUS 14
OneWire oneWire (ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

float temp;
float alarm_setpoint;
bool logEventEnabled = false;

void probe_1()
{
    sensors.requestTemperatures(); 
    temp = sensors.getTempCByIndex(0);
    Serial.println(temp);
    delay(50);
    Blynk.virtualWrite(V11, temp);
     if (temp == DEVICE_DISCONNECTED_C)
     {
      if(logEventEnabled)
      {
      Blynk.logEvent("probe");
      Serial.print("Probe failed");
      }
      return;
     }
}

void setup()
{
  Serial.begin(115200);
  delay(100);
  BlynkEdgent.begin();
  pinMode(14, INPUT);
  sensors.begin();
  timer.setInterval(5000L, probe_1);
}

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

BLYNK_WRITE(V21)  //Alarm Setpoint from app
{
  int alarm_setpoint = param.asFloat();
}

BLYNK_WRITE(V41)  //Used to Enable or Disable sending of LogEvents
{
  int logEventEnabled = param.asInt();
}

Your question is much better suited for the Blynk forum.

Ill sort of answer a few things…

Your loop () should be free of all BUT the following…

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

Send the following…

above the setup() in your code.

You have this variable declared globally as a float, but then locally declare as an Int in the BLYNK_WRITE function. Get rid of the “int” in the BLYNK_WRITE function.

I know nothing about logEvents so cant help you but If you strip that away, Automations are really basic and easy to use for emails and notifications on your phone, no code on the MCU necessary, all sone in dev console and app.

Will be trying that.
Thank you for the pointers