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

 找回密码
 立即注册
查看: 1234|回复: 7

[技术探讨] 按门铃一次,接收到多个射频码

[复制链接]

80

主题

388

帖子

1680

积分

金牌会员

Rank: 6Rank: 6

积分
1680
金钱
1292
HASS币
0
发表于 2022-8-1 20:26:04 | 显示全部楼层 |阅读模式
本帖最后由 ciasdmxhxjjpd@c 于 2022-8-1 20:31 编辑

RT,

拆了一个 murui 的门铃,如何接入 ha

esp8266
remote_receiver:
  pin: D5
  dump:
    - rc_switch
  tolerance: 50%
  filter: 250us
  idle: 4ms

binary_sensor:
  - platform: remote_receiver
    name: "murui bell ring"
    rc_switch_raw:
      protocol: 1
      code: '00101110000111011100001'

  - platform: remote_receiver
    name: "murui bell ring second code"
    rc_switch_raw:
      protocol: 5
      code: '001011100001110111000010'
没办法,为了提高成功率,多加了一个,请问 这个协议 和 code 的匹配规则是什么?
实测,每次要多按好多次,才能匹配成功一次。效率太低了!

[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='00000000'
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='10000110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=8 data='11111111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='001001010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='01100100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='00111110101'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='111011001'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0011000110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111011100011'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='11111101'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110'
[D][sensor:124]: 'gas': Sending state 488.57501 m³ with 3 decimals of accuracy
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110000'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001'
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='00000000'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='110100000'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='000101110000111011100001'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][sensor:124]: 'gas': Sending state 488.57501 m³ with 3 decimals of accuracy
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='010100011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='010010100'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01101110000111011100001'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00010111000011101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][sensor:124]: 'gas': Sending state 488.57501 m³ with 3 decimals of accuracy
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='00101010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='00111111'
[I][ota:105]: Boot seems successful, resetting boot loop counter.
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=8 data='111111111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0001011100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='1001011100001110111000010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='011101101'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='001011100001110111000010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110000'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111'
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0001011100001110111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring': Sending state ON
[D][binary_sensor:036]: 'murui bell ring': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='001110100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001110111000'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='0001011100001110111000010'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='100101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111011'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110000'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0001011100001110111000010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='001011100001'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='001011100001110111000010'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110000111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='11000110'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00101110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='001011100001110'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010111000011101'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='0010111000011101'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='001011100001110'
[D][binary_sensor:036]: 'murui bell ring second code': Sending state ON
[D][binary_sensor:036]: 'murui bell ring second code': Sending state OFF
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0001011100001110'
[D][sensor:124]: 'gas': Sending state 488.57501 m³ with 3 decimals of accuracy
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='01011100'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=5 data='01001111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='01011111'
[D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=3 data='11110000'







回复

使用道具 举报

14

主题

430

帖子

2699

积分

金牌会员

Rank: 6Rank: 6

积分
2699
金钱
2269
HASS币
0
发表于 2022-8-2 11:34:16 来自手机 | 显示全部楼层
用esphome写433感觉有时就是这样
回复

使用道具 举报

80

主题

388

帖子

1680

积分

金牌会员

Rank: 6Rank: 6

积分
1680
金钱
1292
HASS币
0
 楼主| 发表于 2022-8-2 13:09:36 | 显示全部楼层
ylilike 发表于 2022-8-2 11:34
用esphome写433感觉有时就是这样

所以,只能用带硬件解码的小板子了?

接收芯片 + 解码芯片 组合的板子。
回复

使用道具 举报

14

主题

430

帖子

2699

积分

金牌会员

Rank: 6Rank: 6

积分
2699
金钱
2269
HASS币
0
发表于 2022-8-2 16:12:08 来自手机 | 显示全部楼层
不至于,你还没试过别的固件,不会写,可openmqtt
回复

使用道具 举报

14

主题

430

帖子

2699

积分

金牌会员

Rank: 6Rank: 6

积分
2699
金钱
2269
HASS币
0
发表于 2022-8-2 16:14:51 来自手机 | 显示全部楼层
刚没仔细可接到多个?可以过滤一下呀,以为收不到
回复

使用道具 举报

80

主题

388

帖子

1680

积分

金牌会员

Rank: 6Rank: 6

积分
1680
金钱
1292
HASS币
0
 楼主| 发表于 2022-8-2 16:17:41 | 显示全部楼层
ylilike 发表于 2022-8-2 16:14
刚没仔细可接到多个?可以过滤一下呀,以为收不到

在哪里过滤呢?
回复

使用道具 举报

14

主题

430

帖子

2699

积分

金牌会员

Rank: 6Rank: 6

积分
2699
金钱
2269
HASS币
0
发表于 2022-8-2 19:42:56 | 显示全部楼层

用nr或者:

binary_sensor:
  - platform: remote_receiver             #来源是射频信号,这个不能改
    id: key1        #名称,随意
    filters:
      - delayed_off: 222ms   # 过滤这里设置合适时间
    rc_switch_raw:                        #经过rc_switch_raw解码后的信号
      code: '10001xxxxxxxxxxx110010'    #信号值,填写你收到的信号值
      protocol: 1                        #协议,我填了1,个人理解,看你收到的信号中protocol后面的值
    on_press:
      then:
        - light.toggle: kitchen_light_1   
若然,一切若然~
回复

使用道具 举报

80

主题

388

帖子

1680

积分

金牌会员

Rank: 6Rank: 6

积分
1680
金钱
1292
HASS币
0
 楼主| 发表于 2022-8-2 20:31:04 | 显示全部楼层
ylilike 发表于 2022-8-2 19:42
用nr或者:

binary_sensor:

用 x 作为通配符过滤? 这种过滤,也要匹配码的长度吧
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-29 02:44 , Processed in 0.142473 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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