Finding IR codes for an automated projector screen

I use esphome’s remote_receiver and remote_transmitter components in a few places in my house. But one device has me pulling my hair out.

It’s an automated projector screen , which advertises compatibility with any universal remote control over IR 28k or RC 433Mhz. The receiver device has model TP-05RF/IR, though that hasn’t helped in my searching.

I long ago gave up on the detected pronto codes and moved to raw.

  • I captured codes with the IR receiver taped to the remote’s transmitter, and the pair of them inside a toilet paper tube.
  • my IR transmitter is powered from the ESP32’s 5v input line, and it is taped to the projector’s IR receiver.
  • I have replayed recorded sequences from all 4 possible combinations of inverted: true and mode: INPUT_PULLUP or not.

The device still doesn’t respond. Any advice?

esphome:
  name: esphome-web-326610
  friendly_name: ir-tester

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable Home Assistant API
api:
  encryption:
    key: "wouldnt-you-like-to-know"

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:
  level: VERBOSE

remote_receiver:
  pin:
    number: GPIO23
    inverted: false
  dump: raw

remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%

button:
  - platform: template
    name: "inverted false, normal mode"
    on_press:
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-877, 2692, -878, 2690, -882, 2688, -881, 2688, -883, 2687, -884, 2661, -935, 2584, -986, 822, -132, 1576, -175, 1585, -199, 1563, -249, 1511, -270, 1487, -1136, 405, -507, 1520, -265, 1542, -210]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-157, 1631, -1026, 2622, -946, 2704, -863, 2787, -786, 2890, -627]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-389, 3104, -468, 3051, -520, 3049, -521]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-574 ]
  - platform: template
    name: "inverted false, input_pullup"
    on_press:
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-933, 2614, -982, 2562, -1037, 769, -135, 1576, -1087, 721, -75, 1633, -1139, 545, -290, 1481, -1223, 408, -450, 1336, -1373, 705, -180, 1606, -1052, 810, -88, 8892, -916]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-838, 2733, -838, 2733, -839, 2732, -838, 2708, -863, 2708, -863, 2707, -864, 2707, -863, 9848, -864]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-889, 2683, -888, 2708, -864, 2707, -864, 2682, -889, 2682, -889, 2683, -888, 2683, -889, 9822, -889]
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38kHz
          code: [-889, 2682, -889, 2682, -889, 2682, -889, 2681, -889, 2683, -888, 2682, -889, 2682, -889, 9822, -889]

  - platform: template
    name: "inverted true, input_pullup"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [ 930, -2639, 933, -2637, 934, -2636, 934, -2635, 958, -2593, 979, -2584, 1012, -773, 143, -1571, 1083, -722, 106, -1602, 218, -1544, 242, -1538, 245, -1491, 267, -1481, 1219, -409, 451, -1334, 451, -1545, 261 ]
          carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
          code: [ 179, -1632, 1026, -2623, 944, -2706, 864, -2786, 759 ]
          carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
          code: [ 441, -3076, 494, -3024, 546, -2998, 573, -2971, 599 ]
          carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
          code: [ 652 ]
          carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
          code: [ 734, -2811, 784, -2786, 785, -2785, 786, -2758, 812, -2758, 813, -2757, 812, -2758, 813, -9872, 837 ]
          carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
          code: [ 863, -2707, 863, -2707, 864, -2682, 888, -2682, 888, -2682, 889, -2681, 888, -2682, 888, -9821, 888 ]
          carrier_frequency: 38kHz
  - platform: template
    name: "inverted true, normal mode"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [ 932, -2638, 930, -2639, 934, -2636, 933, -2637, 934, -2615, 956, -852, 84, -1677, 957, -851, 94, -1667, 958, -851, 96, -1662, 141, -1644, 142, -1642, 142, -1643, 140, -1647, 985, -804, 136, -1623, 69, -1712, 64 ]
      - remote_transmitter.transmit_raw:
          code: [ 87, -1679, 1015, -793, 140, -1618, 1037, -2481, 1087, -721, 79, -1629, 1139, -594, 267, -1458, 1221, -407, 433, -1352, 1375, -412, 448, -1549, 1135, -759, 154, -1656, 999, -9844, 865 ]
      - remote_transmitter.transmit_raw:
          code: [ 787, -2758, 812, -2758, 813, -2758, 813, -2758, 813, -2733, 838, -2732, 839, -2731, 840, -9871, 839 ]
      - remote_transmitter.transmit_raw:
          code: [ 889, -2681, 889, -2682, 889, -2681, 890, -2680, 890, -2681, 890, -2656, 915, -2656, 914, -9820, 891 ]
      - remote_transmitter.transmit_raw:
          code: [ 890, -2656, 915, -2681, 890, -2681, 891, -2758, 786, -2970, 338 ]
      - remote_transmitter.transmit_raw:
          code: [ 258, -3051, 520, -2997, 574, -2997, 573, -2971, 600, -2943, 627, -2918, 652 ]
      - remote_transmitter.transmit_raw:
          code: [ 679 ]
      - remote_transmitter.transmit_raw:
          code: [ 760, -2795, 800, -2760, 812, -2759, 812, -2759, 812, -2759, 813, -2733, 838, -2732, 839, -9872, 839 ]
      - remote_transmitter.transmit_raw:
          code: [ 864, -2682, 889, -2681, 889, -2680, 890, -2680, 890, -2680, 890, -2680, 891, -2656, 915, -9795, 915 ]
      - remote_transmitter.transmit_raw:
          code: [ 916, -2656, 914, -2657, 914, -2681, 891, -2759, 785, -2919, 512 ]
      - remote_transmitter.transmit_raw:
          code: [ 520, -3025, 547, -2998, 574, -2945, 626, -2944, 628, -2919, 677, -2894, 677 ]
      - remote_transmitter.transmit_raw:
          code: [ 677 ]
      - remote_transmitter.transmit_raw:
          code: [ 805, -2766, 810, -2760, 812, -2759, 812, -2758, 813, -2733, 839, -2732, 839, -2732, 839, -9871, 839 ]
      - remote_transmitter.transmit_raw:
          code: [ 865, -2681, 889, -2681, 890, -2681, 890, -2681, 890, -2680, 891, -2656, 915, -2656, 915, -9795, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 915, -2656, 915, -2655, 916, -2680, 891, -2759, 786, -2917, 543 ]
      - remote_transmitter.transmit_raw:
          code: [ 546, -3023, 548, -2971, 600, -2945, 625, -2945, 626, -2918, 678, -2892, 680 ]
      - remote_transmitter.transmit_raw:
          code: [ 680 ]
      - remote_transmitter.transmit_raw:
          code: [ 788, -2782, 811, -2759, 812, -2759, 812, -2734, 837, -2733, 839, -2732, 839, -2732, 839, -9872, 840 ]
      - remote_transmitter.transmit_raw:
          code: [ 889, -2681, 890, -2680, 890, -2681, 890, -2656, 914, -2680, 891, -2655, 916, -2655, 915, -9794, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 915, -2656, 915, -2656, 916, -2681, 891, -2758, 787, -2918, 586 ]
      - remote_transmitter.transmit_raw:
          code: [ 521, -2997, 574, -2970, 601, -2944, 626, -2918, 653, -2920, 654, -2915, 679 ]
      - remote_transmitter.transmit_raw:
          code: [ 679 ]
      - remote_transmitter.transmit_raw:
          code: [ 785, -2760, 812, -2759, 812, -2733, 838, -2733, 839, -2732, 839, -2731, 840, -2732, 839, -9871, 840 ]
      - remote_transmitter.transmit_raw:
          code: [ 889, -2681, 890, -2681, 890, -2681, 890, -2681, 890, -2656, 915, -2656, 915, -2654, 917, -9794, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 915, -2656, 915, -2655, 916, -2681, 891, -2734, 811, -2916, 546 ]
      - remote_transmitter.transmit_raw:
          code: [ 573, -2971, 600, -2971, 601, -2944, 626, -2918, 654, -2917, 679, -2867, 705, -9980, 732 ]
      - remote_transmitter.transmit_raw:
          code: [ 812, -2758, 812, -2759, 813, -2734, 837, -2733, 839, -2732, 839, -2732, 839, -2732, 839, -9847, 864 ]
      - remote_transmitter.transmit_raw:
          code: [ 890, -2680, 890, -2681, 890, -2681, 891, -2656, 915, -2656, 914, -2656, 915, -2655, 916, -9796, 915 ]
      - remote_transmitter.transmit_raw:
          code: [ 916, -2655, 916, -2656, 915, -2675, 897, -2734, 811, -2892, 650 ]
      - remote_transmitter.transmit_raw:
          code: [ 574, -2944, 627, -2944, 627, -2917, 654, -2917, 679, -2866, 705, -2866, 705 ]
      - remote_transmitter.transmit_raw:
          code: [ 705 ]
      - remote_transmitter.transmit_raw:
          code: [ 811, -2759, 813, -2733, 837, -2733, 839, -2732, 838, -2733, 839, -2731, 839, -2707, 864, -9847, 864 ]
      - remote_transmitter.transmit_raw:
          code: [ 891, -2680, 890, -2681, 890, -2656, 915, -2655, 916, -2656, 915, -2655, 915, -2656, 916, -9795, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 916, -2655, 916, -2655, 916, -2656, 915, -2734, 811, -2891, 652 ]
      - remote_transmitter.transmit_raw:
          code: [ 599, -2972, 600, -2944, 626, -2919, 653, -2917, 679, -2866, 705, -2865, 705, -9980, 732 ]
      - remote_transmitter.transmit_raw:
          code: [ 812, -2733, 837, -2733, 838, -2732, 839, -2732, 839, -2732, 838, -2732, 840, -2706, 864, -9846, 865 ]
      - remote_transmitter.transmit_raw:
          code: [ 891, -2681, 890, -2656, 915, -2657, 915, -2655, 916, -2655, 916, -2656, 916, -2655, 916, -9796, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 915, -2656, 915, -2655, 915, -2656, 916, -2732, 812, -2890, 652 ]
      - remote_transmitter.transmit_raw:
          code: [ 309, -3052, 520, -2998, 573 ]
      - remote_transmitter.transmit_raw:
          code: [ 626 ]
      - remote_transmitter.transmit_raw:
          code: [ 734, -2812, 759, -2811, 760, -2811, 760, -2786, 785, -2786, 785, -2784, 811, -2760, 812, -9875, 837 ]
      - remote_transmitter.transmit_raw:
          code: [ 864, -2706, 865, -2681, 890, -2681, 889, -2681, 890, -2681, 890, -2681, 890, -2681, 890, -9821, 890 ]
      - remote_transmitter.transmit_raw:
          code: [ 905, -2655, 915, -2656, 915, -2656, 916, -2733, 812, -2890, 651 ]
      - remote_transmitter.transmit_raw:
          code: [ 122, -3130, 442, -3025, 546 ]
      - remote_transmitter.transmit_raw:
          code: [ 600 ]
      - remote_transmitter.transmit_raw:
          code: [ 733, -2812, 759, -2811, 760, -2811, 759, -2786, 785, -2785, 786, -2785, 786, -2784, 811, -9874, 837 ]
      - remote_transmitter.transmit_raw:
          code: [ 864, -2706, 865, -2704, 866, -2681, 889, -2680, 890, -2680, 891, -2680, 890, -2681, 890, -9821, 890 ]
      - remote_transmitter.transmit_raw:
          code: [ 890, -2656, 915, -2655, 916, -2655, 917, -2732, 812, -2891, 651 ]
      - remote_transmitter.transmit_raw:
          code: [ 600, -2971, 600, -2943, 627, -2935, 636, -2918, 663, -2881, 705, -2865, 705 ]
      - remote_transmitter.transmit_raw:
          code: [ 705 ]
      - remote_transmitter.transmit_raw:
          code: [ 811, -2733, 838, -2733, 837, -2732, 839, -2732, 838, -2732, 839, -2707, 864, -2705, 865, -9845, 864 ]
      - remote_transmitter.transmit_raw:
          code: [ 890, -2681, 890, -2656, 914, -2656, 915, -2656, 914, -2656, 915, -2656, 915, -2655, 916, -9794, 916 ]
      - remote_transmitter.transmit_raw:
          code: [ 917, -2654, 916, -2655, 916, -2656, 916, -2733, 812, -2891, 651 ]
      - remote_transmitter.transmit_raw:
          code: [ 468, -3024, 547, -3023, 547 ]
      - remote_transmitter.transmit_raw:
          code: [ 626 ]
      - remote_transmitter.transmit_raw:
          code: [ 733, -2812, 759, -2811, 760, -2786, 784, -2785, 786, -2785, 786, -2784, 811, -2759, 812, -9898, 812 ]
      - remote_transmitter.transmit_raw:
          code: [ 864, -2706, 865, -2681, 889, -2681, 889, -2681, 890, -2681, 890, -2680, 891, -2680, 890, -9820, 890 ]

