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!

1 Like

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.

Hi Bar Vadai,

I see many people, including myself, have encountered the same issue with the Dallas temperature sensor. After spending a considerable amount of time searching for solutions in forums, I found one on my own, surprisingly, just by reading the documentation. Sometimes we forget that the best solution can be found in the documentation. On the ESPHome documentation site, it’s crucial to understand the entire context.

I had the same problem making my temperature sensor detected by my ESP32-C3. This applies to the ESP8266 and ESP32 as well. After trying various GPIOs and reconnecting the sensor, I found the issue.

According to the ESPHome documentation:

“1-Wire Bus The one_wire component allows you to use supported 1-Wire devices in ESPHome. The 1-Wire bus the devices are connected to should have an external pullup resistor of about 4.7KΩ. For this, connect a resistor of about 4.7KΩ between 3.3V and the data pin. Values ± 1KΩ will, in most cases, work fine as well, if you don’t have massively long wires.”

Most of us buy the sensor encapsulated in stainless steel, waterproof support, with a single wire. I believe the component documentation suggests a 4.7K resistor, but in these conditions, which are commonly used in Arduino with 5V, when used with Espressif family devices at 3.3V and with Home Assistant, we encounter the problem of the sensor not being found.

After switching to a 1K resistor, my issue was resolved.

Here’s my code:

yaml

Copiar código

one_wire:
  - platform: gpio
    pin: GPIO05

sensor:
  - platform: dallas_temp
    address: 0x213ccbf649cdec28
    name: "Externo"
    update_interval: 30s

I believe this change should yield positive results. Please leave a like and provide feedback if it works for you.

Portuguese Response:

Oi Bar Vadai,

Vejo que muitas pessoas, assim como eu, têm enfrentado o mesmo problema com o sensor de temperatura Dallas. Após passar um tempo considerável procurando soluções em fóruns, encontrei uma por conta própria, surpreendentemente, apenas lendo a documentação. Às vezes, esquecemos que a melhor solução pode ser encontrada na documentação. No site da documentação do ESPHome, é crucial entender todo o contexto.

Tive o mesmo problema ao fazer com que meu sensor de temperatura fosse detectado pelo meu ESP32-C3. Isso se aplica ao ESP8266 e ESP32 também. Depois de tentar várias GPIOs e reconectar o sensor, encontrei o problema.

Conforme a documentação do ESPHome:

“1-Wire Bus O componente one_wire permite usar dispositivos 1-Wire suportados no ESPHome. O barramento 1-Wire ao qual os dispositivos estão conectados deve ter um resistor de pullup externo de cerca de 4.7KΩ. Para isso, conecte um resistor de cerca de 4.7KΩ entre 3.3V e o pino de dados. Valores ± 1KΩ funcionarão bem na maioria dos casos, se você não tiver fios extremamente longos.”

A maioria de nós compra o sensor encapsulado em suporte de aço inoxidável, à prova d’água, com um único fio. Acredito que a documentação do componente sugere um resistor de 4.7K, mas nessas condições, que são comumente usadas em Arduino com 5V, quando usados com dispositivos da família Espressif em 3.3V e com Home Assistant, encontramos o problema de o sensor não ser encontrado.

Depois de mudar para um resistor de 1K, meu problema foi resolvido.


Sensor de Temperatura Dallas — ESPHome
1-Wire Bus — ESPHome

1 Like

This.
You saved my day :grin:

“1-Wire Bus The one_wire component allows you to use supported 1-Wire devices in ESPHome. The 1-Wire bus the devices are connected to should have an external pullup resistor of about 4.7KΩ. For this, connect a resistor of about 4.7KΩ between 3.3V and the data pin. Values ± 1KΩ will, in most cases, work fine as well, if you don’t have massively long wires.”