Multiple DS18B20 dallas.sensor: Scratch pad checksum invalid!

I can confirm that changing GPIO helped in some occasions. Also index: 0 helped on a 4m long wire sensor.
Also I found a strange thing.
I had a 3m sensor, and I changed it with 4m. After the change, I updated the code with the new address from the logs, and the scratch pad error started.
After replacing the address with index: 0, it started working, also the address in the logs changed.
I tried again with the new address, and now it’s working.
In conclusion, the address in the logs after the first firmware update wasn’t right, and only after I applied the index:0, the correct address was received

My situation: two DS18B20 sensors on one GPIO pin. If I defined both under platform, neither sensor was found and I got checksum invalid warnings. If I only defined one or the other, both sensor addresses were found, but obviously I only got data from one. None of the suggestions here worked (external library, different power source etc.).

In the end I just defined two dallas pins and separated the sensors and added another 4.7kOhm resistor - works fine.

Had this issue occur tonight after upgrading ESPhome to 2024.6

[19:56:44][W][dallas.temp.sensor:074]: ‘Home Temperature’ - reading scratch pad failed bus reset
[19:56:44][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[19:56:44][D][sensor:094]: ‘Home Temperature’: Sending state nan °C with 1 decimals of accuracy

Changed to GPIO 23 and now working again. Was previously on 15

Dallas has to be changed to one wire, see here

Yes I made the correct changes to esp home and this is when the errors occurred

Assume the Sensor’s Changed too?

From:-

dallas:
  - pin: GPIO23
    update_interval: 10s
sensor:
  - platform: dallas
    name: "Spa-1_TsAmb"
    address: 0x6f0115a867a6ff28

To:-

one_wire:
  - platform: gpio
    pin: GPIO23
    update_interval: 10s
sensor:
  - platform: dallas_temp
    name: "Spa-1_TsAmb"
    address: 0x6f0115a867a6ff28

Look Right?

Found the Same as the above here, ESPHome 2024.6.0 - 19th June 2024 — ESPHome

Would be helpful to new comers if the full example was displayed here:-
Dallas Temperature Sensor — ESPHome
a bit like how the original dallas component had a full example.

Yes I changed both and is now working ok

I believe the update_interval goes in sensor section. There are issues with the 1-wire changes though.

same thing, was on 15 and moved to 23 and working again. I don’t know much about anything, and less about this stuff, but glad it’s working now.

Any Links?

As in it wouldn’t work on Pin 15?
Weird, but maybe it’s a difference in Pin capabilities.

I have the same problem. None of the Dallas sensors work after the update. I applied all the code changes. I am using GPIO15, It’s going to be a mission to uninstall about 18 sensors (3x Dallas temp) in the roof crawl space. Has anyone else also found that moving from GPIO15 to another GPIO works on the 2024.06.1 update?

Can’t comment on GPIO15 but my single sensor was working on GPIO32. The other issue is that the new changes are causing inconsistent readings as also reported by others. I changed to using dallasng until this issue is sorted.

Give 2024.6.2 a try, my 2 Dallas sensors on GPIO15 are back working

Look at issue tracking on github esphome and in this forum. I had no trouble getting one_wire to work but temp readings are variable and generally 4°C lower than actual. Pretty much useless at the moment. I just tried 2024.6.2 and no improvement.

I’m guessing you have an S20 sensor. There’s a fix coming in the next point release shortly (or you can use the PR until then).

Have had these sensors for about 10 years connected to a laptop and reading hourly indoor/outdoor temp. Now just have one connected to esp32.

Ran with 2024.6.2 and your dallas_temp source and working well. Seems to be back to what it was before the breaking change.

Update: After the EspHome 2024.06.2 patch, My one Dallas roof temp sensor is working again as it did before rev. 2024.06.1.
I set up a bench test with an ESP 32 and 3x Dallas sensors to see if they work on GPIO15. One sensor on breadboard and two on 1m long leads. All seems to be working okay, but does need a cold boot to detect the new sensor. (At least I know that my roof sensors should work. Will recheck for dry joints.)

I have 4x Kinkony KC868-A8 boards,

Of which, 3 have Dallas DS18B20s connected (all just have 1 sensor). All were working fine until one day, one just stopped working with the Scratch pad checksum invalid! error. All the others work without fail, everytime.

The strange thing is, if I take the Dallas sensor out of the config, and just leave the one_wire component, it finds the sensors and spits out an address, as soon as I add the sensor for the dallas_temp, I get no sensors found! and the scratch pad error.

Not sure whats going on here, but its strange that the hardware is EXACTLY the same, and all ESPhome version are EXACTLY the same, yet 1 just refuses to work.

I also tried a new sensor, same behavior.

This leads me to think that the address i’m receiving may be the incorrect address?

Were you actually able to get “pin: D6” to work? My board says “D22” but I’m assuming that actually “GPIO22”