Do you have a IR remote around that has the ‘learning’ function? You might try seeing if it can record the sender. Then if it can, try recording the raw signal from the copy.

I’ve used this software to get down in the weeds of IR, it is a good tool to have in your quiver if you go down the Infrared rabbit hole much

FYI, you reference ‘IR 28k’ at the top of your post, however your YAML has 38kHz, not sure if that is significant or not.

Good hunting!

Awesome I.will give that a try!

And nice catch on the 28k… it was only a typo though.

While I wait on the registration code for AnalysIR, I tried copying the remote with my FlipperZero. No problem at all, the copy works fine. Here’s how FlipperZero records the “down” button:

name: Down
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 560 1223 1457 331 558 1223 1513 330 503 1223 1457 332 556 1223 1404 408 480 1278 1428 382 507 1254 1452 357 504 1280 1400 385 503 1282 1399 385 503 1281 503 1281 503 1281 503 1281 503 1282 1399 385 503 1281 503 1278 503 13283 503 1282 1399 385 503 1282 1399 385 503 1282 1399 385 504 1282 1399 385 504 1282 1398 386 503 1282 1399 386 503 1282 1398 386 503 1282 1398 386 503 1282 502 1282 502 1282 502 1282 502 1282 1399 386 503 1282 502 1278 503
# 

