Hello everyone, I am making an RF transmitter and receiver with esphome and I am not able to receive the transmited code in raw format.
For testing, on my transmitter I have two buttons, one to transmit a specific code with ‘protocol’ and another button where the same code is sent but in raw format.
esphome:
name: esphome-web-d12d48
friendly_name: D1 Mini ESP32
esp32:
board: esp32dev
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
remote_transmitter:
pin: GPIO21
carrier_duty_percent: 100%
button:
- platform: template
name: RF code with protocol
on_press:
- remote_transmitter.transmit_rc_switch_raw:
code: '101111111111'
protocol:
inverted: True
pulse_length: 450
sync: [23,1]
zero: [1,2]
one: [2,1]
repeat:
times: 8
wait_time: 0ms
- platform: template
name: RF code in raw
on_press:
- remote_transmitter.transmit_raw:
code: [-10350,450,-900,450,-450,900,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450]
repeat:
times: 8
wait_time: 0ms
The code sent can be seen in this graph:
On the receiving side I have two binary sensors arranged to indicate when the code is received via protocol or via raw format
esphome:
name: esphome-web-4950ff
friendly_name: wemos-RF-receiver
esp8266:
board: d1_mini
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
remote_receiver:
pin: D1
dump:
- rc_switch
tolerance: 50%
filter: 250us
idle: 4ms
buffer_size: 2kb
binary_sensor:
- platform: remote_receiver
name: RF Button
rc_switch_raw:
code: '101111111111'
protocol:
inverted: True
pulse_length: 450
sync: [23,1]
zero: [1,2]
one: [2,1]
filters:
- delayed_off: 1000ms
- platform: remote_receiver
name: RF Button RAW
raw:
code: [-10350,450,-900,450,-450,900,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450,-900,450]
filters:
- delayed_off: 1000ms
When I press any of the buttons on the transmitter, only the “RF Button” binary sensor is activated and never the “RF Button RAW” and I don’t understand why if the code in raw is exactly the same.
At the dump I have rc_switch because if I put raw the log output is flooded with “Received Raw” and I can’t see anything.
I need to receive the signal in raw because the code I really want to send does not correspond to any of the included protocols.
I would appreciate your help to resolve this problem. Thanks.