RF 433 debugging to get the correct code

OK here’s the progress I made.

  1. Changed receiver and transmitter with SRX882 / STX882
  2. I used custom protocol to get a close as possible to the original remote behavior.
  3. I repeat the two codes explicitly 4 + 4 times to control the padding of the last entry and the timings.
  4. Altering inverted to pin settings of receiver and transmitter or in the transmitter protocol does affect things, making it not transmitting under certain combinations, or identifying signals as different protocols or needing an extra padding to transmit the signal.

These are the readings I get from SDR from the code bellow. There’s a sync period marked with X before each transmission which doesn’t exist in the original capture. How to remove that?

Receiver on ESP reads the signal it sends as protocol 1 (original remote read as protocol 6). Setting protocol 6 to transmission doesn’t fix this

# Received transmission from ESP
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=1 data='0111100010011110000101110100110101001101'
# Received transmission from orginal remote
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
Received RCSwitch Raw: protocol=6 data='011110001001111000010111000011010000110'
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
Received RCSwitch Raw: protocol=6 data='011110001001111000010111010011010100110'


remote_receiver:
  pin:
    number: GPIO05
    inverted: true
  dump:
    - rc_switch
  tolerance: 60%
  filter: 40us
  idle: 2ms
  buffer_size: 10kb


remote_transmitter:
  pin:
     number: GPIO04
  carrier_duty_percent: 100%

button:
  - platform: template
    name: Release Shed Door
    on_press:
       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110000110100001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110000110100001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110000110100001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110000110100001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - delay: 10ms

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110100110101001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]
       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110100110101001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110100110101001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]

       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110100110101001101'
          protocol:
            pulse_length: 293
            inverted: true
            one: [3,1]
            zero: [1,3]


In situation you have weird signal (two different signals), playing with RCswitch doesn’t make your life easier…

Ok so what you suggest to do?

Play with raw signals, trying to understand how those two different signals are really combined. Or are they both really sent every button press?
It would be easy to reproduce the signal of your spectrogram on your post #1, but difficult to mix two signals with inconsistent sequence (4+1+4+1 or 5+5).

Sounds like it’s probably time for raw but a quick look at all won’t hurt to see what pops up and maybe get some hints.
Sometimes pronto can do the job.

Unfortunately I didn’t manage to figure this out and I settled for a broadlink rm4c which recognizes the codes correctly and works with HA. Given how straightforward it was to setup with broadlink, it’s bitter that we don’t have better open source tooling to read and replay those signals. I wish I had better understanding of the field to help build it.

Either way, thanks everyone for your time and suggestions!

1 Like