ESP32 IR Pronto transmit not being accepted on device

I’m attempting to setup my first IR device, using an ESP32. i’ve connected an IR receiver and got the “brightness down” command as follows from the original remote. This is with holding the button down:

|20:45:25|[I]|[remote.pronto:231]|Received Pronto: data=|
| --- | --- | --- | --- |
|20:45:25|[I]|[remote.pronto:233]|0000 006D 0022 0000 015D 00AE 0017 0015 0017 0015 0016 0015 0017 003F 0018 0015 0017 003F 0019 0014 0017 003F 0019 0014 0018 003F 001A 003E 001A 003E 001A 003E 001A 0013 0019 003E 001A 003E 001A 003E 0019 0013 0018 003E 0019 003E|
|20:45:25|[I]|[remote.pronto:233]|0019 0013 0018 0013 0018 0013 0018 0013 0018 0013 0018 003E 0019 0014 0018 0014 0018 003E 0018 003F 0019 003E 0018 003F 0018 0181|
|20:45:25|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:25|[I]|[remote.pronto:233]|0000 006D 0002 0000 015E 0056 0018 0181|
|20:45:25|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015E 0056 0018 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0055 0018 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 001A 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 001A 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:26|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:26|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:27|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:27|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:27|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:27|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:27|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:27|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 0019 0181|
|20:45:27|[I]|[remote.pronto:231]|Received Pronto: data=|
|20:45:27|[I]|[remote.pronto:233]|0000 006D 0002 0000 015F 0054 001A 0181|

my ESP config, with multiple data strings for testing:

remote_receiver:
  pin: GPIO13
  dump: all

remote_transmitter:
  pin: GPIO12
  carrier_duty_percent: 50%
button
  - platform: template
    name: brightnessDown4
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 015F 00AC 0017 0015 0017 0015 0017 0015 0017 0041 0016 0015 0017 0041 0016 0015 0017 0042 0016 0015 0017 0041 0016 0041 0016 0041 0016 0041 0016 0015 0017 0042 0016 0041 0016 0041 0016 0015 0017 0041 0016 0041 0016 0015 0017 0015 0017 0015 0017 0015 0017 0015 0017 0041 0016 0015 0017 0015 0017 0041 0016 0041 0016 0041 0016 0041 0016 0181"
          # repeat: 
          #   times: 2
          #   wait_time: 0s

  - platform: template
    name: brightnessDown5
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 015F 00AC 0017 0015 0017 0015 0017 0015 0017 0041 0016 0015 0017 0041 0016 0015 0017 0042 0016 0015 0017 0041 0016 0041 0016 0041 0016 0041 0016 0015 0017 0042 0016 0041 0016 0041 0016 0015 0017 0041 0016 0041 0016 0015 0017 0015 0017 0015 0017 0015 0017 0015 0017 0041 0016 0015 0017 0015 0017 0041 0016 0041 0016 0041 0016 0041 0016 0181 0000 006D 0002 0000 0004 0006 0009 0181"
          # repeat: 
          #   times: 2
          #   wait_time: 0s

the transmitter activity LED appears to flicker so ESP does appear to be sending the code but theres no change on the device.

button pressed via the ESP32 webui shows the following in the log:

20:51:56	[D]	[button:010]	
'brightnessDown4' Pressed.
20:51:56	[D]	[remote.pronto:101]	
Send Pronto: frequency=38kHz
20:51:56	[D]	[remote.pronto:106]	
Send Pronto: intros=68
20:51:56	[D]	[remote.pronto:107]	
Send Pronto: repeats=0
20:51:56	[W]	[component:237]	
Component web_server took a long time for an operation (181 ms).
20:51:56	[W]	[component:238]	
Components should block for at most 30 ms.

i assume i’ve not understood something correctly or missed something but re-reading things to confirm hasnt highlighted anything wrong.
How do i figure out whats wrong?

I recently went down the Pronto code rabbit hole and successfully came out the other side. Was for RF signals not IR but principles are similar. From your receive data it looks like there is one data string sent to begin with (like a wake up code) followed by a continuous set of data codes for ‘brightness down’ until button release to stop.

I would try two transmit pronto actions for one on_press.
First transmit, using the 0000 006D 0022 0000 (22 pairs) ending with 0181, with repeat=1 wait_time=0.
Then another transmit using 0000 006D 0002 0000 015F 0054 0019 0181 with repeat=10 , wait_time=0

