title: UniversalTelegramBot doesn't work with ESP32 but it doesn't show an error. I think it's a libraries version compatibility issue,could someone help me?
body: <p>I'm developing a program in Arduino Ide (v. 1.8.13) which takes brightness values and send them to ESP32 Web Server. Also, I want to add the posibility of seeing the data via Telegram. At the moment I just want to send '/start' to the Telegram bot and Arduino program answer with a welcome message. However, the bot doesn't receive my messages. I read this is a versions issue between ArduinoJson, Universal Telegram Bot, Arduino Ide and ESP32 Core version. Could someone tell me what versions work fine in ESP32? I'm getting crazy.</p>
  <p>I add my actual code.</p>
  <p>These are the versions I'm using: Arduino Ide:1.8.13, Arduino Json:6.18, Universal Telegram Bot:1.3.0, Wifi Client Secure:1.0, ESP32:1.04.</p>
  <p>Thanks in advance :)</p>
  <pre><code>// Import required libraries
  #include &lt;WiFi.h&gt;
  #include &lt;Wire.h&gt;
  #include &lt;ESPAsyncWebServer.h&gt;
  #include &lt;SPIFFS.h&gt;
  #include &lt;Adafruit_Sensor.h&gt;
  #include &lt;Adafruit_TSL2561_U.h&gt;
  
  #include &lt;WiFiClientSecure.h&gt;
  #include &lt;UniversalTelegramBot.h&gt;
  #include &lt;ArduinoJson.h&gt;
  
  #include &lt;TimeAlarms.h&gt;
  #include &lt;Time.h&gt;
  #include &lt;TimeLib.h&gt;
  
  
     
  const char* ssid_STA = &quot;XXXXXX&quot;;
  const char* password_STA = &quot;XXXXXX&quot;;
  IPAddress ip(192,168,1,44);
  IPAddress gateway(192,168,1,1);
  IPAddress subnet(255,255,255,0);
  
  #define BOTtoken &quot;XXXXXX&quot;
  #define CHAT_ID &quot;XXXXXXX&quot;
  
  WiFiClientSecure client;
  UniversalTelegramBot bot(BOTtoken, client);
  
  time_t fecha;
  
  int botRequestDelay = 1000;
  unsigned long lastTimeBotRan;
  
  // Create AsyncWebServer object on port 80
  AsyncWebServer server(80);
  Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);
  
  
  void configureSensor(void)
  {
    /* You can also manually set the gain or enable auto-gain support */
    // tsl.setGain(TSL2561_GAIN_1X);      /* No gain ... use in bright light to avoid sensor saturation */
    // tsl.setGain(TSL2561_GAIN_16X);     /* 16x gain ... use in low light to boost sensitivity */
    tsl.enableAutoRange(true);            /* Auto-gain ... switches automatically between 1x and 16x */
    
    /* Changing the integration time gives you better sensor resolution (402ms = 16-bit data) */
    tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_13MS);      /* fast but low resolution */
    //tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_101MS);  /* medium resolution and speed   */
    // tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_402MS);  /* 16-bit data but slowest conversions */
  
    /* Update these values depending on what you've set above! */  
    Serial.println(&quot;------------------------------------&quot;);
    Serial.print  (&quot;Gain:         &quot;); Serial.println(&quot;Auto&quot;);
    Serial.print  (&quot;Timing:       &quot;); Serial.println(&quot;13 ms&quot;);
    Serial.println(&quot;------------------------------------&quot;);
  }
  
  String readLuz() {
   
   /* Get a new sensor event */ 
    sensors_event_t event;
    tsl.getEvent(&amp;event);
   
    /* Display the results (light is measured in lux) */
    
    Serial.print(event.light); Serial.println(&quot; lux&quot;);
    
    return String(event.light);
    
    
  }
  void Informacion(){
    Serial.println(&quot;voy a enviar&quot;);
    sensors_event_t event;
    tsl.getEvent(&amp;event);
    //bot.sendMessage(chat_ID, &quot;La luminosidad en tu jardín es de &quot; ,&quot;&quot;);
    Serial.println(&quot;enviado&quot;);  
  }
  
  void handleNewMessages(int numNewMessages) {
    Serial.println(&quot;handleNewMessages&quot;);
    Serial.println(String(numNewMessages));
  
    for (int i = 0; i &lt; numNewMessages; i++) {
      String chat_id = String(bot.messages[i].chat_id);
      Serial.println(chat_id);
      if (chat_id != CHAT_ID){
        bot.sendMessage(chat_id, &quot;Unauthorized user&quot;, &quot;&quot;);
        continue;
      }
      //COger texto
      String text = bot.messages[i].text;
      Serial.println(text);
      //Coger nombre
      String from_name = bot.messages[i].from_name;
      
      //if (text == &quot;/get_info&quot;) {
        
      //}    
      if (text == &quot;/start&quot;) {
        String welcome = &quot;Bienvenida &quot;+from_name+&quot;\n&quot;;
        welcome += &quot;Properties.\n\n&quot;;
        welcome += &quot;/get_info : Obtener información actual del jardín\n&quot;;
        
        bot.sendMessage(chat_id, welcome, &quot;&quot;);
      }
    }
  }
  /**************************************************************************/
  /*
      Arduino setup function (automatically called at startup)
  */
  /**************************************************************************/
  void setup(void) 
  {
    
    Serial.begin(115200);
  //  client.setInsecure();
    /* Initialise the sensor */
    //use tsl.begin() to default to Wire, 
    //tsl.begin(&amp;Wire2) directs api to use Wire2, etc.
    if(!tsl.begin())
    {
      /* There was a problem detecting the TSL2561 ... check your connections */
      Serial.print(&quot;Ooops, no TSL2561 detected ... Check your wiring or I2C ADDR!&quot;);
      while(1);
    }  
    /* Display some basic information on this sensor and  Setup the sensor gain and integration time */
    //displaySensorDetails();
    configureSensor();
  
     
    ///EJEMPLO SREVER
   
    // Initialize SPIFFS
    if(!SPIFFS.begin()){
      Serial.println(&quot;An Error has occurred while mounting SPIFFS&quot;);
      return;
    }
   
   ;
    // Connect to Wi-Fi
    //WiFi.softAP(ssid_AP, password_AP);
    WiFi.mode(WIFI_STA);
    WiFi.config(ip, gateway, subnet);
    WiFi.begin(ssid_STA, password_STA);
    
    
    
    while (WiFi.status() != WL_CONNECTED) {
      delay(3000);
      Serial.println(&quot;Connecting to WiFi..&quot;);
    }
    
    // Print ESP32 Local IP Address
    Serial.println(&quot;IP&quot;);
    Serial.println(WiFi.localIP());
    
  
    // Route for root / web page
   
    server.on(&quot;/&quot;, HTTP_GET, [](AsyncWebServerRequest *request){
      request-&gt;send(SPIFFS, &quot;/index.html&quot;);
    });
    
    server.on(&quot;/luz&quot;, HTTP_GET, [](AsyncWebServerRequest *request){
      request-&gt;send_P(200, &quot;text/plain&quot;, readLuz().c_str());
    });
    
    // Start server
    server.begin();
  
    /*
    //ALARMS
    //Coger la hora real al reiniciar
    //fecha = now();
    //Serial.print(hour(fecha));  Serial.print(minute(fecha)); Serial.print(second(fecha)); Serial.print(day(fecha)); Serial.print(month(fecha)); Serial.println(year(fecha));
    //setTime(hour(fecha), minute(fecha),second(fecha), day(fecha), month(fecha),year(fecha));
    setTime(12, 42, 00, 16, 6, 21);
    
    // Crear las alarmas y configurar las funciones correspondientes a cada una
    Alarm.alarmRepeat(8, 0, 0, Informacion);  // Evento a las 14:00 diario
    Alarm.alarmRepeat(12,43, 0, Informacion);  // Evento a las 14:05 diario
    Alarm.alarmRepeat(21, 0, 0, Informacion);  // Evento a las 14:10 diario
    */
  }
  
  /**************************************************************************/
  /*
      Arduino loop function, called once 'setup' is complete (your own code
      should go here)
  */
  /**************************************************************************/
  void loop(void){  
    if (millis() &gt; lastTimeBotRan + botRequestDelay)  {
      Serial.println(&quot;loop&quot;);
      Serial.println(bot.last_message_received);
      int numNewMessages = bot.getUpdates(bot.last_message_received + 1);
  
      while (numNewMessages) {
        Serial.println(&quot;got response&quot;);
        handleNewMessages(numNewMessages);
        numNewMessages = bot.getUpdates(bot.last_message_received + 1);
      }
  
      lastTimeBotRan= millis();
    }
    // Mostrar el reloj en el monitor serial
    //digitalClockDisplay();
   
    // Esperar 1 segundo y procesar las Alarmas mientras tanto...
    //Alarm.delay(1000);
  }
  
  /*
  void digitalClockDisplay() {
    Serial.print(hour());
    printDigits(minute());
    //printDigits(second());
    Serial.println();
  }
  void printDigits(int digits) {
    Serial.print(&quot;:&quot;);
    if (digits &lt; 10)
      Serial.print('0');
    Serial.print(digits);
  }
  */
  </code></pre>