It’s a very simple device that loops through predefined IR remote control codes in 5-second intervals.
Has this ever happened to you?
You’re at home, chilling, watching TV, everything’s fine. It’s 6 PM, your show’s starting and snacks are at the ready, you’ve been looking forward to this after a hard day’s work.
Then suddenly an ominous sound envelops the house. Dread creeps up from your feet eventually meeting your sinking heart. Frozen from fear you slowly look around the room, what could originate such creepy chirps? Then it hits you: It’s the phone! Grandma’s calling. TV’s “broken” again.
It keeps saying “Not programmed”. Obviously, it switched again from the set-top box to the antenna input, and it needs to be set back to HDMI 2. You try to explain what happened, and what to press on the remote (which you promptly forgot to take a picture of, like that clever Reddit post mentioned), your only feedback being a slow readout on what’s happening on the TV that has absolutely no relation to what you want it to say.
After 20 minutes of back and forth, you agree to come over and press the Input Select button twice, showing how it’s done, knowing full well this will happen again in a months time. You’re missing your show, they’re missing their show, and nobody’s happy, but at least the TV’s back on HDMI 2. If only there was a device that would automatically set the correct input…
Good news!
A good few years ago I dabbled with some Arduino stuff and an IR receiver. I remember it having the ability to not only receive but send IR remote signals too. If you’ve got the proper codes, it can replicate them.
A few minutes of Googling LG TV remote codes gets you 4 codes that directly switch to one of the inputs on the TV. These are not available on the remote control itself - but at least it has 4 different streaming service hotkeys -, but are available on smart home remote controllers like the Logitech Harmony and others. (They are also available on the IRPlus Android app, which is also a valid way of tackling this problem if Grandma has an Android phone with an IR blaster. You can create shortcuts on the home screen to any of the buttons.)
I have an ESP32 board, which is way overpowered for this stuff, but that’s what I had at hand. I could salvage an IR LED from an old, unused remote control, so everything was given.
I’ve whipped up some very basic code and tried the thing on my - also LG - TV and it worked as expected. Here’s the code and diagram on Wokwi:
And also the code here, if Wokwi ever goes down:
1 | #include <IRremote.h> |
The IR LED goes between GND and GPIO 2 (can be redefined at line 2). The codes can be customized on line 4 if needed.
The usage is as simple as powering up the device, pointing the LED at the TV, and waiting for the picture to appear. After that, power down the device.
I’ve soldered an old phone charger to the 5V input so it comes down to plugging the charger into the wall and removing it afterward. I also put the thing in a small box so it looks nicer.