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

Sorry to revive a dead post but I thought to share some more info if anyone else stumbles upon this. I myself am attempting the same thing as @giorgos but have yet to fully succeed. I sent and email to Lucci Air in an attempt to get some more information from them but we will see if that pans out. For now here are my analyzed signals. It seems like each press sends on signal repeated five times followed by another signal repeated five times:

Static Part:
  Prefix:  0 (1 bits)
  Suffix:  10010101100110101010011010010110100101011001101010 (50 bits)
  Combined: 010010101100110101010011010010110100101011001101010 (51 bits)
  Hex:     0x2566A9A5A566A

# direction
 1. Variable: 011010101010101001101010101010 (0x1AAA9AAA) | Full: 001101010101010100110101010101010010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        
 2. Variable: 011010101010011001101010101001 (0x1AA99AA9) | Full: 001101010101001100110101010100110010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)

# speed 1
 3. Variable: 010110101010101001011010101010 (0x16AA96AA) | Full: 001011010101010100101101010101010010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        
 4. Variable: 010110101010011001011010101001 (0x16A996A9) | Full: 001011010101001100101101010100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# speed 2
 5. Variable: 101001101010101010100110101010 (0x29AAA9AA) | Full: 010100110101010101010011010101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
 6. Variable: 101001101010011010100110101001 (0x29A9A9A9) | Full: 010100110101001101010011010100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# speed 3
 7. Variable: 101010011010101010101001101010 (0x2A6AAA6A) | Full: 010101001101010101010100110101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
 8. Variable: 101010011010011010101001101001 (0x2A69AA69) | Full: 010101001101001101010100110100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# speed 4
 9. Variable: 010101101010101001010110101010 (0x15AA95AA) | Full: 001010110101010100101011010101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
10. Variable: 010101101010011001010110101001 (0x15A995A9) | Full: 001010110101001100101011010100110010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)

# speed 5
11. Variable: 100101101010101010010110101010 (0x25AAA5AA) | Full: 010010110101010101001011010101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
12. Variable: 100101101010011010010110101001 (0x25A9A5A9) | Full: 010010110101001101001011010100110010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)

# speed 6
13. Variable: 100110101010101010011010101010 (0x26AAA6AA) | Full: 010011010101010101001101010101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
14. Variable: 100110101010011010011010101001 (0x26A9A6A9) | Full: 010011010101001101001101010100110010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)

# power
15. Variable: 011001101010101001100110101010 (0x19AA99AA) | Full: 001100110101010100110011010101010010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        
16. Variable: 011001101010011001100110101001 (0x19A999A9) | Full: 001100110101001100110011010100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# 1h timer
17. Variable: 010110011010101001011001101010 (0x166A966A) | Full: 001011001101010100101100110101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
18. Variable: 010110011010011001011001101001 (0x16699669) | Full: 001011001101001100101100110100110010101100110101010011010010110100101011001101010 - 11 occurrences (4.0%)        

# 4h timer
19. Variable: 100110011010101010011001101010 (0x266AA66A) | Full: 010011001101010101001100110101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
20. Variable: 100110011010011010011001101001 (0x2669A669) | Full: 010011001101001101001100110100110010101100110101010011010010110100101011001101010 - 11 occurrences (4.0%)        

# 8h timer
21. Variable: 011010011010101001101001101010 (0x1A6A9A6A) | Full: 001101001101010100110100110101010010101100110101010011010010110100101011001101010 - 9 occurrences (3.3%)
22. Variable: 011010011010011001101001101001 (0x1A699A69) | Full: 001101001101001100110100110100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# light
23. Variable: 011001011010101001100101101010 (0x196A996A) | Full: 001100101101010100110010110101010010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        
24. Variable: 011001011010011001100101101001 (0x19699969) | Full: 001100101101001100110010110100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# speed cycle
25. Variable: 011010100110101001101010011010 (0x1A9A9A9A) | Full: 001101010011010100110101001101010010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        
26. Variable: 011010100110011001101010011001 (0x1A999A99) | Full: 001101010011001100110101001100110010101100110101010011010010110100101011001101010 - 10 occurrences (3.6%)        

