LD2411S - The LD2410 (better) succesor

I would print front plate as thin as possible and place sensor as close as possible to front plastic - microwave can somewhat reflect from plastic, although not much, but enough to make havoc…
Ideally front of the sensor would be exposed, but it’s not practical (dust,insects…)

Left a 2410 outside in the sun and rain enveloped in a tape like this. Should work great as a front plate. Don’t have a 3d printer yet.

1 Like

Could you share the yaml for this card? I’m looking for something to make the configuration of the sensor easier. Right now I see presence detected sometimes but I have to check all the gates to find out which of them triggered the sensor.

Hi Chreece,
Many thank for your shared work.
I tried but it seems not to work correctly. The sensor (presence) is “unknown” state although I tried different board (Wemos mini D1 and CH9102X (ESP-32 based).
Below is my actual config:

  # Change device name to match your desired name
  device_name: "2411s"
  # Change sensor name below to the one you want to be exposed in Home Assistant
  device_name_pretty: LD2411S Test
  # UART TX Pin
  uart_tx_pin: GPIO21
  # UART RX Pin
  uart_rx_pin: GPIO22

esp32:
  board: nodemcu-32s
  framework:
    type: arduino
esphome:
#  name: 2411s
#  friendly_name: 2411S
  name: $device_name
  includes:
    - LD2411s.h
#  platformio_options:
#    board_upload.flash_size: 4MB
  on_boot:
    priority: 250
    then:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0x73, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
#esphome:
#  name: 2411s
#  friendly_name: 2411S

#esp32:
#  board: esp32dev
#  framework:
#    type: arduino


# Enable Home Assistant API
api:
  encryption:
    key: "/nS+vVV3TbfITHAWd40Kp9hsaMdHVHj29774mQoUFf4="

ota:
  password: "c2455532eff013ec3f2e2b9ed94d7397"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "2411S Fallback Hotspot"
    password: "iQdCbSTOBry3"

captive_portal:

# Enable logging
logger:
  logs:
    sensor: INFO # reduced logging to minimize web_server target overload..

web_server:
  port: 80
  version: 2
  include_internal: true

http_request:
  useragent: esphome/$device_name
  timeout: 2s
  
uart:
  id: uart_bus
  tx_pin: ${uart_tx_pin}
  rx_pin: ${uart_rx_pin}
  baud_rate: 115200 #256000
  parity: NONE
  stop_bits: 1

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new UARTSensor(id(uart_bus)); 
      App.register_component(my_sensor);
      return {my_sensor->distance_sensor, my_sensor->presence_sensor, my_sensor->motion_sensor, my_sensor->max_motion_sensor, my_sensor->min_motion_sensor, my_sensor->max_presence_sensor, my_sensor->min_presence_sensor, my_sensor->unocc_time_sensor};
    sensors:
      - name: "${device_name} Distance"
        state_class: measurement
        id: distance_sensor
        unit_of_measurement: cm
      - id: presence_sensor
        name: "internal_presense_sensor_to_binary_template"
        internal: true
        on_value:
          - binary_sensor.template.publish:
              id: presence_template
              state: !lambda return x > 0;
      - id: motion_sensor
        name: "internal_motion_sensor_to_binary_template"
        internal: true
        on_value:
          - binary_sensor.template.publish:
              id: motion_template
              state: !lambda return x > 0;
      - name: "internal_max_motion"
        id: max_motion_sensor
        internal: true
        on_value:
          - number.set:
              id: maxmotion
              value: !lambda return x;
      - name: "internal_min_motion"
        id: min_motion_sensor
        internal: true
        on_value:
          - number.set:
              id: minmotion
              value: !lambda return x;
      - name: "internal_max_presence"
        id: max_presence_sensor
        internal: true
        on_value:
          - number.set:
              id: maxpresence
              value: !lambda return x;
      - name: "internal_min_presence"
        id: min_presence_sensor
        internal: true
        on_value:
          - number.set:
              id: minpresence
              value: !lambda return x;
      - name: "internal_unocc"
        id: unocc_time_sensor
        internal: true
        on_value:
          - number.set:
              id: unocc_time
              value: !lambda return x;

number:
  - platform: template
    name: "${device_name} Min Motion Distance"
    id: minmotion
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 717
    step: 1
  - platform: template
    name: "${device_name} Max Motion Distance"
    id: maxmotion
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 717
    step: 1
  - platform: template
    name: "${device_name} Min Presence Distance"
    id: minpresence
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 425
    step: 1
  - platform: template
    name: "${device_name} Max Presence Distance"
    id: maxpresence
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 425
    step: 1
  - platform: template
    name: "${device_name} Unoccupied Time"
    id: unocc_time
    optimistic: true
    unit_of_measurement: sec
    min_value: 0
    max_value: 6553
    step: 1

binary_sensor:
  - platform: template
    id: presence_template
    name: "${device_name} Presence"
    device_class: occupancy
    filters:
      - delayed_off: 5s
  - platform: template
    id: motion_template
    name: "${device_name} Motion"
    device_class: motion
    filters:
      - delayed_off: 5s

switch:
  - platform: template
    name: "${device_name} Bluetooth"
    id: human_switch
    optimistic: true
    restore_mode: "RESTORE_DEFAULT_ON"
    turn_on_action:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xA4, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
    turn_off_action:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]

