Page 1 of 1
IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 10 Mar 2025, 16:49
by chromo23
Hi,
i found a Bluetooth speaker and wanted to do a little project with it.
Annoyingly, this speaker comes with an IR remote control and many functions are only available via the remote.
So I thought I could simply use ESPEasy to capture the IR signals and send them to the speaker.
I unsoldered the IR receiver and soldered it to the ESP and soldered a wire from one of the GPIO's of the ESP to the signal input. (See picture) Getting the signals from the remote works fine. Then I thought I could relay the signal to keep the remote functionality.
As I do not really know in which format to relay the data, I tried it in "raw" and also converted to hex.
Neither worked. Either the rule is wrong, or connecting the signal line from the speaker board directly to a GPIO, or both.
(I also tried IRSEND with an inverted output)
I would appreciate any help with this.
Here the rule:
Code: Select all
On IRin#IR Do
IRSEND,NEC,{tohex:%eventvalue1%}
IRSEND,NEC,%eventvalue1%
Endon
"schematic"

- ir.png (172.49 KiB) Viewed 1092 times
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 10 Mar 2025, 17:16
by TD-er
Is your schematic only the sending module?
Just to make sure you're not trying to send/receive via the same module.
Also are you sure you're using the correct carrier frequency?
As far as I know, there are multiple IR carrier frequencies, which I assume (not sure) is encoded in the protocol used to send/encode the data.
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 10 Mar 2025, 17:24
by chromo23
TD-er wrote: ↑10 Mar 2025, 17:16
Is your schematic only the sending module?
Its all receiving. TSOP > ESP GPIO 5 > rules > ESP GPIO 6 > signal input (where formerly the TSOP was soldered to)
The ESP is there to have the option to trigger these signals via WiFi.
TD-er wrote: ↑10 Mar 2025, 17:16
Also are you sure you're using the correct carrier frequency?
No, but the IR receive plugin has a Protocol detection (it recognizes it as NEC) and it also corresponds with the info's i found about these cheap remotes.
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 19:59
by ThomasB
I don't know if the LogEntry command lets you echo IR data, but would be nice to see if valid data is received. Try it.
The IR receiver might need an additional pullup. Install a 10K from 3.3V to Data.
To have enough drive current for good range, the IR sender diode should be powered by 5V and use a transistor to drive it.
Example:
https://www.instructables.com/Using-an- ... sal-Remot/
- Thomas
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 20:40
by chromo23
ThomasB wrote: ↑11 Mar 2025, 19:59
I don't know if the LogEntry command lets you echo IR data, but would be nice to see if valid data is received. Try it.
The IR receiver might need an additional pullup. Install a 10K from 3.3V to Data.
To have enough drive current for good range, the IR sender diode should be powered by 5V and use a transistor to drive it.
Example:
https://www.instructables.com/Using-an- ... sal-Remot/
- Thomas
Thanks... but as you can see in my schematic don't us an IR sender diode. I send the signal directly to the data pin of the former IR receiver. Thats why i thought a pullup wouldn't be necessary.
The IR Receive Plugin successfully receives data. Also the IR Transmit Plugin sends this data. But i am not sure if the data format is correct since the received value type is always integer.
Here a picture of the "setup":

- ir.jpg (207.67 KiB) Viewed 974 times
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 20:52
by ThomasB
Your photo schematic does not show any pullup on the IR receiver data out. The IR Rx modules are usually open collector drive with a weak pullup inside of them. Perhaps it needs to be a lower value. So that is why I suggested adding 10K ohms sourced from 3.3V.
But if you are receiving data then my pullup idea is probably not of any value. Sounds more like a decoding issue, possibly wrong carrier freq or data format. Or the IR plugin is broken.
-Thomas
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 20:58
by chromo23
ThomasB wrote: ↑11 Mar 2025, 20:52
The IR Rx modules are usually open collector drive with a weak pullup inside of them. Perhaps it needs to be a lower value. So that is why I suggested adding 10K ohms sourced from 3.3V.
Got it..

Misinterpreted you last post.
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 21:14
by chromo23
The pullup didn't do the trick.
Since now i never needed a scope. But this IR issue could be a nice excuse to get one

Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 21:22
by ThomasB
Looking at the signal handling on your setup photo, I doubt you can do it that way. The IR receiver module removes the carrier frequency and converts the signal to a pulse-based format for the MCU/ESP to decode. But when you resend the IR data from the ESP, it modulates the data with the carrier, typically 38KHz.
The unwanted carrier is likely going to upset the hacked IR device. Because its IR data input (that used to be connected to the IR receiver) expects the carrier to be removed. An o-scope will tell the full story.
- Thomas
Re: IR receiver with ESPEasy as "microcontroller-in-the-middle"
Posted: 11 Mar 2025, 21:29
by chromo23
ThomasB wrote: ↑11 Mar 2025, 21:22
The unwanted carrier is likely going to upset the hacked IR device. Because it expects the carrier to be removed.
Ahh.. thanks. I totally missed that...