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:
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 !
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:
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.|
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.
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
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 ?
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.
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.
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.