I adjusted the carrier_duty_percent value to 33%, and re-recorded the signal from the FlipperZero. Here’s what my receiver picks up:

[13:06:41][I][remote.raw:028]: Received Raw: 562, -1200, 1457, -333, 562, -1201, 1509, -332, 509, -1202, 1457, -332, 589, -1175, 1403, -412, 490, -1273, 1430, -385, 510, -1253, 1457, -359, 509, -1280, 1404, -386, 509, -1280, 1428, -360, 510, -1280, 509, -1280, 530, -1260, 534, -1255, 
[13:06:41][I][remote.raw:041]:   509, -1280, 1413, -376, 510, -1280, 510, -1279, 509
[13:06:41][I][remote.raw:028]: Received Raw: 509, -1281, 1403, -385, 534, -1256, 1404, -385, 509, -1280, 1405, -385, 509, -1280, 1404, -386, 508, -1280, 1403, -387, 507, -1282, 1402, -388, 507, -1282, 1401, -389, 505, -1283, 1400, -390, 505, -1284, 505, -1285, 504, -1286, 503, -1286, 
[13:06:41][I][remote.raw:041]:   503, -1287, 1397, -392, 502, -1308, 481, -1308, 481, -8509, 132

But playing this back also doesn’t trigger the projector.

Finally I manually entered the data from the FlipperZero’s save and IT WORKED. I couldn’t tell you why. Why are the signals recorded by the ESP’s own IR receiver off by so much? Why are they accurate enough to work with other electronics? I am full of questions but at least it works.

Hope this helps someone else on here - when in doubt, record the IR codes on a different device and compare.

2 Likes

Not an uncommon experience I think. I’ve found using high quality hardware for learning codes helps (good ESP32, power supply, cables, soldering).

interesting. I learned with two different chips, first a nodemcu ESP32 wroom32, then later with a d1 mini. Both have otherwise been fine for me, except the D1 has that awful CH340 USB serial chip (which as far as I’m concerned we should airdrop on our enemies in times of war). But the IR receivers are KY-022s, little crappy guys from Amazon. If I was to guess that’s where I’d pin the problem. Also clearly the projector screen was way more finicky about code precision than the other devices I have. Or maybe it’s just because raw codes have to be way more precise.

Anyway it’s nice to know that I can capture with the flipper and easily convert to ESPHome raw. So I have that going for me, which is nice.

Thank you again for your help!

1 Like

Maybe the projector receiver has some settings similar to this which are more rigid?

tolerance (Optional, int): The percentage that the remote signal lengths can deviate in the decoding process. Defaults to 25%.

I thought about that, but I (mis-)remembered that it was a transmission setting. Anyway I’m officially putting this in “don’t ever touch again” mode. :slight_smile:

1 Like