04-19-2025, 04:20 PM
(This post was last modified: 04-19-2025, 04:30 PM by johnsmith8439.)
Hello,
I installed ESPHome on the KC868-AG. RF receiver works, I can receive RF signals from the smart plug's remote:
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'
But transmitter doesn't work, I cannot control the smart plug with RF using the transmitter.
The log after using transmitter:
[23:29:02][D][button:010]: 'Smart Plug On' Pressed.
[23:29:02][W][component:239]: Component api took a long time for an operation (287 ms).
[23:29:02][W][component:240]: Components should block for at most 30 ms.
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'
Here is my ESPHome code:
I installed ESPHome on the KC868-AG. RF receiver works, I can receive RF signals from the smart plug's remote:
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'
But transmitter doesn't work, I cannot control the smart plug with RF using the transmitter.
The log after using transmitter:
[23:29:02][D][button:010]: 'Smart Plug On' Pressed.
[23:29:02][W][component:239]: Component api took a long time for an operation (287 ms).
[23:29:02][W][component:240]: Components should block for at most 30 ms.
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'
Here is my ESPHome code:
Code:
remote_transmitter:
- id: transmitter_ir
pin: GPIO2
carrier_duty_percent: 50%
- id: transmitter_rf
pin: GPIO22
carrier_duty_percent: 50%
remote_receiver:
# see https://esphome.io/components/remote_transmitter.html#setting-up-infrared-devices
# for details on discovering the correct codes for your devices
- id: receiver_ir
pin:
number: GPIO23
inverted: True
dump: rc_switch
# see https://esphome.io/components/remote_transmitter.html#setting-up-rf-devices
# for details on discovering the correct codes for your devices
- id: receiver_rf
pin:
number: GPIO13
dump: rc_switch
# Settings to optimize recognition of RF devices
tolerance: 50%
filter: 250us
idle: 4ms
buffer_size: 2kb
button:
- platform: template
name: "Door Chime"
on_press:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: transmitter_rf
protocol: 5
code: "001010100010100000"
repeat:
times: 10
wait_time: 0s
- platform: template
name: "Smart Plug On"
on_press:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: transmitter_rf
protocol: 2
code: "10010010001010100110110110010011"
repeat:
times: 10
wait_time: 0s
- platform: template
name: "Smart Plug Off"
on_press:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: transmitter_rf
protocol: 2
code: "01000100101011010110100011010011"
repeat:
times: 10
wait_time: 0s

