#How to have faster update on a ESP32

4 messages · Page 1 of 1 (latest)

kindred marsh
#

I have a presence sensor on a ESP32 connected with WiFi to turn on a light.
It turn the light on almost instantly but it take around 2 minutes to stop detecting presence and turn off the light.
Can I speed up the update to turn off faster ?

Here is the code taken from a tuto on youtube

esphome:
  name: detecteur-de-presence-v2
  friendly_name: Détecteur de présence V2

esp32:
  board: lolin_s2_mini
  framework:
    type: arduino

# Enable logging
logger:

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

ota:
  - platform: esphome
    password: "..."

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Detecteur-De-Presence"
    password: "..."

captive_portal:

uart:
  tx_pin: GPIO18
  rx_pin: GPIO33
  baud_rate: 256000
  id: uart_1
  parity: NONE
  stop_bits: 1

ld2410:
  - uart_id: uart_1

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status

sensor:
  - platform: ld2410
    light:
      name: light
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance
inner hearthBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

cursive plinth
#

Set the timeout configuration variable
https://esphome.io/components/sensor/ld2410.html
That said it says the default is 5s - so either your sensor is picking something up to stay on for 2 mins, or it might be something else in your home assistant/esphome setup causing the issue

half fog
#

Might be a better question for the esphome server too. But yeah, what hil said makes sense. You might need to adjust sensitivity or something (e.g. still energy?)