Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 (Wroom) doent work with Dallas DS18B20 Sensor #5730

Open
StrSebastian opened this issue Apr 23, 2024 · 3 comments
Open

ESP32 (Wroom) doent work with Dallas DS18B20 Sensor #5730

StrSebastian opened this issue Apr 23, 2024 · 3 comments

Comments

@StrSebastian
Copy link

The problem

I tested 300 Versions of these kind of yaml.
And all kinds of configuratiosn nothing worked.
Sensor not found or jost nothing in the log.
I also uses all kind of resostors.
Also multible or single sensors.
But what makes me sure about the issu: it worked first try with Arduino IDE. Got the right temprature with example code.
My guess is, the bug is somewhere in the lib ob HA build pipline.

Which version of ESPHome has the issue?

2024.4.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.4.3

What platform are you using?

ESP32

Board

Wroom 32

Component causing the issue

Dallas Sensor DS18B20

Example YAML snippet

I tested 300 Versions of these kind of yaml. 
And all kinds of configuratiosn nothing worked. 
Sensor not found or jost nothing in the log.
I also uses all kinds of resostors. 
Also multible or single sensors.
But what makes me sure about the issu: it worked first try with Arduino IDE. Got the right temprature with example code.
My guess is, the bug is somewhere in the lib ob HA.
dallas:
  pin:
    number: GPIO26<Optional tested>
    mode:
      input: true <Optional tested> 
      pullup: true<Optional tested>
  update_interval: 5s

Anything in the logs that might be useful for us?

nop.

Additional information

https://community.simon42.com/t/probleme-mit-esp32-und-dallas-temperatur-sensor/4522/15

@sbrk-r
Copy link

sbrk-r commented Apr 24, 2024

Try commenting out mode/input/pullup and have a hardware pullup, see if it works. Maybe mode is overriding something crucial.

I see open feature request asking for advanced pin options, so must not be supported currently..? Maybe it was added without closing FR FR 2499

I use configuration like this on many boards with no issues:

dallas:
  - pin: GPIO16
    id: ow0
    update_interval: 10s

sensor:
  - platform: dallas
    #address: 0x6c0000052b7f0828
    dallas_id: ow0
    index: 0
    name: "ow0_t0"
    accuracy_decimals: 2

@StrSebastian
Copy link
Author

StrSebastian commented Apr 25, 2024

thx for the answer @sbrk-r
Unfortunatly i tryed all versions.
specially with and without these lines of code.
I testet your config but it didnt work again :/
console:
[19:59:27][C][dallas.sensor:075]: DallasComponent:
[19:59:27][W][dallas.sensor:080]: Found no sensors!
[19:59:27][C][dallas.sensor:089]: Device 'ow0_t0'
[19:59:27][C][dallas.sensor:089]: Device Class: 'temperature'
[19:59:27][C][dallas.sensor:089]: State Class: 'measurement'
[19:59:27][C][dallas.sensor:089]: Unit of Measurement: '°C'
[19:59:27][C][dallas.sensor:089]: Accuracy Decimals: 2
[19:59:27][C][dallas.sensor:091]: Index 0

here my code:
substitutions:
name: esphome-web-xxx
friendly_name: ESPHome Web xxxx

esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
project:
name: esphome.web
version: '1.0'

esp32:
board: esp32dev
framework:
type: arduino

Enable logging

logger:

Enable Home Assistant API

api:

Allow Over-The-Air updates

ota:

Allow provisioning Wi-Fi via serial

improv_serial:

wifi:

Set up a wifi access point

ap: {}

In combination with the ap this allows the user

to provision wifi credentials to the device via WiFi AP.

captive_portal:

dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true

Sets up Bluetooth LE (Only on ESP32) to allow the user

to provision wifi credentials to the device.

esp32_improv:
authorizer: none

To have a "next url" for improv serial

#web_server:

dallas:

  • pin: GPIO16
    id: ow0
    update_interval: 10s

sensor:

  • platform: dallas
    #address: 0x6c0000052b7f0828
    dallas_id: ow0
    index: 0
    name: "ow0_t0"
    accuracy_decimals: 2

@swoboda1337
Copy link

Did you pull the usb/serial logs. Should see "Setting up DallasComponent..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants