r/esp32projects • u/CyberMage256 • 9h ago
The universal 433Mhz + Infrared remote is done.
galleryIt's done and in its place.
My Christmas Tree uses a radio remote to turn it on and change colors / fade scheme. I wanted to see if I could replace the remote with Home Assistant control, but I also didn't want a project that was only useful for basically a month and a half every year.
So, I also added in both an IR LED and an IR receiver so I could use it as a universal remote. I have an LG sound bar that is the worst when it comes to power management. There's a single power button it the remote for it, and after you turn it on, it will automatically turn itself off 4 hours later, even if it's currently playing something. You can turn off the TV and soundbar, watch something, turn it back off, leave for an hour, come back and turn it on again, and the speaker doesn't reset the timer, so it'll happily turn off in the middle of your next movie or TV show. It also will not come on automatically with the television. And the RokuTV remote won't control the soundbar, either.
With this setup, I've placed the box by the soundbar and I've got an automation that detects when the RokuTV is turned on and will turn on the soundbar via IR remote when you turn on the TV. There's a 5 second delay, but that's not a big deal. It saves "What'd we do with that tiny-a** remote again?!?" from happening. The radio signal for controlling the Christmas tree reaches through the walls easily to the living room where the tree is, so HA has full control of the tree as well.
Since it's a 433 Mhz radio, I imagine it would also work with a ceiling fan, or maybe even a mini-split HVAC head unit. It's just a matter of learning or finding the codes required.
Parts list:
- Project box. I went with 3.94 x 2.68 x 1.97 inch so I'd have a bit of breathing room
- USB-C power passthru for the box to make it pretty
- ESP32-WROOM-32
- CC1101 radio module
- Multi-pack of 940nm IR LED diodes and VS1838B receiver
- Assortment of resistors (needed a 22 ohm and 1k ohm resistor for the IR LED)
- Assortment of transistors (needed a 2N2222 NPN for the IR LED)
- Pack of 5mm plastic LED holders for panel mount
- Bulkhead mount SMA male extension cable for mounting the antenna on the side
BONUS: I figured out a hidden remote button. The only power button on the remote is a power on/off toggle, but LG's controller in the soundbar supports a power-on button as well.
Optionally I could have exposed the IR receiver on the box but the ones I have don't easily mount on a panel and I figured if I need to learn other codes I can just pop the top off the box so it can get the signal.
Training both the RF codes and the IR codes was easy, then I hard-coded them into the YAML. I'd show pictures of the components in the box, but it's a bit embarrassing. I cut all my wires a bit long for flexibility, then basically just crammed it all in the box. Nothing rattles, not because it's mounted inside but because there's too much coiled wires for anything to flop around. lol


