Installation instructions and settings for PicCap (hyperion-webos) and HyperHDR/Hyperion
The prerequisite for Ambilight is an LG TV device that has been successfully rooted and the Homebrew Channel installed. You can find out whether your device can be rooted at https://cani.rootmy.tv/ by entering your LG model type, or by following these instructions: https://gist.github.com/throwaway96/e811b0f7cc2a705a5a476a8dfa45e09f
PicCap/hyperion-webos cannot process DRM content via the internal apps on new devices, so the lights stay off. The DRM restrictions do not affect the TV's HDMI inputs, so NETFLIX & Co. can be processed and enjoyed with Ambilight. On my old webOS 3.9 and 4.x it also works via internal apps.
After a successful rooting with one of the known methods (Enabling debug on LG webOS by modifying NVM, RootMyTV, crashd, or DejaVuln) PicCap (hyperion-webos) and the mostly used HyperHDR or Hyperion, LEDs control/processing software from Homebrew Channel must be installed and configured.
Note: The settings for Hyperion.NG users are similar to HyperHDR, with the difference that there is no “HDR to SDR tone mapping” in Hyperion. To achieve some functions in contrast to HyperHDR, the setting level in Hyperion must be set to Expert.
- switch off unprotected and vulnerable Telnet.
- switch on SSH. (Username for this = root and password = alpine)
- switch on Block System Updates
- switch off failsafe mode
- reboot system to apply (perform reboot)
Install PicCap from Homebrew Channel and restart.
As an alternative to the direct installation from Homebrew Channels, the webOS Device Manager from GitHub can also be used for the installation. See: https://github.com/webosbrew/dev-manager-desktop Important! Under Add Device Connection Mode, select Use SSH Server by Homebrew Channel. (IP address of your LG television, port = 22, Username for this = root and password = alpine) Username for this = root and password = alpine) Not to be confused with the developer mode app. Please do not install a developer mode app on a rooted device.
After the restart, open PicCap and go directly to the Logs menu and wait until the service has been given root rights (Elevated Services).
Usually, after a restart PicCap sets itself to the automatic default settings. These are, among others, the IP address of HyperHDR/Hyperion, internal host is default 127.0.0.1 and port 19400, Hyperion priority 150, the resolution, maximum FPS, video capture backend, graphical capture backend as well as the autostart and VSync. Note: Depending on the webOS version, the video and graphical backend is different and should be set correctly instead of automatically if required. See: https://github.com/webosbrew/hyperion-webos#hyperion-webos. Remark! If you own a device with a weak CPU/memory, I recommend choosing a smaller resolution (256 × 144) and reducing the Hyperion priority from 150 to 100. You can also do without the “Graphical capture backend” to reduce the delay and save the device resources.
If everything is configured correctly and the connection to HyperHDR/Hyperion is established, you will see the following in the bottom bar under “State: Getting status info. I Receiver:Connected” with the respective UI and video backend as well as the selected frame rate.
You can use the “top” command in Terminal/SSH to see what memory and CPU load “hyperion-webos” and “hyperhdr” are using.
Under Advanced Settings, you may need to set the correct QUIRK. See: https://github.com/webosbrew/hyperion-webos#quirks.
HyperHDR is a fork of Hyperion. To realize Ambilight on LG TVs, you need either Hyperion.NG or HyperHDR in addition to PicCap. Both Hyperion versions are similar in structure and operation, and each has its own special functions. And as always, there are advantages and disadvantages. It also depends on which LED controller you want to use. If you want to use LED controllers such as HyperSerial, HyperSerialPico on RP2040 or HyperSerial with WLED on ESP32 and attach importance to HDR content, you should use HyperHDR. For LED controllers with pure WLED firmware on ESP32, you can use Hyperion.NG. Hardware support for LED lighting is also important. Both solutions support most common RGB/W LEDs. However, since there are also exotic RGB lighting, you can find out more in advance on the GitHub page. HyperHDR: https://github.com/awawa-dev/HyperHDR Hyperion.NG: https://github.com/hyperion-project/hyperion.ng
Install and start HyperHDR or Hyperion.NG via the Homebrew Channel or using the webOS Device Manager. Switch on Autostart and start the daemon service. Reboot the TV. Since HyperHDR is a fork of Hyperion and has a similar structure, I will use HyperHDR for the examples here. Please use either HyperHDR or Hyperion.NG.
Once the HyperHDR daemon service is successfully started, open a browser of your choice (Chrome, Mozilla Firefox or Microsoft Edge) on your PC, tablet or cell phone and access the web interface of HyperHDR or Hyperion.NG under the IP address of your TV with port 8090 (e.g. 192.168.xxx.x:8090) to make the necessary settings.
HyperHDR LED Controller type settings for ESP32 controller with “WLED” firmware:
First go to LED hardware and make the settings under LED controller.
You can select WLED under LED controller, but in conjunction with some ESP versions, the LEDs were not switched off when the TV was switched off. So I prefer here as controller type: udpraw, RGB byte order: RGB, update time 0, target IP: IP address of your ESP/WLED and port: 19446.
The controller type: wled also has an autodiscover function when you set the first time.
HyperHDR LED controller type settings for RP2040-USB controller with “HyperSerialPico” or “HyperSerial” ESP32 Generic/S2 Mini firmware
First, go to LED Hardware and select “adalight” under “Controller Type”. Select your RP2040 device under “Output path”. For example, ttyACM0. Select the option “High speed serial AWA protocol with data integrity check”, with a baud rate of, 2000000. In addition, “Esp8266/ESP32/Rp2040 handshake” and “Force HyperSerial detection (ignore board ProductId/VendorId)” must be selected.
It is only necessary to select the “White channel calibration (RGBW only)” option if you are using RGBW LEDs with 4 channels (SK6812RGBW). The white channel of the “Neutral RGBW” LEDs does not come close to the color obtained by mixing RGB LEDs. It is slightly yellow, so you may need to reduce the blue/white component to boost the blue channel. “Cold RGBW” LEDs are usually better balanced. So on my SK6812RGBW neutral white, I reduced the “blue/white aspect” to 180 to boost the blue channel and create a reasonable white balance.
I would like to mention at this point that there are several ESP controllers with HyperSerial drivers from awawa-dev in GitHub, which can be installed on both ESP8266 and ESP32. For details and separate settings, please see: https://github.com/awawa-dev/HyperSerialEsp8266 and https://github.com/awawa-dev/HyperSerialESP32/
Attention! There are also ESP32 with CH341 or CP210x which allow higher data rates via HyperSerial, but the kernel driver is not included in LG firmware. So you have to install it on the device first, depending on the kernel architecture. Download and instructions can be found at: https://github.com/throwaway96/webos-kernel-drivers
Kompatibler HyperSerialPico-Controller: awawa-dev/HyperHDR#561 Kompatibler WLED-Controller: https://kno.wled.ge/basics/compatible-controllers/
In the second step, we go to LED layout. Here you have to create the LED geometry of your TV, enter the exact number of LEDs top, bottom, left and right as well as the input position. (This is the first LED in configuration) It is also possible to create a three-sided Ambilight, or a four-sided one with a foot gap. The layout is viewed from the front. On my devices, I glued the LEDs from the front, bottom left and followed the clockwise direction so that the end of the LED stripe stopped in proximity to the beginning of the LED stripe. Thus, I could feed power to both the beginning and end of the LEDs with only a single AWG 18 silicone two-conductor wire from the power supply.
In the next step, we turn to the menu effects (effects) and ensure that the boat effects and background effect remain switched off. Do not check the relevant boxes. Otherwise, you will have unwanted “flashing orgies” when starting the TV.
The next step is only important for HyperHDR users! (This function is not available in Hyperion.NG)
For the correct HDR global detection function, the “HDR to SDR tone mapping” option must be activated under Network Services, Flatbuffer Server.
Under image processing, you have the choice between “Classic HyperHDR calibration” and not “Classic HyperHDR calibration”. When using WLED, the “Classic HyperHDR calibration” is suitable, as the saturation can regulate the color intensity.
When using HyperSerial/HyperSerialPico, the non-“Classic HyperHDR calibration” is suitable, as you can control the brightness here. Since HyperSerial driver comes with a balanced color saturation, the missing saturation control is negligible in this case.
The color and gamma values depend on the LED stripe type used. The adjustment should be made under the “Remote Control” menu in the live calibration menu, so that the changes are noticed immediately. As the values set in Live Calibration are not permanent, you should enter the values in the Image Processing menu and save them permanently.
To avoid flickering and unsteadiness in LEDs, the next step is to activate and save “smoothing” under Image processing.
A live image captured by PicCap must be visible in the HyperHDR LED visualization menu. No image is visible when DRM content is played via internal apps such as NETFLIX. If you want to watch DRM-protected content such as NETFLIX, Disney & Co., you must use an external HDMI player such as Apple TV or FireTV, as the DRM restrictions do not apply via the TV's HDMI inputs.
Under HyperHDR/Hyperion remote control menu, you could monitor all processes and see whether data from PicCap is arriving at the HyperHDR “Flatbuffers” under source selection. There you can also switch HDR Global on or off if required. However, HyperHDR recognizes when a source provides HDR content and switches HDR Global on automatically and switches it off again for SD video sources. Under LED device, the LEDs can be switched off and on as required.
You can view whether the LED controller has been recognized correctly under HyperHDR Logs. For the USB connection also under webOS Device Manager Debug, “dmesg”.
HyperserialPico Log:
You can manage the instances in the “LED hardware instance management” general settings menu. Use different LED hardware at the same time. Each instance runs independently of the other, which enables different LED layouts and calibration settings. This is important if, for example, you are using hardware from other manufacturers, such as Philips Hue lamps and Stripes.
Under “Import/export configuration” you can save your HyperHDR settings and restore them as required.
The log level debug can be set under the “Logging” menu.
When using ESP32 LED controller with WLED firmware, it is necessary to make further settings under WLED depending on the LED type, RGB or RGBW used. For example, when using four channel LEDs such as SK6812RGBW. In the LED settings under “White management”--> “White Balance correction”, under “Calculate white channel automatically from RGB”, select “Dual” to actually use the white channel of the LEDs.
If the connection between WLED and router is interrupted, select under WiFi Settings --> Disable WiFi sleep to prevent the ESP from switching off its WiFi. In this case, the ESP32 can consume more power, but the connection remains active.
For those who prefer WLED firmware because of all the extras, but have had a bad experience over WiFi because of the long delay, then I recommend the ESP32 variant with built-in LAN connection. "QuinLED Dig Uno v3 DIGITAL LED controller", which is also available with LAN and acrylic housing. Or "ABC! WLED Controller Board V43 (5-24V)", "Ethernet Adapter for WLED Controller" and ‘Housing for WLED Boards’. The controllers are supplied with WLED. Just google: “QuinLED Dig Uno v3 DIGITAL LED controller”, which is also available with LAN and acrylic housing. Or “ABC! WLED Controller Board V43 (5-24V)", ‘Ethernet Adapter for WLED Controller’ and ‘Housing for WLED Boards’. The controllers are supplied with WLED.
For those who do not use a ready-made LED controller with a built-in level shifter, I strongly recommend integrating a level shifter into the circuit. Since most LEDs need to be supplied with 5 volts, but the logic of the controller can only handle 3.2 volts, the direct DATA line should be connected via a level shifter. For testing purposes, you can temporarily install a 470 Ohm resistor on the DATA line and a 1000µF electrolytic capacitor on the 5 Volt+ and GND at the input of the LEDs.
Install HyperSerialPico firmware on controller: Unzip the firmware folder. (https://github.com/awawa-dev/HyperSerialPico/releases/) Take the appropriate file for your LED strip and transfer it to the controller in DFU mode.
- Put your Pico board into DFU mode:
If your Pico board has only one button (boot) then press & hold it and connect the board to the USB port. Then you can release the button. If your Pico board has two buttons, connect it to the USB port. Then press & hold boot and reset buttons, then release reset and next release boot button.
- In the system file explorer you should find new drive (e.g. called RPI-RP2 drive) exposed by the Pico board. Drag & drop (or copy) the selected firmware to this drive. The Pico will reset automaticly after the upload and after few seconds it will be ready to use by HyperHDR as a serial port device using Adalight driver.
For devices larger than 65 inch televisions, a third power injection for the LEDs in the center is required.
If you use SK6812 with only one segment, you only need DATA. If you are using two segments, you must also use CLK. The firmware (HyperSerialPico) must be compiled correctly for this.
For ws281x/sk6812 LED strips:
Compile with set(OUTPUT_DATA_PIN 15) for data line if single LED segment is used. Output is DA connector. Compile with set(OUTPUT_DATA_PIN 14) for data line if two LED segments are used. Output is: CL (first segment) and DA (second segment) connector.
For SPI LED strips, spi1 interface must be used:
set(OUTPUT_SPI_DATA_PIN 15)
set(OUTPUT_SPI_CLOCK_PIN 14)
set(SPI_INTERFACE spi1)
Output is: CL (clock) and DA (data) connector.
For devices larger than 65 inch televisions, a third power injection for the LEDs in the center is required.
Important! For the RP2040 controller with HyperSerialPico, please look for the correct DATA line output. Depending on the type, with built-in level shifter or without, there are different GPIO assignments for DATA. The right place to go for the firmware is: https://github.com/awawa-dev/HyperSerialPico, https://github.com/awawa-dev/HyperSerialPico/releases and for the description of the compatible hardware and pin output is: awawa-dev/HyperHDR#561
If you prefer to buy and set up the LAN-ESP32 “WT32-ETH01” yourself, you should also bear in mind that a TTL-to-USB adapter is required for the software flashing. In addition, a level shifter should definitely be integrated to prevent the ESP from being destroyed or experiencing unwanted flashes or effects.
For the flash process, you must connect the TX from TTL to USB adapter with the RX0 from the ESP and the RX from TTL to USB adapter with the TX0 from the ESP, i.e. cross over. GND to GND. If the USB->TTL adapter offers a choice between 5V and 3.3 volts, then 5V should be selected. To start the flash with the WLED software, IO0 (next to RX0) must be connected to GND.
For the flash process with WLED, please use the online flash at: https://install.wled.me/
WLED Ethernet setup: Go to "Config" and then to "WiFi Setup". At the bottom of this page select the Ethernet type you use. (WT32-ETH01) Then click on "Save & Connect".
Example of power supply units that can be used: Switching power supply “MEAN WELL Well 1439455 LRS-75-5 AC power supply Module” (Please note that a 3-pole mains connection cable is also required here) or closed switching power supply “5V Power Supply 5 Volt 15A 75W Adapter 100V~240V AC to DC Converter 5 Vdc 15 Amp Power Transformer for LED Pixel Strip Light” “ALITOVE Netzteil 5V 15A Universal Adapter 5 Volt Netzteil 75W” and the screw-on adapter to match “Female And Male DC Connectors 2.5×5.5 mm Power Plug Adapter Jacks Sockets Connector For Signal Color LED Strip CCTV Camera”
For a helpful calculation of the required power supply rating, cable cross-section, fuse and other parameters depending on the number and type of LEDs, you should definitely consult https://wled-calculator.github.io/.
Important note!
After a few years, it was discovered that PicCap provides the wrong algorithm for the color calculation for HyperHDR and therefore the LED colors do not match the TV picture. The data is captured with FMT_ABGR, which is actually ARGB. ABGRToARGB, now the bytes are actually BGR, ARGBToRGB24, which in turn is changed to get RGB again.
Among other things, the new generation of devices was also taken into account and the so-called “libvtcapture_backend” and the older “libdile_vt_backend” were adapted. Devices of the LX SoCs such as C1, C2, C3, G1, G2, G3 and A series.
Because the PicCap developer is currently not active, you have to make the changes manually and update the backends under the “hyperion-webos” yourself.
Thanks to @sundermann for the new backend.
Download:
Installation instructions:
- call up PicCap under Apps and stop the service.
- unzip the hyperion_webos_Release.zip and copy the content to /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/ on the TV. (Replace the hyperion-webos and the backends in the folder)
- restart the TV and run PicCap to get root. When this is done, you will see in the bottom right of the status bar whether the receiver is “connected” to the respective UI and video backends.
Now you may have to reset the color and gamma settings you made before, as the color calculation is now correct. Depending on the type of LEDs used, readjust if necessary.
You can check the actual hexadecimal color values in HyperHDR Live LED visualization with the browser, other tools, color pipette and check if they correspond to reality. Calculation from hexadecimal to decimal can be found in: https://www.farb-tabelle.de/de/farbtabelle.htm
The color correction I achieved with it can be seen in the “EBU Color bars results”. This corresponds to 99.9 percent of reality!
The file “EBU Color bars results” with the correct resolution Download: https://en.m.wikipedia.org/wiki/File:EBU_Colorbars_HD.svg#file
For those who are always not satisfied with the colour rendering of their LEDs, the ultimate colour matching should be done using different LUT's for SDR, HDR and Dolby Vision. See: https://github.com/satgit62/Ultimate-HyperHDR-Ambilight-fine-tuning-experience-for-LG-webOS-with-new-LUT-calibration-