button:
  - platform: restart
    name: "Restart MCU: ${device_name}"
    entity_category: diagnostic
    on_press:
      - uart.write:
          id: uart_bus
          data: "resetSystem 0"
  - platform: template
    name: "${device_name} Reboot Module"
    id: reboot_module
    entity_category: diagnostic
    on_press:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
  - platform: template
    name: "${device_name} Factory Reset"
    id: reset_module
    entity_category: diagnostic
    on_press:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA2, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
  - platform: template
    name: "${device_name} Set Parameter"
    id: param_set
    entity_category: diagnostic
    on_press:
      - script.execute: statepublish

script:
  - id: statepublish
    then:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write:
          id: uart_bus 
          data: !lambda
                  int minmot = id(minmotion).state;
                  int maxmot = id(maxmotion).state;
                  int minpr = id(minpresence).state;
                  int maxpr = id(maxpresence).state;
                  int unocctm = id(unocc_time).state;
                  uint16_t minmvalue = static_cast<uint16_t>(minmot);
                  uint8_t minmhighByte = static_cast<uint8_t>(minmvalue >> 8);
                  uint8_t minmlowByte = static_cast<uint8_t>(minmvalue & 0xFF);
                  uint16_t maxmvalue = static_cast<uint16_t>(maxmot);
                  uint8_t maxmhighByte = static_cast<uint8_t>(maxmvalue >> 8);
                  uint8_t maxmlowByte = static_cast<uint8_t>(maxmvalue & 0xFF);
                  uint16_t minpvalue = static_cast<uint16_t>(minpr);
                  uint8_t minphighByte = static_cast<uint8_t>(minpvalue >> 8);
                  uint8_t minplowByte = static_cast<uint8_t>(minpvalue & 0xFF);
                  uint16_t maxpvalue = static_cast<uint16_t>(maxpr);
                  uint8_t maxphighByte = static_cast<uint8_t>(maxpvalue >> 8);
                  uint8_t maxplowByte = static_cast<uint8_t>(maxpvalue & 0xFF);
                  uint16_t unoccvalue = static_cast<uint16_t>(unocctm * 10);
                  uint8_t unocchighByte = static_cast<uint8_t>(unoccvalue >> 8);
                  uint8_t unocclowByte = static_cast<uint8_t>(unoccvalue & 0xFF);
                  std::vector<uint8_t> data = {0xFD, 0xFC, 0xFB, 0xFA, 0x20, 0x00, 0x67, 0x00, 0x00, 0x00, maxmlowByte, maxmhighByte, 0x00, 0x00, 0x01, 0x00, minmlowByte, minmhighByte, 0x00, 0x00, 0x02, 0x00, maxplowByte, maxphighByte, 0x00, 0x00, 0x03, 0x00, minplowByte, minphighByte, 0x00, 0x00, 0x04, 0x00, unocclowByte, unocchighByte, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01};
                  return data;
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
type or paste code here

I almost utilized your config except for:

  encryption:
    key: "/nS+vVV3TbfITHAWd40Kp9hsaMdHVHj29774mQoUFf4="

ota:
  password: "c2455532eff013ec3f2e2b9ed94d73"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "2411S Fallback Hotspot"
    password: "iQdCbSTOBry3"
type or paste code here

And remove:

platformio_options:
  board_upload.flash_size: 4MB

For the system report:

Blockquote
INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/2411s.yaml…
Failed config

esp32: None

Please specify flash_size within esp32 configuration only.
board: nodemcu-32s
framework:
version: 2.0.5
source: ~3.20005.0
platform_version: platformio/[email protected]
type: arduino
flash_size: 4MB
variant: ESP32

Blockquote
Can you help to solve it?
Thank you

Try to remove the line: framework: type: arduino from your config

Thank you, I already removed and uploaded, but the state alway show “unknown”. I also tried to update the LD2411S firmware but no luck

Please check the connections (Rx to Tx and Tx to Rx) and make sure you have the S version and not the plain one.

If the state is unknown it means that the ESPHome doesn’t get any data from the sensor

Dear ChreeceGR,
I am sure to connect right, I even change connection revertly to be sure but no change at all.
Possiblly it the LD2411 version, not LD2411S version as the seller described. I notice the printing on the board HLK-LD2411 and ask the seller about that, he told me that’s just the printing.
So, I have to make a return to the seller
Thank you.

