I bought an RF blaster from Kincony and configured it in the ESPHome dashboard.
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: Living Fan Power button
on_press:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: transmitter_ir
code: '00010001000100010111110001101111'
protocol: 1
repeat:
times: 3
wait_time: 0s
- platform: template
name: Living Fan Light button
on_press:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: transmitter_ir
code: '00001100000011000111110001101111'
protocol: 1
repeat:
times: 4
wait_time: 0s
When I tried to capture the code it showed me the following values.
on
[18:41:27][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:41:28][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:41:28][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:41:28][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:41:28][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0000110000001100011111000110111'
off
[18:41:46][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:41:46][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100'
[18:41:46][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
I used the most repeated code and added that to the yaml. However, that will do nothing and also won’t repeat like I’m asking it to.
Here is the output of the button press.
[18:46:23][D][button:010]: 'Living Fan Light button' Pressed.
[18:46:24][W][component:237]: Component api took a long time for an operation (229 ms).
[18:46:24][W][component:238]: Components should block for at most 30 ms.
[18:46:24][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:46:24][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:46:24][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:46:24][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0000110000001100011111000110111'
What also happens is that it changes the code when I press the remote button (not HA) multiple times.
second on
[18:42:14][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:14][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:15][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:15][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0000110000001100011111000110111'
second off
[18:42:38][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:38][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:38][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='00001100000011000111110001101111'
[18:42:38][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0000110000001100011111000110111'
It is a remote for a DC fan. I’m pretty new to this and I think I’m doing something wrong. Can someone please help me with this?