HyperHDR on Raspberry Pi 5 — No HDMI Grabber or ESP32 Required #1378
joopdo
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've always wanted a Hyperion-style LED effect behind my TV, but I preferred the specs of Korean TVś over Philips Ambilight TVs. My setup: a Raspberry Pi 5 running Kodi (LibreELEC), connected with CEC to a Samsung TV.
No ESP32. No HDMI grabber. Just a Pi 5 doing it all.
Finding the Right Approach
Researching solutions, I found options involving HDMI grabbers, but I wanted everything integrated directly on the Raspberry Pi 5.
Hardware Setup
Level Shifter
The LED strip needs 5V signaling, which requires a level shifter from the Pi's 3.3V GPIO. Not wanting to solder, I found Justin Nelson's Level Shifter. I liked this better, as something that is ON in a hidden area, I wanted something clean. (fire hazard and such) The level shifter even includes USB hubs, though it doesn't provide the 5V/5A needed for the Raspberry Pi 5—so I kept the original USB-C charger for the Pi.
LED Strip
I bought a 5V SK6812 RGBW strip (210 LEDs total) and used the glue strip to stick it behind the TV (had to take the TV off though). A 3-meter JST extension cord runs down to the TV furniture where the Pi lives. The data line connects to GPIO 18.


Software Configuration
HyperHDR + Raspberry Pi 5 Challenges
I expected WS281x to work out of the box, but the Pi 5 has significant architectural changes:
I chose HyperHDR for the ambient lighting software. Thanks to @awawa-dev , I got guidance on connecting the SK6812 via Justin's level shifter to GPIO 18. @awawa-dev had a development build ready rpi_pio PR #1317 to add Pi 5 support. Note: No LibreELEC build existed with this PR, so I had to build it myself. (following the guidance of HyperHDR documentation)

Why No External Grabber?
Researching solutions, I found most setups rely on HDMI grabbers to capture video. But since Kodi runs directly on the Pi, I can grab the screen buffer internally using a DRM grabber. One less device, one less point of failure. Also, HDMI splitters interfere with CEC and ARC and I don´t want to compromise on any of that.
Screen Grabber
For capturing the screen, I found drm-vc4-grabber is compatible with HyperHDR. It crashed intermittently, so I submitted PR #34 to fix DRM resource leaks—at least on the Pi 5. It has been running for two weeks straight without issues now, even 4K videos are fine!
Power Control via Home Assistant
The LED needs to be on when the TV is on, and OFF when the TV shuts down.
Unfortunately, I couldn't read CEC events from Kodi in LibreELEC directly. Instead, I use a TV power sensor in Home Assistant that communicates with a Python service running on LibreELEC. This toggles the LED strip on/off and triggers effects—like a rainbow ripple when the TV powers on!
I'm thrilled to finally wrap up this project. Is it perfect? Not quite—the software screen grabber introduces a slight delay if you're really paying attention. But in everyday use, you won't notice it. What you will notice is a clean setup with no extra boxes, no HDMI splitters cluttering your TV stand, and no separate microcontrollers to maintain.
Acknowledgments
A huge thank you to Justin Nelson for creating the Pi 5 level shifter board that made this solder-free build possible, and to @awawa-dev for the incredible work on HyperHDR and for pulling Raspberry Pi 5 support out of a magic hat!
Beta Was this translation helpful? Give feedback.
All reactions