Esphome HC-SR04P

Hello
I am trying to have an esp8266 Nodemcu with HC-SR04P under Esphome without success…

I have brocken all my teeth and I not find the problem …

Here the logs :

> INFO ESPHome 2024.3.1
> INFO Reading configuration /config/esphome/hc-sr04p-ds18b20.yaml...
> INFO Generating C++ source...
> INFO Compiling app...
> Processing hc-sr04p-ds18b20 (board: esp01_1m; framework: arduino; platform: platformio/[email protected])
> --------------------------------------------------------------------------------
> HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
> Dependency Graph
> |-- ESPAsyncTCP-esphome @ 2.0.0
> |-- ESPAsyncWebServer-esphome @ 3.1.0
> |-- DNSServer @ 1.1.1
> |-- ESP8266WiFi @ 1.0
> |-- ESP8266mDNS @ 1.2
> |-- noise-c @ 0.1.4
> |-- ArduinoJson @ 6.18.5
> Compiling .pioenvs/hc-sr04p-ds18b20/src/main.cpp.o
> Linking .pioenvs/hc-sr04p-ds18b20/firmware.elf
> RAM:   [====      ]  42.7% (used 34948 bytes from 81920 bytes)
> Flash: [=====     ]  50.3% (used 514657 bytes from 1023984 bytes)
> Building .pioenvs/hc-sr04p-ds18b20/firmware.bin
> esp8266_copy_factory_bin([".pioenvs/hc-sr04p-ds18b20/firmware.bin"], [".pioenvs/hc-sr04p-ds18b20/firmware.elf"])
> ========================= [SUCCESS] Took 5.29 seconds =========================
> INFO Successfully compiled program.
> INFO Connecting to 192.168.xxx.xxx
> INFO Uploading /data/build/hc-sr04p-ds18b20/.pioenvs/hc-sr04p-ds18b20/firmware.bin (518816 bytes)
> INFO Compressed to 362826 bytes
> Uploading: [============================================================] 100% Done...
> 
> INFO Upload took 6.77 seconds, waiting for result...
> INFO OTA successful
> INFO Successfully uploaded program.
> INFO Starting log output from 192.168.1.32 using esphome API
> INFO Successfully connected to hc-sr04p-ds18b20 @ 192.168.xx.xx in 31.602s
> INFO Successful handshake with hc-sr04p-ds18b20 @ 192.168.xx.xx in 2.437s
> [21:07:10][I][app:102]: ESPHome version 2024.3.1 compiled on Apr  2 2024, 21:06:24
> [21:07:10][C][wifi:580]: WiFi:
> [21:07:10][C][wifi:408]:   Local MAC: xx:xx:xx:xx:xx:xx
> [21:07:10][C][wifi:413]:   SSID: 'Livebox-0000'[redacted]
> [21:07:10][C][wifi:416]:   IP Address: 192.168.xx.xx
> [21:07:10][C][wifi:419]:   BSSID: 38:A6:59:53:31:58[redacted]
> [21:07:10][C][wifi:421]:   Hostname: 'hc-sr04p-ds18b20'
> [21:07:10][C][wifi:423]:   Signal strength: -75 dB ▂▄▆█
> [21:07:10][C][wifi:427]:   Channel: 1
> [21:07:10][C][wifi:428]:   Subnet: 255.255.255.0
> [21:07:10][C][wifi:429]:   Gateway: 192.168.1.1
> [21:07:10][C][wifi:430]:   DNS1: 192.168.1.1
> [21:07:10][C][wifi:431]:   DNS2: 0.0.0.0
> [21:07:10][C][logger:166]: Logger:
> [21:07:10][C][logger:167]:   Level: DEBUG
> [21:07:10][C][logger:169]:   Log Baud Rate: 115200
> [21:07:10][C][logger:170]:   Hardware UART: UART0
> [21:07:10][C][dallas.sensor:075]: DallasComponent:
> [21:07:10][C][dallas.sensor:076]:   Pin: GPIO14
> [21:07:10][C][dallas.sensor:077]:   Update Interval: 60.0s
> [21:07:10][D][dallas.sensor:082]:   Found sensors:
> [21:07:10][D][dallas.sensor:084]:     0x853de10457eff228
> [21:07:10][C][dallas.sensor:089]:   Device 'Living Room Temperature'
> [21:07:10][C][dallas.sensor:089]:     Device Class: 'temperature'
> [21:07:10][C][dallas.sensor:089]:     State Class: 'measurement'
> [21:07:10][C][dallas.sensor:089]:     Unit of Measurement: '°C'
> [21:07:10][C][dallas.sensor:089]:     Accuracy Decimals: 1
> [21:07:10][C][dallas.sensor:097]:     Address: 0x853de10457eff228
> [21:07:10][C][dallas.sensor:098]:     Resolution: 12
> [21:07:10][C][ultrasonic.sensor:045]: Ultrasonic Sensor 'Ultrasonic Sensor'
> [21:07:10][C][ultrasonic.sensor:045]:   State Class: 'measurement'
> [21:07:10][C][ultrasonic.sensor:045]:   Unit of Measurement: 'm'
> [21:07:10][C][ultrasonic.sensor:045]:   Accuracy Decimals: 2
> [21:07:10][C][ultrasonic.sensor:045]:   Icon: 'mdi:arrow-expand-vertical'
> [21:07:10][C][ultrasonic.sensor:046]:   Echo Pin: GPIO5
> [21:07:10][C][ultrasonic.sensor:047]:   Trigger Pin: GPIO4
> [21:07:10][C][ultrasonic.sensor:048]:   Pulse time: 10 µs
> [21:07:10][C][ultrasonic.sensor:049]:   Timeout: 11661 µs
> [21:07:10][C][ultrasonic.sensor:050]:   Update Interval: 60.0s
> [21:07:10][C][captive_portal:088]: Captive Portal:
> [21:07:10][C][web_server:169]: Web Server:
> [21:07:10][C][web_server:170]:   Address: hc-sr04p-ds18b20.local:80
> [21:07:10][C][mdns:115]: mDNS:
> [21:07:10][C][mdns:116]:   Hostname: hc-sr04p-ds18b20
> [21:07:10][C][ota:096]: Over-The-Air Updates:
> [21:07:10][C][ota:097]:   Address: hc-sr04p-ds18b20.local:8266
> [21:07:10][C][ota:100]:   Using Password.
> [21:07:10][C][ota:103]:   OTA version: 2.
> [21:07:10][C][api:139]: API Server:
> [21:07:10][C][api:140]:   Address: hc-sr04p-ds18b20.local:6053
> [21:07:10][C][api:142]:   Using noise encryption: YES
> [21:07:42][D][ultrasonic.sensor:036]: 'Ultrasonic Sensor' - Distance measurement timed out!
> [21:07:42][D][sensor:093]: 'Ultrasonic Sensor': Sending state nan m with 2 decimals of accuracy
> [21:07:45][D][dallas.sensor:143]: 'Living Room Temperature': Got Temperature=24.6°C
> [21:07:45][D][sensor:093]: 'Living Room Temperature': Sending state 24.56250 °C with 1 decimals of accuracy
> [21:08:42][D][ultrasonic.sensor:036]: 'Ultrasonic Sensor' - Distance measurement timed out!
> [21:08:42][D][sensor:093]: 'Ultrasonic Sensor': Sending state nan m with 2 decimals of accuracy
> [21:08:45][D][dallas.sensor:143]: 'Living Room Temperature': Got Temperature=24.6°C
> [21:08:45][D][sensor:093]: 'Living Room Temperature': Sending state 24.56250 °C with 1 decimals of accuracy
> [21:09:42][D][ultrasonic.sensor:036]: 'Ultrasonic Sensor' - Distance measurement timed out!
> [21:09:42][D][sensor:093]: 'Ultrasonic Sensor': Sending state nan m with 2 decimals of accuracy
> [21:09:45][D][dallas.sensor:143]: 'Living Room Temperature': Got Temperature=24.6°C
> [21:09:45][D][sensor:093]: 'Living Room Temperature': Sending state 24.62500 °C with 1 decimals of accuracy

And the YAML :

esphome:
  name: hc-sr04p-ds18b20
  friendly_name: Hc-Sr04p_Ds18b20

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="

ota:
  password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Hc-Sr04P-Ds18B20"
    password: "xxxxxxxxxxxxxxxxxxx"

captive_portal:

# Web Server Entry
web_server:
  port: 80
  include_internal: true

dallas:
  - pin: 14

sensor:
  - platform: ultrasonic
    trigger_pin: GPIO4
    echo_pin: GPIO5
    name: "Ultrasonic Sensor"
    update_interval: 60s
  - platform: dallas
    address: 0x853de10457eff228
    name: "Living Room Temperature"

What the problem ?? Grr Grr