ESPHome update and uart2

I’ve got an LD2410 radar sensor wired to pins 16 and 17 (uart 2) of an ESP32. that has worked without problems until the 2023.4.0 update of ESPHome. When I try to update the board I get this error:

INFO Reading configuration /config/esphome/airqualitymonitor.yaml...
Failed config

uart: [source /config/esphome/airqualitymonitor.yaml:65]
  - 
    ID 'uart2' is reserved internally and cannot be used.
    id: uart2
    tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 256000
    parity: NONE
    stop_bits: 1

The board is still working fine with uart2 without the update, but I will need to edit the yaml. Did the update break access to uart2, and can this be fixed without re-wiring? Thanks.

1 Like

2023.4.0 release notes say uart1, uart2 or uart3 can’t be used as ids any longer.

UART ids

Due to uart0 / uart1 / uart2 being defined in some of the platform code ESPHome uses, ESPHome will now disallow these ids from being used in the config. You can simply change them to uart_0 to continue using.

2 Likes

You need to read the release notes.

Edit: Posted same time as mulcmu.

1 Like

I also learned hard way: ALWAYS read release notes in detail BEFORE updating! And even so i managed to miss things (like SQL - database changes - twice!) . There’s always link to release notes in update window. Don’t ignore it.
Just blindly clicking on “update” it’s just asking for problems.

Very good advice. Thanks, all.

I have also LD2410 radar sensor, works fine before the latest update of ESP. But now I have issue with “sensor” still energy. Showing only 0-1% instead of 0-100%. Any suggestion? (moving energy is not affected)

EDIT - FW update of LD2410 solve it

yes! uart_0 work for update and working! Thank’s

How do you update FW in LD2410 ?

Thru the mobile application


Thanks. And where to download this application? I can not find :frowning:

1 Like

Where did you get the english version from? Or where to change the language? I have chinese characters:

You must put your phone’s language to english, it’s the only way to have app in english.

1 Like

Or follow the gif for fw update :slight_smile: 2023-04-25_16_57_39

Any idea why I’m not able to see LD2410 connected to ESP in the app? It’s BT version. I changed ESP config and after that it’s not working in HA any more, so I decided to update FW, but app doesn’t detect the LD2410…

I had to try many times to make the FW update take in the app (like dozens). I found it worked better on my android tablet than on my phone. Restart the app and power up/down the LD repeatedly; that might work.

I’m grateful to the folks that spend their time creating solutions like ESPHome but it must be a disconnect in how SA’s like me think vs ‘Developers’ cause I saw this change in the release notes but had no idea how to resolve it until I found this thread. Changing from ‘uart0’ to ‘uart_0’ seems like such a simple note to add to the release notes or the reference link for completeness. The only reason I had used ‘uart0’ in my configs is other ESPHome documentation used that.

2 Likes

In my ESPhome yaml i have these gate values:

ld2410:
  timeout: 150s
  max_move_distance : 6m
  max_still_distance: 6m
  g0_move_threshold: 60
  g1_move_threshold: 60
  g2_move_threshold: 40
  g3_move_threshold: 40
  g4_move_threshold: 40
  g5_move_threshold: 40
  g6_move_threshold: 40
  g7_move_threshold: 40
  g8_move_threshold: 40
  g0_still_threshold: 30
  g1_still_threshold: 30
  g2_still_threshold: 30
  g3_still_threshold: 30
  g4_still_threshold: 30
  g5_still_threshold: 30
  g6_still_threshold: 30
  g7_still_threshold: 30
  g8_still_threshold: 30

but in the HLK app the gate values will be whatever I set there; that is, the two won’t sync. Which values will the LD2410 use?