Ist there any isolation on the wires? From the photo it seems they are naked copper and two of them having a contact

Yes, it is.
The wire is insulated.
The wire is from stator of a dead motor

Believe me, I connected the wires right

interesting gates graphical card.
Can you share your lovelace code for them?

I also have ordered two of these to test. The thing is that on my esp32 board I had RX0 and TX0 labeled pins which didn’t work. No data in home assistant, hlk bluetooth app works fine.

Than I changed the pins to use GPIO21 and GPIO22 and it worked.

So my setup is like this;


(yea, a lot going on there :slight_smile: )

My issue currently is that it seems to be unstable somehow. When its working, its working. But sometimes it just doesn’t register any movement at all. like somehow the connection is lost now and then for a few moments than coming back. Not sure tho if its about my overused board or the device itself.

And here is my yaml;

substitutions:
  name: esphome-web-aef658
  friendly_name: Office - Multisensor
  uart_tx_pin: GPIO21
  uart_rx_pin: GPIO22

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  name_add_mac_suffix: false
  includes:
    - LD2411s.h
  project:
    name: esphome.web
    version: '1.0'
  on_boot:
    priority: 250
    then:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0x73, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  logs:
    sensor: INFO # reduced logging to minimize web_server target overload..

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:

# Allow provisioning Wi-Fi via serial
improv_serial:

wifi:
  manual_ip:
    static_ip: 192.168.1.5
    gateway: 192.168.1.1
    subnet: 255.255.255.0

# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:

dashboard_import:
  package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
  import_full_config: true

# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
  authorizer: none

web_server:

uart:
  id: uart_bus
  tx_pin: ${uart_tx_pin}
  rx_pin: ${uart_rx_pin}
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

number:
  - platform: template
    name: Servo Control
    min_value: -100
    initial_value: 0
    max_value: 100
    step: 1
    optimistic: true
    on_value:
    - servo.write:
        id: my_servo
        level: !lambda 'return x / 100.0;'
  - platform: template
    name: "${name} Min Motion Distance"
    id: minmotion
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 717
    step: 1
  - platform: template
    name: "${name} Max Motion Distance"
    id: maxmotion
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 717
    step: 1
  - platform: template
    name: "${name} Min Presence Distance"
    id: minpresence
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 425
    step: 1
  - platform: template
    name: "${name} Max Presence Distance"
    id: maxpresence
    optimistic: true
    unit_of_measurement: cm
    min_value: 30
    max_value: 425
    step: 1
  - platform: template
    name: "${name} Unoccupied Time"
    id: unocc_time
    optimistic: true
    unit_of_measurement: sec
    min_value: 0
    max_value: 6553
    step: 1

servo:
  - id: my_servo
    output: pwm_output
    transition_length: 2.0s
    
output:
  - platform: ledc
    id: pwm_output
    pin: 32
    frequency: 50 Hz

sensor:
  - platform: adc
    pin: 35
    name: "Temperature Sensor"
    update_interval: 5s
    unit_of_measurement: "°C"
    filters:
      - lambda: return (x - 0.5) * 100;
  - platform: custom
    lambda: |-
      auto my_sensor = new UARTSensor(id(uart_bus)); 
      App.register_component(my_sensor);
      return {my_sensor->distance_sensor, my_sensor->presence_sensor, my_sensor->motion_sensor, my_sensor->max_motion_sensor, my_sensor->min_motion_sensor, my_sensor->max_presence_sensor, my_sensor->min_presence_sensor, my_sensor->unocc_time_sensor};
    sensors:
      - name: "${name} Distance"
        state_class: measurement
        id: distance_sensor
        unit_of_measurement: cm
      - id: presence_sensor
        name: "internal_presense_sensor_to_binary_template"
        internal: true
        on_value:
          - binary_sensor.template.publish:
              id: presence_template
              state: !lambda return x > 0;
      - id: motion_sensor
        name: "internal_motion_sensor_to_binary_template"
        internal: true
        on_value:
          - binary_sensor.template.publish:
              id: motion_template
              state: !lambda return x > 0;
      - name: "internal_max_motion"
        id: max_motion_sensor
        internal: true
        on_value:
          - number.set:
              id: maxmotion
              value: !lambda return x;
      - name: "internal_min_motion"
        id: min_motion_sensor
        internal: true
        on_value:
          - number.set:
              id: minmotion
              value: !lambda return x;
      - name: "internal_max_presence"
        id: max_presence_sensor
        internal: true
        on_value:
          - number.set:
              id: maxpresence
              value: !lambda return x;
      - name: "internal_min_presence"
        id: min_presence_sensor
        internal: true
        on_value:
          - number.set:
              id: minpresence
              value: !lambda return x;
      - name: "internal_unocc"
        id: unocc_time_sensor
        internal: true
        on_value:
          - number.set:
              id: unocc_time
              value: !lambda return x;
  # - platform: adc
  #   pin: 33
  #   name: "Potentiometer Value"
  #   update_interval: 1s
  #   filters:
  #     - lambda: return ((x * 100)) - 7.5;
  #   on_value:
  #   - servo.write:
  #       id: my_servo
  #       level: !lambda 'return x / 100.0;'
    
