Edwin_D
(Edwin D.)
May 20, 2024, 10:58am
754
If it is the wall opposite you can just disable the detection for the furthest gates so it won’t reat to those. Look at the numbers in engineering mode while something moves behind the wall.
ESPHome release 5.0 essentially “bricked” several of my ESP d1mini devices including the ld2410 presence sensors. I have about 10 presence sensors and 7 are apparently unrecoverable (at least I don’t know how). A number of other users have the same problem and there seem to be a number of theories about the cause but I haven’t found any responses from the ESPhome team?
Is there a “fix” coming? Should I toss my bad presence sensors? Start over with ESP32’s? Advice from the experts would be appreciated.
Arh
May 24, 2024, 8:04pm
756
Read this for some tips
opened 09:31AM - 15 May 24 UTC
### The problem
The issue starts to happen after upgrading to ESPHome 2024.5.… 0.
My LD2410 presence sensors are working fine with version 2024.4.2.
The firmware compilation log is attached: [logs_bedroom-presence-sensor_run.txt](https://github.com/esphome/issues/files/15319373/logs_bedroom-presence-sensor_run.txt)
I will try to rollback now and see if i will be able to recover the sensors.
### Which version of ESPHome has the issue?
2024.5.0
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2024.5.3
### What platform are you using?
ESP8266
### Board
D1 Mini (https://www.amazon.de/-/en/gp/product/B0754W6Z2F/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)
### Component causing the issue
_No response_
### Example YAML snippet
```yaml
esphome:
name: kitchen-presence-sensor
friendly_name: Kitchen Presence Sensor
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "key"
ota:
password: "password"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kitchen-Presence-Sensor"
password: "password"
captive_portal:
uart:
id: uart_bus
tx_pin: GPIO01
rx_pin: GPIO03
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
binary_sensor:
- platform: ld2410
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
sensor:
- platform: wifi_signal
name: "WiFi Signal"
id: wifi_signal_sensor
update_interval: 60s
- platform: ld2410
moving_distance:
name : Moving Distance
still_distance:
name: Still Distance
moving_energy:
name: Move Energy
still_energy:
name: Still Energy
detection_distance:
name: Detection Distance
g0:
move_energy:
name: g0 move energy
still_energy:
name: g0 still energy
g1:
move_energy:
name: g1 move energy
still_energy:
name: g1 still energy
g2:
move_energy:
name: g2 move energy
still_energy:
name: g2 still energy
g3:
move_energy:
name: g3 move energy
still_energy:
name: g3 still energy
g4:
move_energy:
name: g4 move energy
still_energy:
name: g4 still energy
g5:
move_energy:
name: g5 move energy
still_energy:
name: g5 still energy
g6:
move_energy:
name: g6 move energy
still_energy:
name: g6 still energy
g7:
move_energy:
name: g7 move energy
still_energy:
name: g7 still energy
g8:
move_energy:
name: g8 move energy
still_energy:
name: g8 still energy
switch:
- platform: ld2410
engineering_mode:
name: "engineering mode"
number:
- platform: ld2410
timeout:
name: timeout
max_move_distance_gate:
name: max move distance gate
max_still_distance_gate:
name: max still distance gate
g0:
move_threshold:
name: g0 move threshold
still_threshold:
name: g0 still threshold
g1:
move_threshold:
name: g1 move threshold
still_threshold:
name: g1 still threshold
g2:
move_threshold:
name: g2 move threshold
still_threshold:
name: g2 still threshold
g3:
move_threshold:
name: g3 move threshold
still_threshold:
name: g3 still threshold
g4:
move_threshold:
name: g4 move threshold
still_threshold:
name: g4 still threshold
g5:
move_threshold:
name: g5 move threshold
still_threshold:
name: g5 still threshold
g6:
move_threshold:
name: g6 move threshold
still_threshold:
name: g6 still threshold
g7:
move_threshold:
name: g7 move threshold
still_threshold:
name: g7 still threshold
g8:
move_threshold:
name: g8 move threshold
still_threshold:
name: g8 still threshold
button:
- platform: ld2410
factory_reset:
name: "factory reset"
restart:
name: "restart"
query_params:
name: query params
- platform: restart
name: "Restart"
text_sensor:
- platform: ld2410
version:
name: "firmware version"
select:
- platform: ld2410
distance_resolution:
name: "distance resolution"
baud_rate:
name: "baud rate"
```
### Anything in the logs that might be useful for us?
```txt
INFO ESPHome 2024.5.0
INFO Reading configuration /config/esphome/kitchen-presence-sensor.yaml...
INFO Starting log output from 10.10.10.154 using esphome API
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
WARNING Can't connect to ESPHome API for kitchen-presence-sensor @ 10.10.10.154: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0). (HandshakeAPIError)
INFO Trying to connect to kitchen-presence-sensor @ 10.10.10.154 in the background
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.007s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
```
### Additional information
_No response_
Reverting to.previous version and unsoldering worked for me.
That also worked for me for a couple devices, but others semingly identical devices simply won’t connect. I have reverted back to previous version and disconnected tx/rx. They show up as on line but cannot install anything. Won’t connect by any method I know.
Arh
May 25, 2024, 6:24am
758
One of mine needed to be setup as new device first, then copy the api and ota password to the original yaml and it flashed fine then, no idea why it was only one device out of 4 though. It took many hours of messing about to get that one back.
Not updating esphome for a while yet that is all I can say.
My D1Mini’s were purchased at various times and places so there could be differences internally. The devices show up in ESPHome as on-line but logs cannot be viewed
(WARNING Can’t connect to ESPHome API for ld2410-12 @ 192.168.86.114: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address=‘192.168.86.114’, port=6053))]: [Errno 111] Connect call failed (‘192.168.86.114’, 6053) (SocketAPIError).
When attempting to reinstall of treat as new devices, these devices will not connect. Removing the TX/RX connections allowed a couple to connect but had no effect on most. Wish those supporting ESPHome would comment on the issue (if the have, I missed it). Just want the right approach to move on…
Arh
May 25, 2024, 1:44pm
760
Yep it would be nice if someone with knowledge of the coding involved in Esphome to comment on the issue. Maybe they have not even seen the issue. Is there a way to make them aware of this, as the issue raised on github seems to have been overlooked.
AJolly
(A Jolly)
May 25, 2024, 4:53pm
761
i’ve been playing with that, but it’d also be useful to be able to enforce the directionality (id buy more and put them in some other locations)
mcarty
(Arturo)
May 25, 2024, 5:40pm
762
They are probably working on it, there is a lot if issues reported.
https://github.com/esphome/esphome/pulls?q=is%3Apr+is%3Aopen+ble
muktheo
(Muktheo)
May 27, 2024, 2:42am
763
for my case using d1 mini,
just disable the wifi serial improve line on uart logger
Mudziej
(Mik)
May 27, 2024, 11:28am
764
Were you able to solve the problem and run ESP32-c6 in 802.15.4 with LD2410?
I am not convinced about the stability of Wifi, even though I have great routers and a mesh network, I think that sharing the network with media devices is not a good idea.
It would be great if HLK-LD2410 worked fully on ZigBee.
mcarty
(Arturo)
May 28, 2024, 1:00pm
765
Is it fixed with Esphome 2024.5.4 ?
opened 09:31AM - 15 May 24 UTC
closed 08:23AM - 28 May 24 UTC
### The problem
The issue starts to happen after upgrading to ESPHome 2024.5.… 0.
My LD2410 presence sensors are working fine with version 2024.4.2.
The firmware compilation log is attached: [logs_bedroom-presence-sensor_run.txt](https://github.com/esphome/issues/files/15319373/logs_bedroom-presence-sensor_run.txt)
I will try to rollback now and see if i will be able to recover the sensors.
### Which version of ESPHome has the issue?
2024.5.0
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2024.5.3
### What platform are you using?
ESP8266
### Board
D1 Mini (https://www.amazon.de/-/en/gp/product/B0754W6Z2F/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)
### Component causing the issue
_No response_
### Example YAML snippet
```yaml
esphome:
name: kitchen-presence-sensor
friendly_name: Kitchen Presence Sensor
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "key"
ota:
password: "password"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kitchen-Presence-Sensor"
password: "password"
captive_portal:
uart:
id: uart_bus
tx_pin: GPIO01
rx_pin: GPIO03
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
binary_sensor:
- platform: ld2410
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
sensor:
- platform: wifi_signal
name: "WiFi Signal"
id: wifi_signal_sensor
update_interval: 60s
- platform: ld2410
moving_distance:
name : Moving Distance
still_distance:
name: Still Distance
moving_energy:
name: Move Energy
still_energy:
name: Still Energy
detection_distance:
name: Detection Distance
g0:
move_energy:
name: g0 move energy
still_energy:
name: g0 still energy
g1:
move_energy:
name: g1 move energy
still_energy:
name: g1 still energy
g2:
move_energy:
name: g2 move energy
still_energy:
name: g2 still energy
g3:
move_energy:
name: g3 move energy
still_energy:
name: g3 still energy
g4:
move_energy:
name: g4 move energy
still_energy:
name: g4 still energy
g5:
move_energy:
name: g5 move energy
still_energy:
name: g5 still energy
g6:
move_energy:
name: g6 move energy
still_energy:
name: g6 still energy
g7:
move_energy:
name: g7 move energy
still_energy:
name: g7 still energy
g8:
move_energy:
name: g8 move energy
still_energy:
name: g8 still energy
switch:
- platform: ld2410
engineering_mode:
name: "engineering mode"
number:
- platform: ld2410
timeout:
name: timeout
max_move_distance_gate:
name: max move distance gate
max_still_distance_gate:
name: max still distance gate
g0:
move_threshold:
name: g0 move threshold
still_threshold:
name: g0 still threshold
g1:
move_threshold:
name: g1 move threshold
still_threshold:
name: g1 still threshold
g2:
move_threshold:
name: g2 move threshold
still_threshold:
name: g2 still threshold
g3:
move_threshold:
name: g3 move threshold
still_threshold:
name: g3 still threshold
g4:
move_threshold:
name: g4 move threshold
still_threshold:
name: g4 still threshold
g5:
move_threshold:
name: g5 move threshold
still_threshold:
name: g5 still threshold
g6:
move_threshold:
name: g6 move threshold
still_threshold:
name: g6 still threshold
g7:
move_threshold:
name: g7 move threshold
still_threshold:
name: g7 still threshold
g8:
move_threshold:
name: g8 move threshold
still_threshold:
name: g8 still threshold
button:
- platform: ld2410
factory_reset:
name: "factory reset"
restart:
name: "restart"
query_params:
name: query params
- platform: restart
name: "Restart"
text_sensor:
- platform: ld2410
version:
name: "firmware version"
select:
- platform: ld2410
distance_resolution:
name: "distance resolution"
baud_rate:
name: "baud rate"
```
### Anything in the logs that might be useful for us?
```txt
INFO ESPHome 2024.5.0
INFO Reading configuration /config/esphome/kitchen-presence-sensor.yaml...
INFO Starting log output from 10.10.10.154 using esphome API
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
WARNING Can't connect to ESPHome API for kitchen-presence-sensor @ 10.10.10.154: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0). (HandshakeAPIError)
INFO Trying to connect to kitchen-presence-sensor @ 10.10.10.154 in the background
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.007s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.003s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.005s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
WARNING kitchen-presence-sensor @ 10.10.10.154: Connection error occurred: kitchen-presence-sensor @ 10.10.10.154: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.5.0).
INFO Successfully connected to kitchen-presence-sensor @ 10.10.10.154 in 0.004s
```
### Additional information
_No response_
I will wait and not update yet unless someone confirms it .
KoKolaj
(zak)
May 28, 2024, 1:26pm
766
It seams issue has been fixed. 2024.5.4
1 Like
djsabo17
(Daniel Sabo)
May 29, 2024, 10:48pm
767
Just received two from AliExpress. Looking forward to playing with them but…there are about 4-5 projects ahead of them lol. I will say, AliExpress seems to be shipping a bit faster lately which is nice. Much better prices than Amazon if you can wait a few more days.
How exactly did you solve this problem? I have the same hardware, the same problem and I can’t just disable logging, it won’t let me:
logger:
baud_rate: 0
This results in:
Failed config
improv_serial: [source /config/esphome/esphome-web-f72157.yaml:28]
improv_serial requires the logger baud_rate to be not 0.
{}
I also tried this:
logger:
baud_rate: 1
and this:
logger:
baud_rate: 115200
level: NONE
These two are valid but I’m still getting energy spikes.
athua
(Gus)
June 15, 2024, 1:23pm
769
Comment out improv_serial and then try it again:
#improv_serial:
1 Like
That was it, many thanks!
1 Like
trying to integrate esphome and ld2410 to iobroker using mqtt similar to this post
but the ld2410 platform sends binary sensor values
binary_sensor:
- platform: ld2410
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
as text values “on” and “off”. How can I convert this to boolean 1/0 ?
athua
(Gus)
June 17, 2024, 12:51am
772
You can try creating a template sensor to return the numeric values.
Add an ID value to the binary sensor:
binary_sensor:
- platform: ld2410
has_target:
name: "Presence"
id: presence
And then add the following sensor:
sensor:
- platform: template
name: Presence-Boolean
lambda: |-
if (id(presence).state) {
return 1;
} else {
return 0;
}
@athua thank you for your reply, I tried it and basically it works but the template sensor is not sending every time new data is provided by the binary sensor. I also tried on a esp32 - but the same thing there. What else can I do?