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

Component dallasng took a long time for an operation #14

Open
Masterz69 opened this issue Nov 29, 2023 · 2 comments
Open

Component dallasng took a long time for an operation #14

Masterz69 opened this issue Nov 29, 2023 · 2 comments

Comments

@Masterz69
Copy link

Have 3 sensors connected to ESP32.

esp32:
  board: esp32dev

Getting following messages instantly.

[11:37:18][W][component:204]: Component dallasng took a long time for an operation (0.16 s).
[11:37:18][W][component:205]: Components should block for at most 20-30ms.

On other hands ESP8266 with 6 sensors have no messages in log.

esp8266:
  board: esp_wroom_02

If can help to investigate case why more powewrfull board spend more time on reading less sensors - just let me know.

@nilrog
Copy link

nilrog commented Dec 4, 2023

I see the same error, with only one Dallas sensor on my device. It is a Sonoff TH Elite, with a DS18B20 sensor. No modifications done, except that it now runs ESPHome.
https://sonoff.tech/product/diy-smart-switches/th-elite/

I switched recently to this component after I started getting scratchpad errors with the built-in Dallas component in ESPHome.
It is running the Thermostat Climate component, using the dallas sensor for temperature.

esp32:
  board: nodemcu-32s

external_components:
  - source: github://nrandell/dallasng

dallasng:
  pin: GPIO25
  update_interval: 15s

sensor:
  - platform: dallasng
    name: "Temperature"
    id: "dallas_temperature"
    index: 0

This is what is logged for each cycle:

[18:12:47][V][dallasng.sensor:065]: Scratchpad: 620055057fa5a56628
[18:12:47][D][dallasng.sensor:119]: 'Temperature' got temperature as 6125 (6.125000)
[18:12:47][V][sensor:076]: 'Temperature': Received new state 6.125000
[18:12:47][D][sensor:127]: 'Temperature': Sending state 6.12500 °C with 1 decimals of accuracy
[18:12:47][D][climate:387]: 'Climate' - Sending state:
[18:12:47][D][climate:390]:   Mode: COOL
[18:12:47][D][climate:392]:   Action: IDLE
[18:12:47][D][climate:410]:   Current Temperature: 6.12°C
[18:12:47][D][climate:416]:   Target Temperature: 9.00°C
[18:12:47][V][component:200]: Component dallasng took a long time for an operation (0.06 s).
[18:12:47][V][component:201]: Components should block for at most 20-30ms.

@ptr727
Copy link

ptr727 commented Jan 8, 2024

Similar issue observed here.
Using standard dallas I get scratchpad errors on first read, and I get took too long errors.
With dallasng I no longer get scratchpad errors, but with a single sensor from adafruit advertised as "tested" authentic I get occasional took too long error.

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