binary_sensor:
  - platform: template
    id: presence_template
    name: "${name} Presence"
    device_class: occupancy
    filters:
      - delayed_off: 1s
  - platform: template
    id: motion_template
    name: "${name} Motion"
    device_class: motion
    filters:
      - delayed_off: 1s

switch:
  - platform: template
    name: "${name} Bluetooth"
    id: human_switch
    optimistic: true
    restore_mode: "RESTORE_DEFAULT_ON"
    turn_on_action:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xA4, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
    turn_off_action:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]

button:
  - platform: restart
    name: "Restart MCU: ${name}"
    entity_category: diagnostic
    on_press:
      - uart.write:
          id: uart_bus
          data: "resetSystem 0"
  - platform: template
    name: "${name} Reboot Module"
    id: reboot_module
    entity_category: diagnostic
    on_press:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x02, 0x00, 0xA3, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]

script:
  - id: statepublish
    then:
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]
      - uart.write:
          id: uart_bus 
          data: !lambda
                  int minmot = id(minmotion).state;
                  int maxmot = id(maxmotion).state;
                  int minpr = id(minpresence).state;
                  int maxpr = id(maxpresence).state;
                  int unocctm = id(unocc_time).state;
                  uint16_t minmvalue = static_cast<uint16_t>(minmot);
                  uint8_t minmhighByte = static_cast<uint8_t>(minmvalue >> 8);
                  uint8_t minmlowByte = static_cast<uint8_t>(minmvalue & 0xFF);
                  uint16_t maxmvalue = static_cast<uint16_t>(maxmot);
                  uint8_t maxmhighByte = static_cast<uint8_t>(maxmvalue >> 8);
                  uint8_t maxmlowByte = static_cast<uint8_t>(maxmvalue & 0xFF);
                  uint16_t minpvalue = static_cast<uint16_t>(minpr);
                  uint8_t minphighByte = static_cast<uint8_t>(minpvalue >> 8);
                  uint8_t minplowByte = static_cast<uint8_t>(minpvalue & 0xFF);
                  uint16_t maxpvalue = static_cast<uint16_t>(maxpr);
                  uint8_t maxphighByte = static_cast<uint8_t>(maxpvalue >> 8);
                  uint8_t maxplowByte = static_cast<uint8_t>(maxpvalue & 0xFF);
                  uint16_t unoccvalue = static_cast<uint16_t>(unocctm * 10);
                  uint8_t unocchighByte = static_cast<uint8_t>(unoccvalue >> 8);
                  uint8_t unocclowByte = static_cast<uint8_t>(unoccvalue & 0xFF);
                  std::vector<uint8_t> data = {0xFD, 0xFC, 0xFB, 0xFA, 0x20, 0x00, 0x67, 0x00, 0x00, 0x00, maxmlowByte, maxmhighByte, 0x00, 0x00, 0x01, 0x00, minmlowByte, minmhighByte, 0x00, 0x00, 0x02, 0x00, maxplowByte, maxphighByte, 0x00, 0x00, 0x03, 0x00, minplowByte, minphighByte, 0x00, 0x00, 0x04, 0x00, unocclowByte, unocchighByte, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01};
                  return data;
      - uart.write: [0xFD, 0xFC, 0xFB, 0xFA, 0x04, 0x00, 0xFE, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01]


light:
  - platform: neopixelbus
    type: GRBW
    variant: SK6812
    pin: 14
    num_leds: 30
    name: "SK6812 LED Strip"
    effects:
      - pulse:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:
      - addressable_flicker:

I also realized if I wave my hand right in front of it for about 3-4 seconds it goes dark for a few seconds and registers no movement. (same with the other one I bought)

Thank you, I will retry

Anyone also tried to use the LD2411S with an ESP-01?
Not perfect because ESP-01 runs on 3.3V and the sensor on 5V.
But i have managed to read Data by using a 5V Power Source + 3.3V Voltage Regulator for the ESP and a TTL level shifter. Only Problem:
reading Values works fine, but sending commands seems not to work.
I used the native TXD (GPIO01) and RXD (GPIO03) for communication.
But setting thresholds or disable Bluetooth through the webinterface didn’t work.
Also the initial reading of the settings didn’t work. I assume that the “uart.write” commands after booting is like a setting-request-command, which of course doesn’t work either.
Anyone have some ideas?