Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect more than one person #9

Closed
DeveshwarH1996 opened this issue May 7, 2024 · 3 comments
Closed

Unable to detect more than one person #9

DeveshwarH1996 opened this issue May 7, 2024 · 3 comments

Comments

@DeveshwarH1996
Copy link

DeveshwarH1996 commented May 7, 2024

Only detects 1 person in the room even when there are multiple people in the room

esphome:
  name: pico-ld2450-01
  friendly_name: pico_ld2450_01

rp2040:
  board: rpipicow
  framework:
    # Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged
    platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "encryption_key"

ota:
  password: "ota_password"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot in case wifi connection fails
  ap:
    ssid: "Pico-Ld2450-01 Fallback Hotspot"
    password: "WZV4JdKzKoNk"

external_components:
  - source:
      type: git
      url: https://github.com/uncle-yura/esphome-ld2450
      ref: master
    components: [ ld2450 ]

uart:
  id: uart_bus
  tx_pin:
    number: GPIO16
  rx_pin:
    number: GPIO17
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2450:
  uart_id: uart_bus
  update_interval: 1s
  invert_y: false
  invert_x: false

binary_sensor:
- platform: ld2450
  has_target:
    name: Presence
  has_moving_target:
    name: Moving Target
  has_still_target:
    name: Still Target
  presence_regions:
    - name: "Custom Presence Region 0"
      region_id: presence_region_0

text_sensor:
  - platform: ld2450
    version:
      name: "FW"
    mac_address:
      name: "MAC address"

button:
  - platform: restart
    name: "ESP Restart"
  - platform: ld2450
    factory_reset:
      name: "Factory reset"
    reboot:
      name: "Reboot"

switch:
  - platform: ld2450
    single_target:
      name: "Single target"
    bluetooth:
      name: "Bluetooth"

number:
- platform: ld2450
  rotate:
    restore_value: true
    initial_value: 0
    name: "Rotate angle"
  presence_timeout:
    name: "Presence timeout"
  presence_regions:
    - x0: 100
      y0: 100
      x1: 200
      y1: 200
      id: presence_region_0
  entry_points:
    - x: 0
      y: 0
  region_0:
    x0:
      name: R0X0
    y0:
      name: R0Y0
    x1:
      name: R0X1
    y1:
      name: R0Y1

  region_1:
    x0:
      name: R1X0
    y0:
      name: R1Y0
    x1:
      name: R1X1
    y1:
      name: R1Y1

  region_2:
    x0:
      name: R2X0
    y0:
      name: R2Y0
    x1:
      name: R2X1
    y1:
      name: R2Y1

select:
  - platform: ld2450
    baud_rate:
      name: "Baud rate"
    regions_type:
      name: "Regions type"

sensor:
- platform: ld2450
  target_count:
    name: Target count

  person_0:
    position_x:
      name: "P0X"  

    position_y:
      name: "P0Y"  

    speed:
      name: "S0"  

    resolution:
      name: "R0"  

  person_1:
    position_x:
      name: "P1X"  

    position_y:
      name: "P1Y"  

    speed:
      name: "S1"  

    resolution:
      name: "R1"  

  person_2:
    position_x:
      name: "P2X"  

    position_y:
      name: "P2Y"  

    speed:
      name: "S2"  

    resolution:
      name: "R2"
@uncle-yura
Copy link
Owner

You can check if the "single target" switch is off and/or check the sensor configuration via bluetooth using the app.
I can also say that this sensor is far from ideal, it can:

  1. Combine several targets into one if they are close enough
  2. Lose targets if they are not moving
  3. Lose targets if they are on the edge of the detection zone, or if there are metal obstacles

@DeveshwarH1996
Copy link
Author

I was looking through other comments you had made on the home assistant community page, I believe I had the wrong orientation for the sensor which was preventing it from recognizing the targets. It is working fine, now that I have made it vertical

@DeveshwarH1996
Copy link
Author

Thanks for your all the work you put into making this repository and being so responsive to user issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants