ESPHome 2023.8.0更新支持 LD2410人体存在
本帖最后由 敬轩 于 2023-8-28 14:12 编辑ESPHome 2023.8.0 - 16th August 2023LD2410The LD2410 component has had a massive upgrade thanks to @regevbr! It now supports settings most if not all configuration parameters via switches / numbers and selects and exposes more data via various sensors. This includes breaking changes that mean the existing gate configuration options have been moved to the number platform.代码网址:https://esphome.io/components/sensor/ld2410.html?highlight=ld2410该传感器允许您使用LD2410传感器执行不同的测量。ld2410
这下方便使用为了校准您的传感器,请执行以下操作:ld2410
[*]启用工程模式。
[*]监控gX_move_energy和gX_still_energy 传感器。
[*]更改阈值并重复步骤 2,直到满意为止。
[*]禁用工程模式。https://esphome.io/_images/ld2410-card.png
number:
- platform: ld2410
timeout:
name: timeout
light_threshold:
name: light threshold
max_move_distance_gate:
name: max move distance gate
max_still_distance_gate:
name: max still distance gate
g0:
move_threshold:
name: g0 move threshold
still_threshold:
name: g0 still threshold
g1:
move_threshold:
name: g1 move threshold
still_threshold:
name: g1 still threshold
g2:
move_threshold:
name: g2 move threshold
still_threshold:
name: g2 still threshold
g3:
move_threshold:
name: g3 move threshold
still_threshold:
name: g3 still threshold
g4:
move_threshold:
name: g4 move threshold
still_threshold:
name: g4 still threshold
g5:
move_threshold:
name: g5 move threshold
still_threshold:
name: g5 still threshold
g6:
move_threshold:
name: g6 move threshold
still_threshold:
name: g6 still threshold
g7:
move_threshold:
name: g7 move threshold
still_threshold:
name: g7 still threshold
g8:
move_threshold:
name: g8 move threshold
still_threshold:
name: g8 still threshold
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
g0:
move_energy:
name: g0 move energy
still_energy:
name: g0 still energy
g1:
move_energy:
name: g1 move energy
still_energy:
name: g1 still energy
g2:
move_energy:
name: g2 move energy
still_energy:
name: g2 still energy
g3:
move_energy:
name: g3 move energy
still_energy:
name: g3 still energy
g4:
move_energy:
name: g4 move energy
still_energy:
name: g4 still energy
g5:
move_energy:
name: g5 move energy
still_energy:
name: g5 still energy
g6:
move_energy:
name: g6 move energy
still_energy:
name: g6 still energy
g7:
move_energy:
name: g7 move energy
still_energy:
name: g7 still energy
g8:
move_energy:
name: g8 move energy
still_energy:
name: g8 still energyesp8266 D1开发板简单实例esphome:
name: ld2410-d1
friendly_name: LD2410-D1
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "2YFuHY0XtEzld9q4WIcwkKRbGF2Tg15sR6ikHCA="
ota:
password: "846afe79f95f0d951b42bd7c1f2b2d8c"
# Example configuration entry
mqtt:
broker: 192.168.2.1
username: mqtt
password: mqtt
wifi:
ssid: "mqtt"
password: "mqtt"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ld2410-D1 Fallback Hotspot"
password: "kp1KoFJe4QZO"
uart:
tx_pin: GPIO1 #使用D1 mini RX
rx_pin: GPIO3 #使用D1 mini TX
baud_rate: 256000
parity: NONE
stop_bits: 1
# Example configuration entry
ld2410:
number:
- platform: ld2410
timeout:
name: timeout
light_threshold:
name: light threshold
max_move_distance_gate:
name: max move distance gate
max_still_distance_gate:
name: max still distance gate
g0:
move_threshold:
name: g0 move threshold
still_threshold:
name: g0 still threshold
g1:
move_threshold:
name: g1 move threshold
still_threshold:
name: g1 still threshold
g2:
move_threshold:
name: g2 move threshold
still_threshold:
name: g2 still threshold
g3:
move_threshold:
name: g3 move threshold
still_threshold:
name: g3 still threshold
g4:
move_threshold:
name: g4 move threshold
still_threshold:
name: g4 still threshold
g5:
move_threshold:
name: g5 move threshold
still_threshold:
name: g5 still threshold
g6:
move_threshold:
name: g6 move threshold
still_threshold:
name: g6 still threshold
g7:
move_threshold:
name: g7 move threshold
still_threshold:
name: g7 still threshold
g8:
move_threshold:
name: g8 move threshold
still_threshold:
name: g8 still threshold
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
g0:
move_energy:
name: g0 move energy
still_energy:
name: g0 still energy
g1:
move_energy:
name: g1 move energy
still_energy:
name: g1 still energy
g2:
move_energy:
name: g2 move energy
still_energy:
name: g2 still energy
g3:
move_energy:
name: g3 move energy
still_energy:
name: g3 still energy
g4:
move_energy:
name: g4 move energy
still_energy:
name: g4 still energy
g5:
move_energy:
name: g5 move energy
still_energy:
name: g5 still energy
g6:
move_energy:
name: g6 move energy
still_energy:
name: g6 still energy
g7:
move_energy:
name: g7 move energy
still_energy:
name: g7 still energy
g8:
move_energy:
name: g8 move energy
still_energy:
name: g8 still energy
- platform: dht
pin: GPIO2 #使用D1 mini D4针脚
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
update_interval: 60s
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
学习摸索阶段不对之处还请指正
esphome的操作步骤这个写的详细;https://blog.csdn.net/qq_31400983/article/details/129054636
太感谢了,正需要这个,用以前的配值文件最新版esphome报错 感谢,回头试试 本帖最后由 silas3082 于 2023-8-23 14:43 编辑
连接TX和RX,VCC和GND也需要连接吧?
请教大佬接入homeassistant之后,都显示未知是什么问题?
silas3082 发表于 2023-8-23 11:37
连接TX和RX,VCC和GND也需要连接吧?
请教大佬接入homeassistant之后,都显示未知是什么问题?
...
vcc 你看下ld2140 是3.3v 还是 5V 有没接错 ,多刷一次覆盖一下呢,我 这个刷了后这几天观察 感觉有些不稳定 经常掉线 ,我正在用esp32-c3合宙板尝试看稳定不。
敬轩 发表于 2023-8-23 18:30
vcc 你看下ld2140 是3.3v 还是 5V 有没接错 ,多刷一次覆盖一下呢,我 这个刷了后这几天观察 感觉有些不 ...
确实是5v,用他们海凌科调试的app各个参数没有问题,不行我也换一个板子试试 silas3082 发表于 2023-8-23 18:32
确实是5v,用他们海凌科调试的app各个参数没有问题,不行我也换一个板子试试 ...
我换了nodemcu数据就出来没问题了 不好用,而且接uart口后,数据量剧增 sxrcm 发表于 2023-8-24 17:41
不好用,而且接uart口后,数据量剧增
有数据了,但是存在状态时断时续的 看不懂怎么弄,大佬有没有适合新手的教程
页:
[1]
2