Esp32-wroom-d1 & ld2420

Moin.
Ich versuche seit Stunden, den LD2420 mit meinem ESP32-WROOM-D1 Board zum laufen zu bekommen. Leider Fehlanzeige. Leider kann ich nichtmal auslesen, welche Firmware Version es ist, daher muss ich mit jedem Schritt alle Variationen testen. Vielleicht hat ja jemand von Euch Ahnung, oder vielleicht sogar diese Konfig am Start.

Das ist meine YAML:

substitutions:
  mqttPrefix: "esphome"
  moduleType: "presence"
  location: "bathroom"

esphome:
  name: ${moduleType}-${location}
  friendly_name: ${moduleType}-${location}

esp32:
  board: wemos_d1_mini32
  framework:
    type: arduino

# Enable logging
logger:
  #baud_rate: 0

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  

uart:
  rx_pin: GPIO09
  tx_pin: GPIO10
  baud_rate: 115200 # Baud rate for LD2420
  #baud_rate: 256000
  data_bits: 8
  stop_bits: 1
  parity: NONE


# Configure LD2420

# Example configuration entry
ld2420:

text_sensor:
  - platform: ld2420
    fw_version:
      name: LD2420 Firmware

sensor:
  - platform: ld2420
    moving_distance:
      name : Moving Distance

binary_sensor:
  - platform: ld2420
    has_target:
      name: Presence

select:
  - platform: ld2420
    operating_mode:
      name: Operating Mode

number:
  - platform: ld2420
    presence_timeout:
      name: Detection Presence Timeout
    min_gate_distance:
      name: Detection Gate Minimum
    max_gate_distance:
      name: Detection Gate Maximum
    # See "Number" section below for detail
    gate_select:
      name: Select Gate to Set
    still_threshold:
      name: Set Still Threshold Value
    move_threshold:
      name: Set Move Threshold Value

button:
  - platform: ld2420
    apply_config:
      name: Apply Config
    factory_reset:
      name: Factory Reset
    restart_module:
      name: Restart Module
    revert_config:
      name: Undo Edits

Je nach PIN Config bekomme ich BootLoops, oder:

[22:12:58][C][ld2420:068]: LD2420:
[22:12:58][C][ld2420:069]:   Firmware Version :  v0.0.0
[22:12:58][C][ld2420:070]: LD2420 Number:
[22:12:58][C][ld2420:072]: ld2420  Gate Timeout: 'Detection Presence Timeout'
[22:12:58][C][ld2420:072]: ld2420  Icon: 'mdi:timelapse'
[22:12:58][C][ld2420:072]: ld2420  Unit of Measurement: 's'
[22:12:58][C][ld2420:073]: ld2420  Gate Max Distance: 'Detection Gate Maximum'
[22:12:58][C][ld2420:073]: ld2420  Icon: 'mdi:motion-sensor'
[22:12:58][C][ld2420:073]: ld2420  Device Class: 'distance'
[22:12:58][C][ld2420:074]: ld2420  Gate Min Distance: 'Detection Gate Minimum'
[22:12:58][C][ld2420:074]: ld2420  Icon: 'mdi:motion-sensor'
[22:12:58][C][ld2420:074]: ld2420  Device Class: 'distance'
[22:12:58][C][ld2420:075]: ld2420  Gate Select: 'Select Gate to Set'
[22:12:58][C][ld2420:075]: ld2420  Icon: 'mdi:motion-sensor'
[22:12:58][C][ld2420:075]: ld2420  Device Class: 'distance'
[22:12:58][C][ld2420:077]: ld2420  Gate Move Threshold: 'Set Move Threshold Value'
[22:12:58][C][ld2420:077]: ld2420  Icon: 'mdi:motion-sensor'
[22:12:58][C][ld2420:078]: ld2420  Gate Still Threshold:: 'Set Still Threshold Value'
[22:12:58][C][ld2420:078]: ld2420  Icon: 'mdi:motion-sensor'
[22:12:58][C][ld2420:082]: ld2420  Apply Config: 'Apply Config'
[22:12:58][C][ld2420:082]: ld2420  Icon: 'mdi:restart-alert'
[22:12:58][C][ld2420:083]: ld2420  Revert Edits: 'Undo Edits'
[22:12:58][C][ld2420:083]: ld2420  Icon: 'mdi:restart'
[22:12:58][C][ld2420:084]: ld2420  Factory Reset: 'Factory Reset'
[22:12:58][C][ld2420:084]: ld2420  Icon: 'mdi:database'
[22:12:58][C][ld2420:085]: ld2420  Restart Module: 'Restart Module'
[22:12:58][C][ld2420:085]: ld2420  Icon: 'mdi:database'
[22:12:58][C][ld2420:087]: LD2420 Select:
[22:12:58][C][ld2420:088]: ld2420  Operating Mode 'Operating Mode'
[22:12:58][W][ld2420:090]: LD2420 Firmware Version v0.0.0 and older are only supported in Simple Mode
[22:12:58][E][component:082]:   Component ld2420 is marked FAILED

Weiss jemand Rat?

Gruss
Mike

Das waren meine UART Einstellungen für einen D1 Mini (ESP8266) und einen ld2410:

uart:
  id: uart_terasse1
  tx_pin: TX  # TX tx_pin: GPIO1 - Alternativ: GPIO15  #D8  
  rx_pin: RX  # RX rx_pin: GPIO3 Alternativ: GPIO13  #D7
  baud_rate: 256000   # 2400, 9600, 38400, 57600, 115200, 256000, 512000, 921600
  parity: NONE
  stop_bits: 1

Soweit mir bekannt gibt es für den D1 Mini nur zwei funktionierende UART Pin-Kombinationen
GPIO1 und GPIO3 oder GPIO15 und GPIO13.

Mit dem Logger zusammen hat es nicht funktioniert. Ich musste den Logger mit

# Disable logger to run UART on D7 D8
logger:
  baud_rate: 0
  level: DEBUG

deaktivieren.

Danke für Deine Antwort. Mir geht es glaube ich speziell um die GPIO des D1 ESP32. 13 & 15 sind bei mir keine UART Pins.

Wenn ich UART0 nutze (GPIO1 und GPIO3) kann ich garnicht erst flashen.
Wenn ich UART1 nutze (GPIO09 und GPIO10) bekomme ich einen Boot-Loop

Mehr UART kann ich im Pinout nicht finden.

Habe das Problem gelöst und GPIO16 & 17 genutzt (leider sind diese im Pinout nicht als UART ausgeworfen).

Naja, jetzt läuft es!

ESP32-WROOM-D1 mini & LD2420

uart:
  rx_pin: GPIO16
  tx_pin: GPIO17
  baud_rate: 115200
  data_bits: 8
  stop_bits: 1
  parity: NONE

Aha, du verwendest einen ESP32 basierten D1 Mini und ich den alten ESP8266 basierten.

Laut PINOUT für den ESP32 basierten D1 sind GPIO16 und GPIO17 tatsächlich UART Pins.