Video version of the article:
When I saw the first reviews of mmWave sensors, I was fascinated by the idea of creating illumination in specific zones in rooms based on the person's location. So, after searching for a sensor, I came across the Hi-Link LD2450, which allows tracking presence, movement speed, and coordinates of up to three persons in a room. The sensor has Bluetooth, and you can connect to it through a mobile app for firmware updates or checking functionality.
Upon receiving the sensors, I designed a simple enclosure that allowed installing the sensor in the corner of a room.
At the time of the article release, there was no official ESPHome library release for working with this sensor. Therefore, I created a custom external component. In addition to the UART communication protocol with the sensor, I also added functions that were necessary for me. The sensor returns coordinates of persons relative to itself, and to make it convenient to use in automation rules, I added coordinate rotation (if the sensor is in a corner) and software detection zones (because the sensor has a limitation of three zones and can use either detection or ignore zones but not both).
Next, you need to solder the power and UART between the sensor and the controller. Be careful because the wire color in the supplied connector may have non-standard coloring, so carefully check the pinout on the sensor.
Once the firmware is uploaded to the controller, and the sensor is assembled in the enclosure, it can be installed and configured.
To complete the setup, set the coordinate rotation and configure ignore zones for the sensor. Then, using the new (rotated) coordinates, set up software detection zones, there can be as many as needed (I currently use 5). Also, in the door coordinates, set entry points so that the presence detection delay only works when a person leaves the room and not when the sensor accidentally loses the target.
That's it, now you can use zone-based presence detection.
Comments