[Custom Integration] HiLink LD2450 Presence Sensor - Full BLE

Home Assistant has an official integration for Hi-Link LD2410 distance sensor over Bluetooth (LD2410 BLE - Home Assistant)

This is based on a python class managing sensor connection and data (GitHub - 930913/ld2410-ble: Interface with LD2410B modules from HiLink)

The newer LD2450 also publishes data over bluetooth, however its protocol is totally different from the LD2410 one, so i modified the python class and the integration code to manage it.

Eventually, it works

The sensor only outputs coordinates of up to three targets and their speed, but those are not much useful so a big part of the available sensors in HA are calculated (distance, angle, moving, presence…)

The integration It is working both for the sensor part and for the control part. All over BT.

For what concerns sensors:

  • for each target (up to 3) the integration exposes a specific binary sensor so you can know how many targets are present
  • there is also a generic binary sensor for “someone” presence
  • for each target the integration calculates distance and angle. Original sensor values (coordinates of targets) are present, but normally hidden

For what concerns sensor control the integration exposes:

  • reboot
  • single target vs multi target
  • area mode (disabled, detect only, ignore in)
  • configuration of coordinates for the 2 points of each of the three supported areas.

Bonus: a 3d model for a sensor’s case (yes, i was getting bored :smiley: )


Just put the code in the custom integration folder.
Link to repo:

4 Likes

Very good. I wonder if you should make it installable via HACS? (I know you have done a lot of work already)

very nice. please someone put this in hacs

oh well

  • i have no idea where to start from :slight_smile:
  • i’m quite scared of being the official maintainer of a package (i just have some spare time now and then to code, i DO NOT code for living :))
1 Like

question for the makers out there :slight_smile: any better idea for the support connection of the 3d model?
i printed it in pla and it tends to relax after some days giving no more solid block of the sensor
I could add another arm to the support, but i’m quite sure i’m just gaining some more time and not solving the issue

Hello MassiPi, I am currently testing this sensor and would like to try your integration over BT but I need a little help:

  1. Just put the code in the custom integration folder:
    In my case, I have a “custom_ components” folder, is this the right one??
  2. Do I put the entire folder as in this picture or just some of the files ??

  1. how to I “Link to repo” ??

Can you help?

Thank you.

Pierre

hello,

  1. yes, it’s custom_components.
  2. You create a ld2450_ble folder with inside all the files listed
  3. what do you mean?

Sadly, somewhere in last months something in HA updates broke bluetooth discovery (also for official LD2410_ble integration) and afaik it hasn’t been fixed yet (i’m not using my ld2450 sensor atm)

Great, thanks for your help.

@MassiPi is it possible/practical to run the ld2450 on battery?

with an average consumption of 120 mA you are gonna use a big battery :slight_smile:

That’s a shame, but thanks for putting me out of my misery.