ds18b20 temperature sensor problem

Hello everyone. I need help with the temperature sensor ds18b20. I put the sensors in parallel mode (normal mode) and I catch the value of the reading normally. The problem is: after a period of time (this period of time, some time is a short period and some time is for an average period of time), the ESP32 starts to lost the signal of the sensors (one after another) and retrieve the value -127,00 (I know that this value is lost signal information). I use 4 sensor in the same pin (1-wire bus). About the connection, I review this a lot of times and I sure that is correct. Follow my code:

#include <UnicViewAD.h>

#include <OneWire.h>
#include <DallasTemperature.h>

LCM Lcm(Serial);
LcmVar display1(10);
LcmVar display2(11);
LcmVar display3(12);
LcmVar display4(13);

OneWire sensorsPin = 25;
DallasTemperature sensors(&sensorsPin);

float lastTemperature1 = 0;
float lastTemperature2 = 0;
float lastTemperature3 = 0;
float lastTemperature4 = 0;

void setup()
{
    sensors.begin();
    Lcm.begin(115200);
    delay(3000);
    Serial.println("Quantity: " + String(sensors.getDeviceCount()));
}

void loop()
{
    float currentTemperature1, currentTemperature2, currentTemperature3, currentTemperature4;

    sensors.requestTemperatures();
    currentTemperature1 = sensors.requestTemperaturesByIndex(0);
    currentTemperature2 = sensors.requestTemperaturesByIndex(1);
    currentTemperature3 = sensors.requestTemperaturesByIndex(2);
    currentTemperature4 = sensors.requestTemperaturesByIndex(3);
    
    if(lastTemperature1 != currentTemperature1)
    {
        lastTemperature1 = currentTemperature1;
        display1.write(currentTemperature1);
    }
    if(lastTemperature2 != currentTemperature2)
    {
        lastTemperature2 = currentTemperature2;
        display2.write(currentTemperature2);
    }
    if(lastTemperature3 != currentTemperature3)
    {
        lastTemperature3 = currentTemperature3;
        display3.write(currentTemperature3);
    }
    if(lastTemperature4 != currentTemperature4)
    {
        lastTemperature4 = currentTemperature4;
        display4.write(currentTemperature4);
    }
    
    Serial.println("Temperature: 1" + String(currentTemperature1));
    Serial.println("Temperature: 2" + String(currentTemperature2));
    Serial.println("Temperature: 3" + String(currentTemperature3));
    Serial.println("Temperature: 4" + String(currentTemperature4));
}

About the time to read the values of the temperature. has an average reading time between one reading and another?
Thanks in advance!!!

You have no time control in your loop. No matter what the resolution is, DS18B20 takes time to do its job. I'm surprised you got anything to work at all. If you put a
delay(1000);
at the bottom of the loop, you might get a result.
"lost signal information" is a euphemism for "bad connection"

About the time to read the values of the temperature. has an average reading time between one reading and another?

Incoherent, but it looks like you already appreciate there might be a problem in that arena.

I see, I will take your advice. Really thank you very much for the answer.

-127,00 is an error indication that it was not properly read. There is an if available type of command you can use if you want, it eliminates timing loops. This is what I use. Sorry I do not know how to properly post it. I also added the libraries Involved in this piece of code. I do not know which are actually used, they simply work.
#include <Wire.h> // Wire Library for I/O
#include <OneWire.h> // Driver to communicate with 1 wire devices
#include <DallasTemperature.h> // Default conversion 9 bits
/*[ Reads the temperature sensor and averages it ]

  • Read the temperature sensor and average it with the last average resulting in *
  • a small rolling average. This works on the Arduinos *
  • --us *
    **********************************************************************************************/
    void Get_Temperature(){
    if (sensors.isConversionComplete() == true){ // Test to be sure sensor read is finished.
    Temperature_0 = sensors.getTempFByIndex(0); // Read the temperature from the sensor
    AvgTemperature = (AvgTemperature + Temperature_0) / 2;
    sensors.requestTemperatures(); // Read all temperature sensors
    } // End of Conversion
    } // end of temperature

This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil