HLK-LD2450 Initial experiments to connect to HomeAssistant

I have my LD2450 connected via GPIO17 for TX and GPIO16 for RX on a Wemos Compatible D1 Mini ESP32 which is based on the ESP-WROOM-32 chip with no problems.

1 Like

Really nice to meet you, athua.
We’re making a new radar based on the ld1125f and it seems to be working pretty well so far.
If it goes well, we’ll invite you to join the adventure.

We want to call this new radar F25, kind of like an airplane.
The range of this radar is really accurate.
The range is relatively long.

We did a comparison test video earlier https://www.youtube.com/watch?v=zR-0SFeg2ns

In terms of code logic, there should be no problem, just some simple handling of the serial port.
If you have a separate OP, you can test it on your computer alone to make sure the ld2450 is working properly now.
Another way is to feel by hand if it heats up a lot, if it doesn’t then it probably didn’t start.
It’s important to make sure the ld2450 is working.

1 Like

after some test, it seems have some bad logic at boot.
now i see what you mean.

We applied your thinking, but made an additional judgment call that proved to work well.
We’ve also synchronized it to the community code.

At the same time, we additionally dealt with a delay at startup that caused the state not to be initialized (display unknown).

Please refer to the changes in details as it is not good to copy and paste:

Thanks for the work, I found the time today and merged your angle and position direction code with some minor tweaks.
It seems to be working pretty well at the moment and we merged it into the public version of the firmware at the same time:

This is the community version of the merged and tweaked part of the code:

demo: 2A new feature: shows the angle, direction, position of the target. - YouTube

1 Like

Understand. Thank you! Still, I think it will work better on ESP 32.

Yes, I checked the sensor on a PC via USB, it works. But it heats up when connected, including to the board. I managed to catch the values for a while, but they rarely appear and are almost always absent. I still think that ESP8266 is a data processing weakness.

The esp32, a dual-core processor, is really powerful, but the 8266 is quite not weak either.

good luck with esp32.

1 Like

There is any development for a card with graphical representation of room, position of the ld2450, zones and targets?
I started to build one but with my actual knowledge I had to define some template sensors and then to play in a picture-elements with style + card-mod and here I saw some limitations on parametric positioning.

1 Like

Using the latest stable yaml,

Interference:
Tested on the living room, i don’t even have to enable zout since it doesn’t detect my ceiling fan or ac as before.

Static detection:
I’m getting better results when I’m sitting down. But not much if I’m lying down/sleep. Just wondering how it’s working for others

1 Like

In my opinion, this is a really great idea and at the very beginning we were eager to implement this. But due to time constraints and the fact that the js language is not our specialty, I can only say that it’s a shame.
This would have made ha much richer if it was coupled with a visualization to understand what’s going on in the room, and it also reflects the character of this radar.

I think your attempt is great! Looking forward to being able to test it all together!

I’m afraid not, based on the feedback we’ve gathered and our own attempts, the LD2450 seems to have some special judgment about human shapes, which makes it somewhat more resistant to interference, but at the same time, it can’t deal with situations like lying down.

We’ve been testing some new radars lately, like the ld1125f, and I think it seems to have very good micromotion capabilities.
I hope to have a chance to share it with you soon.
For the time being, it seems that the only thing that can be done is to try to compensate the ld2450 for some special areas.

I have managed to put together a card plotting the target positions and zones. I initially tried using Apex Charts but the implementation in HA doesn’t seem to allow you to use anything but time for the X-Axis. After looking into other options, I found Plotly Graph Card in HACS and that did the trick.

Here is the card config that I got working. You should just need to change the names of the sensors to match your own setup:

type: custom:plotly-graph
title: Target Positions
refresh_interval: 1
hours_to_show: current_day
layout:
  xaxis:
    type: number
    showlegend: true
    fixedrange: true
    range:
      - -4000
      - 4000
  yaxis:
    fixedrange: true
    range:
      - 0
      - 6000
entities:
  - entity: ''
    name: Target1
    marker:
      size: 15
    line:
      shape: spline
      width: 5
    x:
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target1_x"].state
    'y':
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target1_y"].state
  - entity: ''
    name: Target2
    marker:
      size: 15
    line:
      shape: spline
      width: 5
    x:
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target2_x"].state
    'y':
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target2_y"].state
  - entity: ''
    name: Target3
    marker:
      size: 15
    line:
      shape: spline
      width: 5
    x:
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target3_x"].state
    'y':
      - $ex hass.states["sensor.screek_human_sensor_2a_734e6c_target3_y"].state
  - entity: ''
    name: Zone1
    mode: lines
    line:
      shape: line
      width: 2
    x:
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_x_begin"].state
    'y':
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone1_y_begin"].state
  - entity: ''
    name: Zone2
    mode: lines
    line:
      shape: line
      width: 2
    x:
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_x_begin"].state
    'y':
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone2_y_begin"].state
  - entity: ''
    name: Zone3
    mode: lines
    line:
      shape: line
      width: 2
    x:
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_x_begin"].state
    'y':
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zone3_y_begin"].state
  - entity: ''
    name: Exclusion Zone
    mode: lines
    line:
      shape: line
      width: 2
    x:
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_x_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_x_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_x_begin"].state
    'y':
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_y_end"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_y_begin"].state
      - >-
        $ex
        hass.states["number.screek_human_sensor_2a_734e6c_zout1_y_begin"].state
raw_plotly_config: true

4 Likes

Great work!
I’ll try the plotly-graph integration.

Hi All, has anyone had an issue with not getting any data displayed in the Hi-Link app?

Has anyone had luck using the IOS app? I can’t get past the firmware update screen. And that keeps timing out when I try to update the firmware. Thanks

IOS app works with LD2450.

Thanks, Is the app only for updating the firmware? Or does it let you see data from the LD2450?

Currently for the LD2450, the app can only update the firmware.
The same app however can fully configure the LD2410, so hopefully HiLink will eventually open up the app to all the settings and data for the LD2450 as well.

1 Like