找回密码
 立即注册
查看: 1818|回复: 3

[技术探讨] 拆了一个 murui 的门铃,如何接入 ha

[复制链接]

80

主题

308

回帖

1680

积分

金牌会员

积分
1680
金钱
1292
HASS币
0
发表于 2022-7-30 14:16:23 | 显示全部楼层 |阅读模式
本帖最后由 ciasdmxhxjjpd@c 于 2022-7-30 14:20 编辑

RT,

接收芯片 微信图片_20220730141906.jpg

音频芯片?搜不到资料,

微信图片_20220730141858.jpg


喇叭驱动的数据如下,

[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
[D][binary_sensor:036]: 'murui doorbell': Sending state OFF
[D][binary_sensor:036]: 'murui doorbell': Sending state ON
因为,有铃声,按一次,会发数据,这个是模拟信号,请问,如何用一个 io 口去读取?

回复

使用道具 举报

74

主题

544

回帖

3575

积分

论坛元老

积分
3575
金钱
2957
HASS币
0
发表于 2022-7-30 15:08:17 | 显示全部楼层
esphome当一个按钮开关一样行吗?
binary_sensor:
  - platform: gpio
    pin:
      number: 0
      mode: INPUT_PULLUP
      inverted: True
    name: "门铃"
回复

使用道具 举报

104

主题

2845

回帖

1万

积分

超级版主

智能家居&单板滑雪痴迷爱好者

积分
12159
金钱
9145
HASS币
460

教程狂人突出贡献

发表于 2022-7-30 15:36:05 来自手机 | 显示全部楼层
没看明白,你“喇叭驱动的数据如下”,如下的这些信息是怎么来的?用esp的uart接了板子上的串口?如果这样的话,有ON和OFF了接入就很简单了呀,甚至还可以做个switch出来在ha/esphome里触发。
回复

使用道具 举报

80

主题

308

回帖

1680

积分

金牌会员

积分
1680
金钱
1292
HASS币
0
 楼主| 发表于 2022-7-30 20:10:47 | 显示全部楼层
XCray 发表于 2022-7-30 15:36
没看明白,你“喇叭驱动的数据如下”,如下的这些信息是怎么来的?用esp的uart接了板子上的串口?如果这样 ...

不是串口,就是音频芯片输出给喇叭的信号,应该是模拟信号,我用binary_sensor 获取的,应该是不正确的,应该用 adc 获取电压,没有铃声时,电压为1.06v,有铃声时0.1v左右。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-17 12:15 , Processed in 0.131939 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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