HLK-LD2450 Initial experiments to connect to HomeAssistant

Do you have the X-Begin, X-End, Y-Begin and Y-End value set correctly?
You can try walking to either side of the fan and check the Target 1 X values and note what the values are on the left of the fan and then on the right and that would be your Zout1 X-Begin and Zout1 X-End values.
Then walk in front of the fan and then behind it and note the ‘Target 1 Y’ values and set those as your Zout1 Y-Begin and Zout1 Y-End values. Then try toggling the ‘Zout1 Enable’ off and then back on.


                    | LD2450 |
                    +--------+

                        ~~~          <=  Value of Zout1 Y-Begin
                      { FAN }
                        ~~~          <= Value of Zout1 Y-End

                     ^       ^ 
                     |       |
Value of Zout1 X-Begin     Value of Zout1 X-End
1 Like

I didn’t test the zout function, but you need to put the X and Y bigger, your fan is being detected at -1754 and 1235, so you need to test at least something around -1800 and 1300.

@screek-workshop

I have reverted the FW to 1.2 and targets 2 and 3 are working.
Consider setting the Y settings to 0 instead of -6000, as y is never negative. And maybe the X -3000 and 3000, although I haven’t tested the maximum value received. This can confuse your customers.

  - platform: template
    name: Zone1 X-Begin
    id: zone1_x_begin
    min_value: -3000
    max_value: 3000

  - platform: template
    name: Zone1 X-End
    id: zone1_x_end
    mode: box
    min_value: 0
    max_value: 6000

Thanks

1 Like

Hello, I have used your latest configuration, but the radar sensor has a false death phenomenon, that is, the value is not updated, or it is updated only after a long time. Do you have this kind of problem?

Hello, I tried to set it up many times, but Zout1 doesn’t seem to respond? Have you tried both 1.22 and 1.23 versions of firmware invalid?

It is possible to set the esphome’s internal pull-ups to enhance stability, and in our observations and 2450 use of versions 1.2 and above have solved the problem that the output will detect levels.

The inputs for regions can be a bit convoluted, especially when they’re negative, and I think we should improve the experience.

Looking at the inputs here, it’s an impossible input to tell because -100 is going to be greater than -1400, which is a bit counter-intuitive, but how about you try it the other way around.

I’ll look into and improve the situation, those invalid inputs do make everything more of a hassle. Thanks for the suggestion.

From the pictures it looks like target 3 has a probe target. Use version 1.2 of the ld2450’s firmware if possible, 1.3 has some unpredictable behavior and it’s a beta.

Try revert x-begin and x-end, x start must always be less than x end, where 0 is greater than any negative number.

We need to improve this experience, sorry for these math troubles.

I’m trying to make some changes to your code and I think this part is wrong, since X can be negative:

          bool p1_vaild = (p1_x > 0 || p1_y > 0);
          bool p2_vaild = (p2_x > 0 || p2_y > 0);
          bool p3_vaild = (p3_x > 0 || p3_y > 0);

Should be:

          bool p1_vaild = (p1_x != 0 || p1_y > 0);
          bool p2_vaild = (p2_x != 0 || p2_y > 0);
          bool p3_vaild = (p3_x != 0 || p3_y > 0);
2 Likes

This looks like a negative number related bug, we’ll update and address this. Thanks!

Thanks, I tried standing on the 4 corner position below the ceiling fan.
But the X coordinate keeps fluctuating from negative to +500 which makes it difficult to get an accurate reading.

I tried adding -1800 and 1300 but no improvement yet.
I’ll test again with something smaller like stand fan.

Was Zout working before this?

Could you provide an example based on my fan position (-1754 & 1235)?

Here is my room layout:

________________________________________
                  | LD2450 |
                  +--------+

  Dining            ____        Kitchen(2)
  Room(1)          |_EX_|
_____________         __________________
             |      |
             |Hall  |
             |Way(3)|
   

And these are what I have setup for the Zones and it is working for me. When I walk around, each zone detects me including the Zout1 zone (EX) which I setup as a test. When I move into the Zout1 zone, ‘Zout1 Presence’ is detected but ‘Any Presence’ turns clear. When I move out of that zone to any of the other Zones, ‘Any Presence’ is detected.


LD2450-Exclusion-Config

I’m also on one of the newer beta firmware (V230818_2_BETA) from SCreek.
It might be worth updating to the latest firmware from Screek as I noticed this in the change logs:

1 Like

Do you mind testing that exclusion area with a stand fan or something with constant movement?

We’ve incorporated two of your very good suggestions into the new code, and for the first point, the second point noted in there is X-END, which is limited to -3000 to 3000.

Both the open source firmware and the public firmware synchronize these code changes.
Thank you very much! This will allow the negative region to work better.

To make it easier for you to check the validity of the coordinates, especially in the case of negative numbers that violate the intuitive sense of size. We have added a quick check.

2A public firmware new feature: assisted checking after inputting area coordinates

If you only leave the fan on in the room and it has very large oscillations, you will have to increase the exclusion area. For me it’s how the sensor works. Unless there is an update from hi-link.

An mmWave sensor that can track multiple targets is quite an interesting device to have at home!
I’m curious though if besides the location information it would also be possible with this sensor to read the sensitivity / magnitude of motion and set thresholds on them much like what’s possibe for the LD2410.

I’m planning to start using mmWave sensors in a room that is often also occupied by cats, and hope to be able to make the distinction between human and pet motion based on such sensitivity information.

I placed a stand fan in the Zout1 zone and when it was on and no one was in the other zones, it was detected in the Zout1 zone and ‘Any Presence’ was clear. Once I entered one of the other zones (1,2 or 3) my presence in those zones were detected and Zout1 presence becomes clear.
What I did notice that if the LD2450 detects something outside of Zone 1,2 or 3, ‘Any Presence’ is set to detected but none of the Zones shows any presence.
So maybe there is something outside your Zone config that is being detected and causing ‘Any Presence’ to be detected. Is the fan blowing something elsewhere causing it to move and be detected?

1 Like