to see what happens?

For my case, I have a remote for a Louvre opening and it is similar problem with trying to mimic a ‘button hold down’ and stop function when release. It either floods the Louvre system with transmit codes or if I slow down the rate Im sending the code it goes into a stop, start, stop stutter scenario !

Anyway good luck

this is weird… i’ve tried brightness down on the original remote again and i’m seeing new data with JVC, LG and NEC codes, along with the pronto code i was getting yesterday. this is a short single click button press:

...
19:25:56	[I]	[remote.jvc:049]	
Received JVC: data=0x157B
19:25:56	[I]	[remote.lg:054]	
Received LG: data=0x157BB04F, nbits=32
19:25:56	[I]	[remote.nec:098]	
Received NEC: address=0xDEA8, command=0xF20D command_repeats=1
19:25:56	[I]	[remote.pronto:231]	
Received Pronto: data=
19:25:56	[I]	[remote.pronto:233]	
0000 006D 0022 0000 015B 00AF 0015 0016 0015 0016 0015 0016 0015 0043 0015 0016 0015 0043 0015 0016 0015 0043 0015 0016 0015 0043 0015 0043 0015 0043 0015 0043 0015 0016 0015 0043 0015 0043 0015 0043 0015 0016 0015 0043 0015 0043 
19:25:56	[I]	[remote.pronto:233]	
0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0043 0015 0016 0015 0016 0015 0043 0015 0043 0015 0043 0015 0043 0015 0181 
19:25:56	[W]	[component:237]	
Component remote_receiver took a long time for an operation (89 ms).
19:25:56	[W]	[component:238]	
Components should block for at most 30 ms.
19:25:56	[I]	[remote.pronto:231]	
Received Pronto: data=
19:25:56	[I]	[remote.pronto:233]	
0000 006D 0002 0000 015D 0057 0017 0181 

so i update the ESP config with some more buttons:

button:
  - platform: template
    name: brightnessDown1_nec
    on_press:
      - remote_transmitter.transmit_nec:
          address: 0xDEA8
          command: 0xF20D
          command_repeats: 1

  
  - platform: template
    name: brightnessDown2_jvc
    on_press:
      - remote_transmitter.transmit_jvc:
          data: 0x157B


  - platform: template
    name: brightnessDown3_lg
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x157BB04F
          nbits: 32


  - platform: template
    name: brightnessDown4_pronto
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 015B 00B0 0016 0016 0015 0016 0016 0016 0016 0042 0016 0016 0016 0042 0014 0017 0016 0042 0015 0016 0016 0042 0017 0041 0016 0042 0015 0042 0014 0017 0015 0042 0016 0042 0016 0042 0016 0015 0016 0042 0015 0043 0016 0016 0016 0016 0015 0016 0016 0016 0017 0015 0014 0043 0016 0016 0016 0016 0015 0042 0016 0042 0016 0042 0015 0042 0015 0181"
          repeat: 
            times: 1
            wait_time: 0.1s
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0002 0000 015C 0059 0015 0181"
          repeat: 
            times: 1
            wait_time: 0.1s

  - platform: template
    name: brightnessDown5_pronto
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 015B 00B0 0016 0016 0015 0016 0016 0016 0016 0042 0016 0016 0016 0042 0014 0017 0016 0042 0015 0016 0016 0042 0017 0041 0016 0042 0015 0042 0014 0017 0015 0042 0016 0042 0016 0042 0016 0015 0016 0042 0015 0043 0016 0016 0016 0016 0015 0016 0016 0016 0017 0015 0014 0043 0016 0016 0016 0016 0015 0042 0016 0042 0016 0042 0015 0042 0015 0181"
          # repeat: 
          #   times: 1
          #   wait_time: 0.1s
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0002 0000 015C 0059 0015 0181"
          # repeat: 
          #   times: 1
          #   wait_time: 0.1s

  - platform: template
    name: brightnessDown6_pronto
    on_press:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 015B 00B0 0016 0016 0015 0016 0016 0016 0016 0042 0016 0016 0016 0042 0014 0017 0016 0042 0015 0016 0016 0042 0017 0041 0016 0042 0015 0042 0014 0017 0015 0042 0016 0042 0016 0042 0016 0015 0016 0042 0015 0043 0016 0016 0016 0016 0015 0016 0016 0016 0017 0015 0014 0043 0016 0016 0016 0016 0015 0042 0016 0042 0016 0042 0015 0042 0015 0181"
          # repeat: 
          #   times: 1
          #   wait_time: 0.1s
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0002 0000 015C 0059 0015 0181"
          # repeat: 
          #   times: 1
          #   wait_time: 0.1s