# away
27. Variable: 101010100110101010101010011010 (0x2A9AAA9A) | Full: 010101010011010101010101001101010010101100110101010011010010110100101011001101010 - 12 occurrences (4.3%)        
28. Variable: 101010100110011010101010011001 (0x2A99AA99) | Full: 010101010011001101010101001100110010101100110101010011010010110100101011001101010 - 12 occurrences (4.3%)   

and raw dumps:

[19:29:12][I][remote.raw:041]: Received Raw: 79
[19:29:12][I][remote.raw:028]: Received Raw: 350, -825, 318, -852, 331, -845, 903, -278, 308, -856, 902, -281, 891, -285, 887, -285, 300, -873, 304, -874, 886, -283, 880, -297, 297, -877, 292, -876, 882, -295, 297, -878, 292, -875, 301, -875, 301, -874, 886, -283, 301, -874, 885, 
[19:29:12][I][remote.raw:041]:   -293, 880, -289, 879, -300, 292, -882, 288, -877, 298, -879, 298, -876, 303, -863, 304, -871, 306, -870, 888, -290, 294, -875, 304, -870, 306, -870, 297, -871, 308, -867, 306, -870, 298, -869, 893, -285, 295
[19:29:12][I][remote.raw:028]: Received Raw: 314, -862, 309, -857, 320, -859, 894, -285, 297, -869, 892, -287, 885, -292, 882, -291, 294, -877, 301, -874, 886, -284, 881, -296, 299, -877, 289, -877, 883, -295, 297, -876, 291, -877, 301, -875, 302, -873, 886, -283, 300, -875, 885, 
[19:29:12][I][remote.raw:041]:   -293, 880, -290, 877, -300, 292, -875, 295, -880, 297, -877, 302, -872, 295, -873, 304, -873, 302, -873, 886, -284, 300, -874, 303, -873, 295, -872, 305, -869, 308, -872, 298, -867, 308, -867, 890, -288, 297
[19:29:12][I][remote.raw:028]: Received Raw: 308, -860, 315, -861, 314, -862, 895, -275, 309, -867, 891, -287, 888, -282, 891, -286, 298, -877, 300, -875, 887, -282, 882, -297, 294, -880, 290, -877, 882, -296, 297, -877, 292, -875, 302, -872, 304, -871, 890, -280, 305, -871, 886, 
[19:29:12][I][remote.raw:041]:   -290, 884, -288, 879, -297, 294, -879, 291, -876, 302, -875, 300, -875, 295, -872, 303, -872, 306, -870, 888, -283, 300, -875, 303, -870, 298, -871, 305, -871, 306, -869, 300, -868, 307, -869, 891, -286, 299
[19:29:12][I][remote.raw:028]: Received Raw: 316, -852, 312, -866, 313, -860, 898, -273, 309, -867, 891, -285, 890, -283, 882, -295, 297, -878, 291, -875, 884, -293, 883, -297, 286, -879, 298, -877, 882, -297, 287, -878, 299, -877, 301, -873, 294, -874, 886, -293, 299, -874, 886, 
[19:29:12][I][remote.raw:041]:   -283, 883, -297, 878, -299, 283, -883, 296, -879, 297, -877, 294, -873, 302, -874, 303, -872, 298, -869, 887, -291, 301, -874, 296, -870, 307, -869, 307, -869, 300, -867, 308, -866, 312, -864, 893, -280, 304
[19:29:12][I][remote.raw:028]: Received Raw: 316, -860, 313, -862, 318, -851, 903, -275, 310, -865, 892, -280, 893, -284, 882, -296, 288, -879, 297, -878, 884, -292, 881, -291, 294, -879, 297, -880, 880, -289, 294, -879, 299, -877, 293, -874, 302, -873, 886, -292, 292, -872, 886, 
[19:29:12][I][remote.raw:041]:   -294, 882, -295, 880, -291, 293, -881, 296, -878, 290, -877, 302, -872, 304, -874, 303, -862, 305, -870, 889, -291, 300, -865, 304, -872, 305, -871, 305, -864, 304, -870, 309, -866, 312, -863, 890
[19:29:12][I][remote.raw:041]: Received Raw: 2315, -3922
[19:29:12][I][remote.raw:041]: Received Raw: 
[19:29:12][I][remote.raw:028]: Received Raw: 55, -122, 113, -182, 67, -89, 128, -253, 337, -844, 331, -841, 331, -841, 904, -276, 313, -863, 896, -276, 888, -289, 886, -292, 291, -875, 303, -873, 884, -286, 888, -290, 295, -879, 299, -867, 892, -286, 297, -879, 298, -867, 303, -873, 
[19:29:12][I][remote.raw:041]:   304, -873, 884, -284, 301, -875, 884, -294, 881, -287, 878, -301, 291, -883, 877, -291, 294, -880, 298, -876, 292, -875, 303, -873, 302, -864, 896, -282, 303, -874, 883, -287, 298, -877, 300, -874, 294, -872, 308, -868, 306, -870, 888, -282, 303
[19:29:12][I][remote.raw:028]: Received Raw: 312, -863, 314, -862, 303, -867, 893, -285, 305, -868, 892, -279, 885, -292, 883, -297, 289, -877, 300, -874, 884, -287, 888, -290, 292, -881, 288, -880, 889, -288, 295, -879, 292, -876, 301, -874, 301, -873, 887, -282, 301, -878, 881, 
[19:29:12][I][remote.raw:041]:   -295, 879, -290, 878, -299, 293, -881, 878, -293, 293, -880, 295, -880, 290, -877, 300, -873, 304, -873, 887, -283, 300, -875, 884, -286, 298, -877, 305, -868, 295, -874, 303, -872, 304, -871, 887, -283, 302
[19:29:12][I][remote.raw:028]: Received Raw: 319, -857, 315, -861, 306, -862, 895, -281, 311, -865, 894, -276, 890, -290, 885, -284, 298, -878, 298, -877, 882, -287, 880, -298, 294, -879, 292, -878, 880, -296, 295, -871, 300, -875, 302, -874, 304, -862, 888, -290, 300, -875, 888, 
[19:29:12][I][remote.raw:041]:   -283, 880, -298, 877, -298, 285, -883, 886, -292, 291, -882, 289, -878, 299, -874, 302, -875, 294, -873, 887, -292, 299, -867, 891, -287, 297, -878, 291, -875, 302, -873, 305, -868, 300, -870, 888, -290, 303
[19:29:12][I][remote.raw:028]: Received Raw: 316, -861, 313, -855, 314, -863, 894, -283, 301, -867, 894, -283, 888, -290, 884, -288, 296, -878, 298, -875, 886, -286, 880, -297, 294, -873, 297, -877, 882, -296, 289, -879, 296, -877, 301, -875, 294, -872, 887, -290, 301, -875, 885, 
[19:29:12][I][remote.raw:041]:   -284, 882, -298, 876, -291, 295, -881, 877, -300, 284, -882, 295, -880, 297, -879, 291, -875, 301, -874, 886, -291, 293, -875, 884, -294, 298, -877, 291, -875, 303, -874, 302, -863, 305, -871, 889, -289, 295
[19:29:12][I][remote.raw:028]: Received Raw: 302, -866, 313, -863, 314, -862, 894, -276, 307, -867, 891, -290, 884, -284, 883, -296, 288, -878, 299, -876, 883, -295, 880, -289, 294, -880, 297, -879, 881, -286, 297, -881, 297, -878, 291, -875, 302, -872, 885, -285, 302, -872, 887, 
[19:29:12][I][remote.raw:041]:   -289, 885, -288, 879, -298, 292, -883, 877, -292, 293, -882, 296, -879, 289, -876, 302, -875, 300, -866, 887, -291, 300, -875, 884, -285, 298, -878, 300, -874, 296, -871, 306, -870, 304, -864, 897
[19:29:12][I][remote.raw:041]: Received Raw: 

I conducted further reverse engineering on the protocol and successfully created an ESPHome external component that decodes and encodes Lucci Air signals. Lucci Air customer support has contacted the factory producing the fan (in my case, Whitehaven with the same FT0317A remote). Hopefully, they will shed some more light on how the signal is structured, but for now, I am content with what has been achieved. Below is a link to my repository for anyone else attempting the same challenge.

Note: you must set remote_receivers idle time to approximately 4500μs to properly split the 5 repeated signals.