Another 1-wire issue

currently on 2024.7.3
My Dallas temp sensors were working fine for the last 6 months. not changes or issues. Powered down system to add a new network switch and reorganize wires. when I booted back up my dallas sensors are not working,. I missed all the excitement about 2024.6 update evidently because my dallas sensors simply kept working but now they are not working and I can’t find the cause.

what am i missing here

Logs attic-temps.yaml
INFO ESPHome 2024.7.2
INFO Reading configuration /config/esphome/attic-temps.yaml...
INFO Starting log output from 10.0.4.120 using esphome API
INFO Successfully connected to attic-temps @ 10.0.4.120 in 0.007s
INFO Successful handshake with attic-temps @ 10.0.4.120 in 2.515s
[20:47:39][I][app:100]: ESPHome version 2024.7.2 compiled on Jul 29 2024, 20:38:52
[20:47:39][C][wifi:599]: WiFi:
[20:47:39][C][wifi:427]:   Local MAC: 48:55:19:EC:AA:9F
[20:47:39][C][wifi:432]:   SSID: [redacted]
[20:47:39][C][wifi:435]:   IP Address: 10.0.4.120
[20:47:39][C][wifi:438]:   BSSID: [redacted]
[20:47:39][C][wifi:440]:   Hostname: 'attic-temps'
[20:47:39][C][wifi:442]:   Signal strength: -41 dB ▂▄▆█
[20:47:39][C][wifi:446]:   Channel: 7
[20:47:39][C][wifi:447]:   Subnet: 255.255.255.0
[20:47:39][C][wifi:448]:   Gateway: 10.0.4.1
[20:47:39][C][wifi:449]:   DNS1: 10.0.4.1
[20:47:39][C][wifi:450]:   DNS2: 0.0.0.0
[20:47:39][C][logger:185]: Logger:
[20:47:39][C][logger:186]:   Level: DEBUG
[20:47:39][C][logger:188]:   Log Baud Rate: 115200
[20:47:39][C][logger:189]:   Hardware UART: UART0
[20:47:39][C][gpio.one_wire:020]: GPIO 1-wire bus:
[20:47:39][C][gpio.one_wire:021]:   Pin: GPIO4
**[20:47:39][W][gpio.one_wire:078]:   Found no devices!**
[20:47:39][C][dallas.temp.sensor:029]: Dallas Temperature Sensor:
[20:47:39][C][dallas.temp.sensor:034]:   Address: 0x363ce1045716ab28 (DS18B20)
[20:47:39][C][dallas.temp.sensor:035]:   Resolution: 12 bits
[20:47:39][C][dallas.temp.sensor:036]:   Update Interval: 30.0s
[20:47:39][C][dallas.temp.sensor:029]: Dallas Temperature Sensor:
[20:47:39][C][dallas.temp.sensor:034]:   Address: 0x493ce1045791d728 (DS18B20)
[20:47:39][C][dallas.temp.sensor:035]:   Resolution: 12 bits
[20:47:39][C][dallas.temp.sensor:036]:   Update Interval: 60.0s
[20:47:39][C][dallas.temp.sensor:029]: Dallas Temperature Sensor:
[20:47:39][C][dallas.temp.sensor:034]:   Address: 0x213ce10457c63028 (DS18B20)
[20:47:39][C][dallas.temp.sensor:035]:   Resolution: 12 bits
[20:47:39][C][dallas.temp.sensor:036]:   Update Interval: 60.0s
[20:47:39][C][dallas.temp.sensor:029]: Dallas Temperature Sensor:
[20:47:39][C][dallas.temp.sensor:034]:   Address: 0x4b3ce1045770ec28 (DS18B20)
[20:47:39][C][dallas.temp.sensor:035]:   Resolution: 12 bits
[20:47:39][C][dallas.temp.sensor:036]:   Update Interval: 60.0s
[20:47:39][C][dallas.temp.sensor:029]: Dallas Temperature Sensor:
[20:47:39][C][dallas.temp.sensor:034]:   Address: 0xe93ce10457e68128 (DS18B20)
[20:47:39][C][dallas.temp.sensor:035]:   Resolution: 12 bits
[20:47:39][C][dallas.temp.sensor:036]:   Update Interval: 60.0s
[20:47:39][C][captive_portal:088]: Captive Portal:
[20:47:39][C][mdns:116]: mDNS:
[20:47:39][C][mdns:117]:   Hostname: attic-temps
[20:47:39][C][esphome.ota:073]: Over-The-Air updates:
[20:47:39][C][esphome.ota:074]:   Address: 10.0.4.120:8266
[20:47:39][C][esphome.ota:075]:   Version: 2
[20:47:39][C][esphome.ota:078]:   Password configured
[20:47:39][C][safe_mode:018]: Safe Mode:
[20:47:39][C][safe_mode:019]:   Boot considered successful after 60 seconds
[20:47:39][C][safe_mode:021]:   Invoke after 10 boot attempts
[20:47:39][C][safe_mode:022]:   Remain in safe mode for 300 seconds
[20:47:39][C][api:139]: API Server:
[20:47:39][C][api:140]:   Address: 10.0.4.120:6053
[20:47:39][C][api:142]:   Using noise encryption: YES
[20:47:48][W][component:170]: **Component dallas_temp.sensor cleared Warning flag**
**[20:47:49][W][dallas.temp.sensor:074]: 'Temp 5' - reading scratch pad failed bus reset**
**[20:47:49][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed**
**[20:47:49][D][sensor:093]: 'Temp 5': Sending state nan °C with 1 decimals of accuracy**
**[20:47:55][W][component:170]: Component dallas_temp.sensor cleared Warning flag**
**[20:47:55][W][dallas.temp.sensor:074]: 'Temp 2' - reading scratch pad failed bus reset**
**[20:47:55][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed**
**[20:47:55][D][sensor:093]: 'Temp 2': Sending state nan °C with 1 decimals of accuracy**
**[20:48:01][W][component:170]: Component dallas_temp.sensor cleared Warning flag**
**[20:48:02][W][dallas.temp.sensor:074]: 'Temp 1' - reading scratch pad failed bus reset**
**[20:48:02][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed**
**[20:48:02][D][sensor:093]: 'Temp 1': Sending state nan °C with 1 decimals of accuracy**
**[20:48:05][W][component:170]: Component dallas_temp.sensor cleared Warning flag**
**[20:48:06][W][dallas.temp.sensor:074]: 'Temp 3' - reading scratch pad failed bus reset**
**[20:48:06][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed**
**[20:48:06][D][sensor:093]: 'Temp 3': Sending state nan °C with 1 decimals of accuracy**
**[20:48:08][W][component:170]: Component dallas_temp.sensor cleared Warning flag**
**[20:48:08][W][dallas.temp.sensor:074]: 'Temp 4' - reading scratch pad failed bus reset**
**[20:48:08][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed**
**[20:48:08][D][sensor:093]: 'Temp 4': Sending state nan °C with 1 decimals of accuracy**
**```**
esphome:
  name: attic-temps
  friendly_name: Attic-Temps

esp8266:
  board: esp01_1m

# Enable logging
logger:

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/esphome
      ref: onewire
    components: [ gpio ]
    refresh: 1min

one_wire:
- platform: gpio
  pin: GPIO4

# Individual sensors
sensor:
  - platform: dallas_temp
    update_interval: 30s
    address: 0x363ce1045716ab28
    name: "Temp 1"
  - platform: dallas_temp
    address: 0x493ce1045791d728
    name: "Temp 2"
  - platform: dallas_temp
    address: 0x213ce10457c63028
    name: "Temp 3" 
  - platform: dallas_temp
    address: 0x4b3ce1045770ec28
    name: "Temp 4"
  - platform: dallas_temp
    address: 0xe93ce10457e68128
    name: "Temp 5"



# Enable Home Assistant API
api:
  encryption:
    key: "XXX"

ota:
  platform: esphome
  password: "XXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 10.0.4.120
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Attic-Temps Fallback Hotspot"
    password: "ZZZ"

captive_portal:
    

Your one_wire and sensor section look correct. Why the external source? Remove that section and try again.

Either your board or your gpio is incorrect, esp01 doesn’t have gpio4

It looks like the 1m is some random variant with additional gpios.

I would expect it’s for 1MB flash size.
And I remember issue where inexistent pin on esp-01 caused problems.

Working for months with this config.

Up to you…

Did you ever solve this? I have exactly the same problem - two sensors on an ESP32 working for months suddenly stopped working. Tried separating them onto separate buses, swapped out sensors, even swapped out the ESP32 with no luck. Out of ideas to fix.

ended up replacing the bad sensors. not sure why they failed but they did. continuity checks across the various wires were all over the board when compared to new.
having one bad one, impacted ones further down the line as it confused the signals.

I’m having a similar issue, Waveshare Industrial 6-Channel ESP32-S3 WiFi Relay Module, 2 DS18B20 sensors with 3 mt cable, 4K7 pullup resistor. All good for months with external component one-wire, then yesterday, a few hours after esphome compiler and board update, started to fail both sensors. Rebooted seems not ok then turn off/on power supply to the board started to work again, but this morning same problem:

[11:29:33][W][dallas.temp.sensor:074]: 'Camino' - reading scratch pad failed bus reset
[11:29:33][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[11:29:33][W][component:172]: Component dallas_temp.sensor cleared Warning flag
[11:29:34][W][dallas.temp.sensor:074]: 'Ricircolo camino' - reading scratch pad failed bus reset
[11:29:34][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed

I haven’t checked the 3V3 out from the board yet cause I’m at work, will do later, but I’m thinking to replace both sensors (I hope the problem is not the board!).
If someone have suggestion on good sensors please let me know, at the moment I have found AZdelivery on Amazon.

The problem is that all DS18B20 sensors on Amazon , AE etc are fakes.
You should order them from some serious supplier like Mouser, Digikey…

Thank you for the advice, I can find DFRobot sensors (waterproof but not shielded) for a good price on RS or AE (original DFR shop), since I’m in Italy it’s harder to buy Adafruit or Sparkfun.

Farnell, Conrad…?

1 Like

Yes, Farnell has Adafruit with shielded cable, it but at non sense price (80€ for 2 sensors).

In alternative I could buy the chips and make myself an enclosure, maybe from the old ones, I have good shielded cables at work.
https://it.farnell.com/analog-devices/ds18b20-sl-t-r/sensore-di-temperatura-0-5-c-to/dp/2909834

In my case I don’t mind if the sensor is a clone or not too precise (I measure temperature from 20 to 90-95°C, and 2-3°C accuracy is more than enough precise since I measure water temperature from an hydraulic fireplace to start pumps for heaters/radiators flow in my house), it’s more important that they don’t give false NaN value, so reliability is more important. Maybe I have used the wrong sensor?? (Note that if the sensor reply NaN or a value out of range I start the circulation for safety)

Interesting investigation on the link by the way,

my probes have this address:

  - platform: dallas_temp
    address: 0x 3d 17 8f 4b 1f 64 ff 28
    name: "Camino"
    id: 'camino'
    filters:
      - heartbeat: 10s

  - platform: dallas_temp
    address: 0x b2 83 8a 4b 1f 64 ff 28
    name: "Ricircolo camino"
    id: 'ricircolo_camino'
    filters:
      - heartbeat: 10s

If the ROM does not follow the pattern 28-xx-xx-xx-xx-00-00-xx then the DS18B20 sensor is a clone [5].

It’s cheaper to wire 10 clones, exclude nans and calculate average. The problem is that one failed sensor can take the whole bus down.

1 Like

Sorry for my late reply. I have just found this on an italian electronic shop, and since the sensor is based on MAXIM DS18B20 i think I could trust it. What do you think @Karosm

They write it’s Maxim. But Futurashop is not Mouser. Either you believe or you send them email asking confirmation that it is genuine Maxim.

1 Like

at 5 euros it likely is not genuine

1 Like

You convinced me guys.

1 Like