『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 677|回复: 2

[求助] LD2410B+D1mini,数据读取为未知

[复制链接]

9

主题

55

帖子

612

积分

高级会员

Rank: 4

积分
612
金钱
557
HASS币
0
发表于 2023-10-6 21:29:52 | 显示全部楼层 |阅读模式
本帖最后由 xiaoma5015369 于 2023-10-6 21:33 编辑

LD2410B+D1mini,数据读取为未知
有吧uart调换和更改其他的,均无效
请问大佬门,如何解决?
QQ截图20231006212816.jpg

代码根据另一位大佬的直接复制粘贴的,

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





回复

使用道具 举报

2

主题

113

帖子

1194

积分

金牌会员

Rank: 6Rank: 6

积分
1194
金钱
1081
HASS币
0
发表于 2023-10-7 16:43:00 | 显示全部楼层
突然看不到论坛图片了。。
看不到图片没法回答你。

猜测:
1、你uart和日志冲突了。。
  要关闭日志打印;
   # Enable logging
logger:
   baud_rate: 0



2、有些数据要打开工程模式才显示。。
回复

使用道具 举报

1

主题

24

帖子

206

积分

中级会员

Rank: 3Rank: 3

积分
206
金钱
182
HASS币
0
发表于 2024-1-5 23:21:27 | 显示全部楼层
解决了吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-29 16:50 , Processed in 0.992320 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表