Dallas sensor not found - ESPhome ERROR

Hi,
I have a project where I use a Dallas waterproof sensor to check the hot spring temp in my area, all was working well so I started soldering and when I finished I got an error when I tried to run the yml.
the esp couldn’t find my sensor.

I wrote a code just for the sensor part but it still isn’t working dose someone knows what can be the problem?

Code:

esphome:
  name: dallas-sensor-test
  platform: ESP32
  board: wemos_d1_mini32
# Enable logging
logger:
# Enable Home Assistant API
api:
  password: ""
ota:
  password: ""
wifi:
  ssid: "XXX"
  password: "XXX"
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "XXXX"
    password: "XXXX"
captive_portal:

dallas:
  - pin: GPIO25

Terminal:

INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from dallas-sensor-test.local using esphome API
WARNING Can't connect to ESPHome API for dallas-sensor-test.local: Error resolving IP address: [Errno 11001] getaddrinfo failed
INFO Trying to reconnect to dallas-sensor-test.local in the background
INFO Successfully connected to dallas-sensor-test.local
[21:49:23][I][app:102]: ESPHome version 2022.12.3 compiled on Jan  7 2023, 21:48:51
[21:49:23][C][wifi:504]: WiFi:
[21:49:23][C][wifi:362]:   Local MAC: 4C:11:AE:F9:7A:94
[21:49:23][C][wifi:363]:   SSID: 'XXX'
[21:49:23][C][wifi:364]:   IP Address: 192.168.1.19
[21:49:23][C][wifi:366]:   BSSID: AC:84:C6:46:38:DA
[21:49:23][C][wifi:367]:   Hostname: 'dallas-sensor-test'
[21:49:23][C][wifi:369]:   Signal strength: -54 dB ▂▄▆█
[21:49:23][C][wifi:373]:   Channel: 11
[21:49:23][C][wifi:374]:   Subnet: 255.255.255.0
[21:49:23][C][wifi:375]:   Gateway: 192.168.1.1
[21:49:23][C][wifi:376]:   DNS1: 213.57.2.5
[21:49:23][C][wifi:377]:   DNS2: 213.57.22.5
[21:49:23][C][logger:293]: Logger:
[21:49:23][C][logger:294]:   Level: DEBUG
[21:49:23][C][logger:295]:   Log Baud Rate: 115200
[21:49:23][C][logger:296]:   Hardware UART: UART0
[21:49:23][C][dallas.sensor:075]: DallasComponent:
[21:49:23][C][dallas.sensor:076]:   Pin: GPIO25
[21:49:23][C][dallas.sensor:077]:   Update Interval: 60.0s
[21:49:23][W][dallas.sensor:080]:   Found no sensors!
[21:49:23][C][captive_portal:088]: Captive Portal:
[21:49:23][C][mdns:103]: mDNS:
[21:49:23][C][mdns:104]:   Hostname: dallas-sensor-test
[21:49:23][C][ota:093]: Over-The-Air Updates:
[21:49:23][C][ota:094]:   Address: dallas-sensor-test.local:3232
[21:49:23][C][api:138]: API Server:
[21:49:23][C][api:139]:   Address: dallas-sensor-test.local:6053
[21:49:23][C][api:143]:   Using noise encryption: NO
[21:50:02][E][dallas.sensor:112]: Requesting conversion failed


this is the explanation on the esphome site:

thanks for the help :slight_smile:

First ensure you have a 4.7K resistor configured as per the Dallas sensor data sheet:

DS18B20

Then once you have done that - if it still doesn’t work, have a look at this Github issue:

The latest proposed solution fixed mine.

D1 has built in resistor, here is extract of my code:

dallas:
  - pin: 
      number: D2
      mode: INPUT_PULLUP

The value of which is approximately 50K…

For D1 board anything up to 100k ohms would work fine, I’ve not seen any performance degradation using the built in resistor and its one less thing to solder on the board!

Thanks,

this fixed the issue I was facing to!

Please update your Dallas wiring schematic. ESP8266 or ESP32 need to pullup resistor to 3.3V not 5V :astonished: The 5V as VCC is fine.

Unfortunately it’s not my schematic. It’s taken straight from the data sheet.

Hello, I just wanted to share my experience with you. I am using an ESP8266 Board from AZ Delivery.
It did not work with connecting the sensor with Pin D4 and configure Dallas with GPIO4.
I needed to solder to Pin D4 and configure to GPIO2.
The reason is certainly that I could not find the correct board while flashing ESPHOME.
I found this out by creating multiple Dallas IDs … and one found the sensor.