Raspberry Pi media center with DIY ambient light
Optimization
The most difficult part of the configuration is defining the order and position of the LEDs in the "leds"
section of the /etc/hyperion/hyperion.config.json
configuration file. The entry for a single LED (or, in the case of Lightpack, for an LED strip) is shown in Listing 5.
Listing 5
Single LED Entry
Each entry can be assigned uniquely by the index
value. A pair of coordinates defines the position, or rather the area, in which the system should react to the contents displayed on the screen. The values run from 0.0000 to 1.0000. The information in Listing 6 shows the setting for the upper left corner of the screen.
Listing 6
Upper Left Corner
However, in the case of the devices I used in the lab test, the order of the connections on the control unit and the index number did not match; thus, I had to reposition either the connections or the LEDs accordingly: I opted for the latter to keep the cable routing and arrangement on the control unit as clean as possible.
The Lightpack kit contains 10 LED strips, and the control unit controls each of these by reference to a unique index. It makes sense to isolate a certain area in the configuration file and assign it to the various lighting elements one after another.
With the LED configuration from Listing 7, the active area for the first LED strip is in the upper left corner of the screen. First place all other LED strips on the bottom right area, and then apply the changes by restarting the Hyperion service:
$ sudo systemctl enable hyperion
Listing 7
LED Configuration
Once you have assigned all elements, the alignment can be corrected by means of coordinates. Figure 4 shows a simple configuration. The values are then transferred to the appropriate LEDs.
Color Intensity
In practice, the system should now light the area behind the TV to match the screen content. However, the brightness of the LEDs, and thus the intensity of the effects, may leave much to be desired.
If necessary, you can also control luminance with the hyperion.config.json
configuration file. The "transform"
section (Listing 8) is responsible for the intensity of the color effects. An optimal setting requires a successful balance between saturation ("saturationGain"
) and brightness ("luminanceGain"
).
Listing 8
JSON transform Section
Tests have shown that brightness values above 1.5000 have a counterproductive effect: The colors appear rather pale, if not white. The best way to find out the optimum configuration for your requirements is to conduct your own experiments.
Conclusions
With a Rasp Pi, the relatively inexpensive Lightpack, Hyperion software, and a little configuration work, you can save yourself the cost of an Ambilight TV. However, Lightpack only "lights up" content played back by the Media Center, not conventional television programs.
The biggest task is reworking the configuration: The file created by the setup tool requires some adjustments. If you like to experiment with media center distributions and avoid modern smart TVs with all the extras, this task should not deter you.
Infos
- Lightpack: http://www.lightpack.tv
- Lightberry: http://lightberry.eu
- AmbiLED HD: http://www.ambiledhd.com
- Lightpack PC: https://store.lightpack.tv/products/lightpack
- Boblight: https://code.google.com/archive/p/boblight
- Hyperion: http://hyperion-project.org
- HyperCon: https://github.com/hyperion-project/hypercon
- Kodi Boblight add-on: http://kodi.wiki/view/Add-on:XBMC_Boblight
- Kodi AmbiBox add-on: http://kodi.wiki/view/Add-on:AmbiBox @IE
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.