Giter Site home page Giter Site logo

Comments (4)

vlw avatar vlw commented on August 16, 2024

+1
ESP32 really loss a lot of messages if we trying to send it by external trigger (for example, send message when pin triggered)
If use ESP32 only for reply to incoming messages, it working good :/

from asynctelegram.

vlw avatar vlw commented on August 16, 2024

ESP8266 does not affected

from asynctelegram.

cotestatnt avatar cotestatnt commented on August 16, 2024

Sorry for big late response, but in these days my free time has been dedicated to the development of version 2.

As for the problem in question, I suppose that somehow it is due to the fact that with the esp32, sending of commands to the server takes place in a parallel task and therefore the requests are "overlapped" with periodically getUpdates() request.
Indeed, in the new version I have removed this mechanism leaving the users free to choice if use or not the task management (but on the sketch side like I've done in ESP32-CAM.ino for example).

If you want try to switch, I've created a distinct repo for the reason explained within readme,
I'm testing it since days with very good results. Now i'm testing a sketch for sending a message every 10s like this.
Actually it fails sometimes (less than 1%) when connection was closed from server side while sending message, but i'm sure this can be avoided easily for example checking for new messages just before.

if(millis() - tMessage > 10000){  
  tMessage = millis();  
  time_t now = time(nullptr);  
  struct tm time = *localtime(&now);
  char buffer[128];
  static int count = 0;
  snprintf(buffer, 256, "%d - %02d:%02d:%02d\n",  count++, time.tm_hour,  time.tm_min, time.tm_sec);
  Serial.print(buffer);
}

from asynctelegram.

vlw avatar vlw commented on August 16, 2024

BTW if we disable multicore http-client (use esp32 with "ESP8266 ifdefs") then loss of messages bug is gone.

I suggest adding the option to disable the multi-core client and use blocking functions if the user wants to get stable message delivery

from asynctelegram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.