本帖最后由 moz111 于 2024-4-10 11:33 编辑
用ESP32刷的esphome.
#RF接收
remote_receiver:
pin: GPIO32
dump:
- rc_switch
# Settings to optimize recognition of RF devices
tolerance: 50%
filter: 250us
idle: 4ms
buffer_size: 2kb
#发射
remote_transmitter:
pin: GPIO33
# RF uses a 100% carrier signal
carrier_duty_percent: 100%
switch:
- platform: template
name: RF Power Button
optimistic: true
turn_on_action:
- remote_transmitter.transmit_rc_switch_raw:
code: '010111111111110000000011000000000000' #010111111111110000000011
protocol: 2
repeat:
times: 5
wait_time: 7500us
turn_off_action:
- remote_transmitter.transmit_rc_switch_raw:
code: '010111111111110011000000000000000000' #010111111111110011000000
protocol: 2
repeat:
times: 5
wait_time: 7500us
# Enable fallback hotspot (captive portal) in case wifi connection fails
会报错
|