Timing blynk accessing internet for metered data

I have a basic blynk app that monitors the depth of water in our tanks at our cottage. It’s a basic ultrasonic sensor that using LoRa to send the data to the receiver which then sends it out to blynk. The problem is that I’m receiving complaints from our local internet provider I’m using too much data. Although it’s only sending a small bit of data it’s constant. I don’t need constant data. If I received data only evelry 10 minutes or so that would be sufficient. Is there a way of adding a timer to my blynk program that would only send data out onto the internet at a predetermined interval?
thanks.
Jeff

I guess a lot depends on how you’ve written the LoRa Gateway, but assuming you’ve optimised it well then you should probably read this…

Deepl or Google Translate does a pretty good job on making sense of it, assuming you dont speak Russian.

Pete.

Thanks for that Pete. It looks like (if I can understand the translation) he’s using about 2MB a month. That doesn’t seem too much. The IT guy at the cottage on the island was saying I was sucking back way more than that and slowing down the system. I’ve thought of adding a delay line in the program so it only executes every twenty minutes or so. That should cut down on the traffic. I also have a timing module I could use to cycle on and off the arduino if that doesn’t work. Appreciate all the time you spend answering questions.
Jeff

Further studying the Russian reply I fully didn’t understand the PUSH function. If I understand right I can set the amount of time (1000L = 1 sec) for the polling. Is this a seperate app that requires an additional token in addition to the original app?

If anyone has been following this thread I think I might have half solved it. The purpose again was to cut down on my shared internet use at our summer cottage. The program uses millis to turn Blynk on briefly, then turn it off for about ten minutes, then reconnect then repeat. seems to work okay, but I’m open to suggestions to improve it.

 * For this example you'll need the following library:
 *  * 
 * 1) Arduino-LiquidCrystal-I2C-library: https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
 *
 * 2) Blynk Library: https://github.com/blynkkk/blynk-library
 *
 * Conncetions:
 * D1 -> SCL of I2C LCD 
 * D2 -> SDA of I2C LCD
 * D3 -> Out of DHT11/22
 *
 */
#include <LoRa.h>
#define BLYNK_PRINT Serial  
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

#define I2C_SDA D3 //redefining I2C pins as D1 is needed by LoRa unit
#define I2C_SCL D4

#define ss 15
#define rst 16
#define dio0 2


unsigned long previousMillis = 0;        // will store last time LED was updated
unsigned long interval = 1000;          





const int ledPin = D1; //warning light that water has dropped beyone preset level

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; //Enter the Auth code which was send by Blink

char ssid[] = "xxxxxxxxxxx;  //Enter your WIFI Name
char pass[] = "xxxxxxxxxxxxxxx";  //Enter your WIFI Password


void setup()
{
pinMode(ledPin,OUTPUT);
Wire.pins(D3, D4);
  
  //Serial.begin(9600);

lcd.begin();   // iInit the LCD for 16 chars 2 lines
  lcd.backlight();   // Turn on the backligt (try lcd.noBaklight() to turn it off)
  delay (1000);
  Blynk.begin(auth, ssid, pass);

   Serial.println("LoRa Sender");
 LoRa.setPins(ss, rst, dio0);
  if (!LoRa.begin(433E6)) 
  {
    Serial.println("Starting LoRa failed!");
    delay(100);
    while (1);
  }
  Serial.println("LoRa Started");
  lcd.clear();
  lcd.print("Waiting");
   LoRa.setSpreadingFactor(10);
 LoRa.setSignalBandwidth(62.5E3);
LoRa.crc(); 
}

void loop()
{
 // try to parse packet
  int packetSize = LoRa.parsePacket();
  int targetDistance = LoRa.parseInt();

  if (packetSize)
  {  
    //Serial.print("distance is ");
    // Serial.print(targetDistance);
   // Serial.print(" inches ");
   // Serial.println(" ");
    
 
lcd.setCursor(0,0); //First line
lcd.print("water is down");
lcd.setCursor(0,1); //Second line
lcd.print((targetDistance - 4));
lcd.print(" inches");



unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
    previousMillis = currentMillis;
Blynk.connect();    
 Blynk.run(); // Initiates Blynk
 Blynk.virtualWrite(V1,(targetDistance - 4)); 
 interval = 10 * 1000UL;
 } 
 else {
  Blynk.disconnect();
 interval = 10 * 60 * 1000UL;
 }
 
delay(1000);

 {
      if ((targetDistance - 4) <= 25 )
      {
        digitalWrite(ledPin,LOW);
      }
      else 
      {
        digitalWrite(ledPin,HIGH);
      }
 }
  }
}

@Bundolo1 please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.