no luck with any of them to the receiving device.
I try to see what the ESP IR receiver sees from the ESP IR transmitter. this should confirm that the expected code is being transmitted (good IRLED, pinout, cfg etc). Looks good to me so now i’m lost.

|19:29:53|[D]|[button:010]|'brightnessDown1_nec' Pressed.|
| --- | --- | --- | --- |
|19:29:53|[D]|[remote.nec:017]|Sending NEC: address=0xDEA8, command=0xF20D command_repeats=1|
|19:29:53|[W]|[component:237]|Component web_server took a long time for an operation (86 ms).|
|19:29:53|[W]|[component:238]|Components should block for at most 30 ms.|
|19:29:53|[I]|[remote.jvc:049]|Received JVC: data=0x157B|
|19:29:53|[I]|[remote.lg:054]|Received LG: data=0x157BB04F, nbits=32|
|19:29:53|[I]|[remote.nec:098]|Received NEC: address=0xDEA8, command=0xF20D command_repeats=1|
|19:29:53|[I]|[remote.pronto:231]|Received Pronto: data=|
|19:29:53|[I]|[remote.pronto:233]|0000 006D 0022 0000 015C 00AB 0016 0016 0016 0015 0017 0015 0016 003F 0018 0015 0015 0041 0018 0015 0014 0042 0018 0015 0014 0042 0017 003F 0015 0042 0017 003F 0015 0018 0015 0040 0016 0041 0016 0041 0016 0016 0015 0040 0017 0040|
|19:29:53|[I]|[remote.pronto:233]|0017 0015 0017 0015 0015 0016 0016 0016 0013 0019 0015 0040 0015 0018 0016 0015 0015 0041 0016 0041 0016 0041 0016 0041 0016 0181|
|19:29:53|[W]|[component:237]|Component remote_receiver took a long time for an operation (70 ms).|
|19:29:53|[W]|[component:238]|Components should block for at most 30 ms.|

any more ideas?

spent more time tonight trying to find a solution and stumbled into forcing dump: raw (from all) but no luck using a raw code either.

i’ve decided to replace it with a hue unit. i’ve spent 2 entire evenings on trying to get ESP IR working with it and it’s just not worth the effort.

i’ll be keeping the light so if anything comes up in here i can still try it, or i’ll be tearing the device down and looking if it can be converted into smart with an ESP & some solder.

How is your IR-LED circuit, does it get enough current?
Is it 940nm LED?

spec sheets says 940nm so should be good.
current; i assume so. ESP + IR modules are being powered via laptop USB3 through a breadboard… so somewhere bwteen 500mA and 1amp max power iirc. havent explicitly checked but i cant see it using anywhere close to 500mA

I mean current through the LED. Is it just a “pin powered” through resistor or module with transistor circuit? Post a link if you have.

https://www.amazon.co.uk/dp/B0CQLX2VNQ

connected directly to ESP32 pins, and powered from the 5v ESP pin.

There’s no transistor circuit just a LED and 220r resistor. So IR-LED current is 10mA, not sufficient for long range. Did you try to command your “device” at very short distance ?

1 Like

i’ll get the ESP fired back up nearer the device and re test over the next few days. Now i know about the low current issue, i’ll get some transistors ordered too.

thanks for the info!

Ir-LEDs are commonly rated for 100mA continuous, which you can’t directly drive from Gpio pin. That’s why you need transistor circuit. For short pwm pulse you can even drive them at 500mA.
Anyway, test distance before you order additional components, if it doesn’t work at 20cm, the problem is somewhere else.
Generally, if you receive solid signal and retransmit that, it should work. Phone camera confirms that setup is ok.

closer distance worked.

aside from changing from pronto to NEC codes (as per the reciever output) which makes things a lot visually nicer, if i move the transmitter <2ft away then it works as expected.

Nice. And if you need more range, you know what to do.