Anyone have any insight into transmitting IR codes? I have a set of codes that doesn't work

All my other systems all work perfectly. But I have this older Pioneer VSX819H that is baffling me a little bit. I have captured the codes repeatedly. The stock remote, when sending the power on sends this:

[19:44:33][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 014A 00A5 0016 003C 0016 0014 0016 003C 0017 0013 0016 0014 0015 003E 0016 0014 0016 003D 0016 0014 0016 003D 0016 0014 0016 003D 0016 003D 0016 0014 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D
[19:44:33][D][remote.pronto:240]: 0016 003D 0016 0014 0016 0014 0016 0014 0017 003C 0016 003D 0016 0014 0016 0014 0017 0013 0016 003D 0016 003D 0016 003D 0016 06C3
[19:44:33][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 014A 00A5 0016 003D 0016 0014 0016 003D 0016 0014 0015 0014 0016 003D 0016 0014 0016 003D 0016 0014 0016 003D 0016 0014 0016 003D 0016 003D 0016 0014 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D
[19:44:33][D][remote.pronto:240]: 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D 0016 0014 0016 0014 0015 0014 0016 003D 0016 003D 0016 003D 0016 06C3
[19:44:33][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 014A 00A5 0016 003D 0016 0014 0016 003D 0016 0014 0016 0014 0015 003D 0016 0014 0016 003D 0016 0015 0015 003D 0016 0014 0016 003D 0015 003E 0016 0014 0016 003D 0016 0014 0016 0014 0015 0015 0016 003D 0016 003D
[19:44:33][D][remote.pronto:240]: 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D 0016 003D 0016 06C3
[19:44:33][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 014A 00A5 0016 003D 0017 0013 0015 003D 0016 0015 0013 0016 0015 003D 0016 0014 0016 003D 0016 0014 0016 003D 0016 0014 0016 003D 0016 003D 0016 0014 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D
[19:44:33][D][remote.pronto:240]: 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D 0016 0014 0016 0014 0016 0014 0016 003D 0016 003D 0016 003D 0016 06C3

It seems like it sends several messages. Normally I’m able to just join those together and it works. But these are giving me grief. Maybe I’m doing something wrong and I’m hoping someone can give me a hand understanding this. My yaml doc basically looks like this:

remote_transmitter:
  pin: GPIO22
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: Pioneer TV On
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "[the IR codes]"
  

You might be dealing with variable length IR codes (Google that for more info), making it hard to capture codes correctly, but looks like it’s working if you conctenate your snippets manually if I understood you correctly.

IR isn’t really standardised, unfortunately. Have you tried or compared against the codes from an online IR database, if available?

I don’t have experience with ESPHome’s IR transmitter specifically, but maybe tweaking rmt_symbols could help?

I’ve encountered something like this before and I tested combining the strings, but also removing a few characters at the end of each string. Took a few tests, but I managed to concoct a pronto code that worked. Thankfully, I’ve since switched to zigbee IR blasters which use raw code capture/transmission and it’s WAY more reliable, at least in my experience.

1 Like

Set the receiver parameters:

dump: raw
idle: 32ms
filter: 100us
buffer_size: 10kb

and post the log from button press.

Thanks for that tip on updating the receiver. That config now looks like this:

remote_receiver:
  pin: GPIO23
  # dump: all
  dump: raw
  idle: 32ms
  filter: 100us
  buffer_size: 10kb

It produced this output:

[13:43:54][D][remote.raw:028]: Received Raw: -8602, 4268, -576, 1561, -576, 501, -574, 1562, -576, 500, -574, 503, -569, 1564, -575, 502, -574, 1561, -577, 501, -572, 1562, -577, 501, -573, 1562, -577, 1561, -576, 500, -574, 1562, -576, 501, -573, 501, -575, 499, -575, 1561, -576, 
[13:43:54][D][remote.raw:028]:   1563, -575, 1563, -576, 501, -572, 528, -546, 500, -576, 1561, -575, 1563, -577, 499, -576, 500, -573, 500, -575, 1560, -576, 1565, -573, 1562, -576, 25764, -8604, 4266, -576, 1561, -578, 500, -574, 1562, -576, 500, -573, 502, -574, 1562, -576, 500, 
[13:43:54][D][remote.raw:028]:   -573, 1562, -576, 501, -573, 1562, -577, 500, -574, 1562, -576, 1562, -575, 501, -574, 1562, -576, 500, -574, 502, -572, 502, -573, 1561, -577, 1562, -577, 1560, -577, 500, -574, 502, -574, 500, -573, 1562, -575, 1562, -577, 501, -573, 501, -574, 500, 
[13:43:54][D][remote.raw:028]:   -575, 1561, -575, 1562, -577, 1562, -603, 25736, -8601, 4269, -578, 1560, -578, 499, -575, 1560, -577, 502, -573, 500, -574, 1561, -577, 499, -577, 1559, -577, 500, -574, 1562, -575, 502, -572, 1563, -576, 1561, -576, 500, -573, 1564, -576, 500, -573, 
[13:43:54][D][remote.raw:028]:   503, -572, 502, -574, 1562, -573, 1563, -575, 1563, -577, 501, -571, 504, -571, 503, -571, 1564, -575, 1563, -573, 503, -572, 502, -572, 503, -571, 1565, -574, 1565, -573, 1563, -575, 25765, -8601, 4270, -573, 1564, -575, 503, -545, 1590, -574, 503, 
[13:43:54][D][remote.raw:028]:   -571, 504, -571, 1563, -575, 502, -571, 1565, -573, 503, -572, 1565, -573, 502, -573, 1563, -574, 1564, -572, 504, -571, 1564, -575, 502, -573, 502, -572, 503, -572, 1564, -574, 1563, -575, 1563, -576, 501, -573, 501, -572, 503, -571, 1564, -549, 1589, 
[13:43:54][D][remote.raw:041]:   -573, 502, -572, 504, -569, 505, -574, 1562, -549, 1589, -576, 1561, -575

That’s nice clean output. 32 bit NEC signal but inverted, repeated 4 times with 25ms gap between.
I’m quite confident that your receiver can decode it as NEC with parameters like this:

remote_receiver:
  pin:
    number: GPIO23
    inverted: true
  dump: nec
  tolerance: 30%
  idle: 10ms
  filter: 100us

Alternatively, you could simply use the raw and resend it:

button:
  - platform: template
    name: "Remote Command"
    on_press:
      - remote_transmitter.transmit_raw:
          # Flipped polarities
          code: [
            8602, -4268, 576, -1561, 576, -501, 574, -1562, 576, -500, 
            574, -503, 569, -1564, 575, -502, 574, -1561, 577, -501, 
            572, -1562, 577, -501, 573, -1562, 577, -1561, 576, -500, 
            574, -1562, 576, -501, 573, -501, 575, -499, 575, -1561, 
            576, -1563, 575, -1563, 576, -501, 572, -528, 546, -500, 
            576, -1561, 575, -1563, 577, -499, 576, -500, 573, -500, 
            575, -1560, 576, -1565, 573, -1562, 576
          ]
          repeat:
            times: 4 
            wait_time: 25ms
          carrier_frequency: 38kHz
2 Likes

Perfect, really appreciate it. The raw retransmit works perfectly and works fine for me.

But I have a quick question - when you say ‘inverted’ is that just simple as flipping the negative and positive values?

I also forgot that there is a Pioneer protocol in the IR trasnmitter/receiver library. So I switched to that and it works like a charm.

Yes, just polarity swapped.
Pioneer uses same timings as nec, matching perfectly.