Help with 315mhz remote control

Hello!
I have an ESP360 remote with the 315mhz nicerf modules installed.

I’m trying to replicate the RF remote for my projector screen, but am having no luck getting the screen to respond.

Here is the real remote signal:

[17:29:53][I][remote.raw:041]: Received Raw: 379, -423, 339, -432, 572, -980, 579, -984, 339, -437, 339, -432, 339, -435, 574, -978, 339, -437, 569, -333, 454, -985, 575, -983, 354, -422, 333, -433, 344, -430, 579, -971, 353, -430, 332, -439, 339

Here is the esp remote signal

[17:30:15][I][remote.raw:041]: Received Raw: 391, -417, 365, -411, 580, -972, 587, -969, 388, -383, 365, -418, 365, -404, 580, -974, 384, -391, 586, -334, 441, -965, 561, -960, 390, -420, 369, -411, 365, -410, 568, -969, 393, -418, 371, -427, 370

I’ve matched the repeat interval and timings as close as I can. Here is a comparison of the real remote vs the esp360 transmission created using EspHome Remote Receiver Oscilloscope

And here is my yaml

esphome:
  name: office-esp360
  friendly_name: Office-ESP360

esp32:
  board: esp32dev
  framework:
    type: arduino

wifi:
  ssid: "Two Whole Internets"
  password: "wifiislife!!"
  #use_address: "192.168.86.49"

  #HotSpot when it can't connect to WiFi
  ap:
    ssid: "Esp360Remote"
    password: "Esp360Remote"

# Enable logging
logger:

api:
  encryption:
    key: "LnA3lnvQufYVusVio4hE1OGWqjCK2Ynb8QEep34p4tk="

ota:
  platform: esphome
  password: ""

captive_portal:
    
#i2c bus definition
i2c:
  sda: 21
  scl: 22
  scan: true
  id: bus_a

#Offsets have been added to the measurements taken. 
#These are necessary due to the heat generated by the PCB, the second layer of the board, and the case. 
#This way, sufficiently accurate values are obtained for automations
sensor:
  - platform: shtcx
    temperature:
      name: "Temperature"
      filters:
        - median: 
            window_size: 5
            send_every: 1
        - offset: -3.7
    humidity:
      name: "Humidity"
      filters:
        - median: 
            window_size: 5
            send_every: 1
        - offset: +19.1   
    address: 0x70
    update_interval: 300s
  - platform: bh1750
    name: "BH1750 Illuminance"
    filters:
      - multiply: 5
    address: 0x23
    update_interval: 1s

#Setting up IR and RF receivers
remote_receiver:
  - id: RF_RX
    pin: 
      number: GPIO5
      inverted: false
      mode:
        input: true
        pullup: true
    #dump: all
    dump: 
      - raw
    tolerance: 25%
    filter: 200us
    idle: 5ms
    buffer_size: 10kb

  - id: IR_RX
    pin: 
      number: GPIO19
      inverted: True
    #dump: all

#Setting up IR and RF transmitters
remote_transmitter:
  - id: RF_TX
    pin: GPIO18
    carrier_duty_percent: 100%
  - id: IR_TX
    pin: GPIO13
    carrier_duty_percent: 50%


web_server:
  port: 80

#Status LED 
switch:
  - platform: gpio
    pin: 12
    name: "Status Led"
    restore_mode: ALWAYS_ON

#Remote Buttons
button:

#Projector Screen
  - platform: template
    name: "Projector Screen Test Stop"
    on_press:
      - then:
        - remote_transmitter.transmit_raw : 
            transmitter_id: RF_TX
            code: [255, -5850, 231, -535, 245, -530, 580, -1016, 534, -1022, 170, -566, 242, -529, 253, -519, 582, -1017, 170, -566, 576, -241, 526, -1020, 502, -1020, 197, -580, 238, -532, 246, -527, 563, -1020, 214, -562, 249, -522]
            repeat: 
              times: 5
              wait_time: 0us
        - remote_transmitter.transmit_raw : 
            transmitter_id: RF_TX
            code: [255, -5850]

I tried using tasmota and it also doesn’t yield any response from the screen.

00:20:14.777 RFR: Data 0xC4C4 (50372), Bits 18, Protocol 25, Delay 368
00:20:14.779 RSL: RESULT = {"Time":"2024-09-29T00:20:14","RfReceived":{"Data":"0xC4C4","Bits":18,"Protocol":25,"Pulse":368}}
00:20:18.579 WIF: Checking connection...
00:20:31.381 CMD: RfSend {"Data":"0xC4C4","Bits":18,"Protocol":25,"Repeat":10,"Pulse":368}
00:20:31.384 SRC: WebConsole from 192.168.86.59
00:20:31.385 CMD: Grp 0, Cmd 'RFSEND', Idx 1, Len 65, Pld -99, Data '{"Data":"0xC4C4","Bits":18,"Protocol":25,"Repeat":10,"Pulse":368}'
00:20:31.665 RSL: RESULT = {"RfSend":"Done"}

Is your set-up confirmed to work with other RF devices? (I.e learn, send, recieve etc).

Well this screen is the only 315mhz device I have, but the set up is confirmed working with 433mhz transmitter/receiver modules.
It’s definitely reading the real remote. Each of the three buttons produces a unique and consistent signal that matches using esphome and tasmota. And it reads the signal sent by itself as demonstrated in the earlier post.

1 Like

What does this mean?

The setup works with 433mhz transmitter/receiver modules. In response to the question from Mahko_Mahko.

1 Like

From where is this coming from?

Directly copying the received signal from the real remote into the send command did not produce a signal that worked, so I adjusted the values to produce a signal that more accurately matched the real remote.

It doesn’t look like the one you also wrote was “real remote” signal.

Correct, but sending it does yield the other received signal I included which does match the real remote.

You can ignore the long delay in there, I was just trying different things to match the original more exactly. Really don’t need to get hung up on it. You can see the results in the graphic and the received raw for the esp remote signal.

I’m sorry but I’m not able to follow if numbers don’t match. Only you know your trials with different things
You need to receive same consistent signal every time one after another within ~50us tolerance to be considered valid sample.

Sorry if it’s not clear, let me explain.
If I take the received raw values and retransmit them, they do not match closely to the real remote. I iterated on those values until the received output matched the real remote.

Furthermore, this (when repeated):

        - remote_transmitter.transmit_raw : 
            transmitter_id: RF_TX
            code: [255, -5850, 231, -535, 245, -530, 580, -1016, 534, -1022, 170, -566, 242, -529, 253, -519, 582, -1017, 170, -566, 576, -241, 526, -1020, 502, -1020, 197, -580, 238, -532, 246, -527, 563, -1020, 214, -562, 249, -522]
            repeat: 
              times: 5
              wait_time: 0us

Is the same as:

        - remote_transmitter.transmit_raw : 
            transmitter_id: RF_TX
            code: [231, -535, 245, -530, 580, -1016, 534, -1022, 170, -566, 242, -529, 253, -519, 582, -1017, 170, -566, 576, -241, 526, -1020, 502, -1020, 197, -580, 238, -532, 246, -527, 563, -1020, 214, -562, 249, -522, 255]
            repeat: 
              times: 5
              wait_time: 5850us

I made this adjustment because the real remote always seems to start with the delay.
I also think my values are all inverted hi/lo rather than lo/hi. But I’m not able to set an inversion flag on transmit_raw, so I have the RF_TX set to match the +/- signs of the raw transmit values so I don’t get confused.

Both of the transmit_raw commands above result in a received signal that is the same (within 50us) as the real remote. This is illustrated in the graphic as well as these received values:

real remote:

[17:29:53][I][remote.raw:041]: Received Raw: 379, -423, 339, -432, 572, -980, 579, -984, 339, -437, 339, -432, 339, -435, 574, -978, 339, -437, 569, -333, 454, -985, 575, -983, 354, -422, 333, -433, 344, -430, 579, -971, 353, -430, 332, -439, 339

esp remote:

[17:30:15][I][remote.raw:041]: Received Raw: 391, -417, 365, -411, 580, -972, 587, -969, 388, -383, 365, -418, 365, -404, 580, -974, 384, -391, 586, -334, 441, -965, 561, -960, 390, -420, 369, -411, 365, -410, 568, -969, 393, -418, 371, -427, 370

Sorry can’t help with your remote, but does your projector screen control look like this?

I replaced mine completely with an ESP Board with built in PSU and relays and control with a Zigbee remote instead. For me in the UK the 315mhz I don’t think is legal so swapping the controller out made life easier and I can use for other stuff.

Might be another option

Thanks, yeah that’s what mine looks like exactly. Was hoping I wouldn’t have to resort to replacing with a relay board, but may end up going that way since I’ve dumped so much time into trying to get this to work. Do you have any details on your implementation?

I used one of these

https://a.aliexpress.com/_Eu2NE0h

I can post the yaml and wiring if interested, I have a humidity/temp/pressure sensor and a small display. Above gives you two spare relays.

Regards Andy

Cool, thanks. I’m in the US so I’ll have to see if there’s a 120v version. Yaml would be great for reference. I assume there’s some logic involved for the screen movement stop when it bottoms out?

My screen has cut off switches so it stops at top and bottom automatically, fairly simple one wire for up and one wire for down. I wired the relays so even if both got activated somehow only one would apply power, just in case. I have used a timed cover control the relevant bits below.

substitutions:
  time_up: 40s
  time_down: 40s

switch:
#switch relay
  - platform: gpio
    pin: 32
    id: Screen_Down
    internal: True
    
  - platform: gpio
    pin: 33
    id: Screen_Up
    internal: True

cover:
  - platform: time_based
    id: screen
    name: Projector Screen
    icon: mdi:projector-screen-variant
    has_built_in_endstop: true
    manual_control: true
    assumed_state: true

    open_action:
      - switch.turn_off: Screen_Down
      - switch.turn_on: Screen_Up
      - delay: ${time_up}
      - switch.turn_off: Screen_Up
    open_duration: ${time_up} #10s # measure this

    close_action:
      - switch.turn_off: Screen_Up
      - switch.turn_on: Screen_Down
      - delay: ${time_down}
      - switch.turn_off: Screen_Down
    close_duration: ${time_down} #10s # measure this

    stop_action:
      - switch.turn_off: Screen_Up
      - switch.turn_off: Screen_Down
  

Found an 8266 version with a multivoltage PSU as well on amazon

https://a.co/d/26IZwXi

I suspect the board I bought and originally linked is actually multi voltage see the ESP devices page.

https://devices.esphome.io/devices/AC-DC-ESP32-Relay-x4

Awesome, thanks so much for the research! I think I’ll give the 315mhz signaling one more go this weekend. If it’s still a fail I’ll probably just order the relay board. My sanity is worth $15, even if it hurts my pride a bit :joy:

While true that when repeated at certain point you can match them.

But you can’t know what receiver thinks. It might count out the whole signal if it’s not starting with correct header. Is the original remote repeating the code?

Your iterated code looks so good, that for sure tolerances are not your problem.

Yes, and it starts with the long value. The graphic I posted is a complete captured signal from the real remote vs the esp-generated signal complete with the ‘header’ and all repetitions.

Yep, but complete signal has to start with high pulse, the one that is separating the 5850us low from “no signal yet”. I honestly think it should accept the repeats even if it missed the start of the first signal, but you never know.

Did you try different distances with your esp-transmitter?