Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

Click the blue text

Follow us

This article is a technical article from the “Hansi Bian” forum, authored by DDDear. Thanks to the author! The copyright of the article belongs to the original author, and infringement will be pursued.

Background and Analysis

Prerequisites: The background wall at home is white; otherwise, there will be a color difference. My wall is misty blue, and the color difference is quite serious when looking closely, especially when white light hits it, turning into blue light.

Demonstration video:

The simplest method is to install the Android version of Hyperion Grabber on the TV and configure the server to run in the background. Unfortunately, my Xiaomi TV with 8+2 configuration kills the background apps too aggressively, so this solution is not feasible. I searched for Kodi plugins and tried to implement it using Kodi. However, it is regrettable that it only works effectively when played through Kodi, which greatly limits the usage scenarios.

Moreover, it has not been implemented in Kodi 19 and the accompanying Hyperion Control for Kodi 19 (Matrix). I don’t know why; if someone has implemented it, please share. Finally, I used Kodi 18 and hyperion.kodi to achieve it, so this tutorial is based on the experience with Kodi 18.

Material List

  1. NodeMcu8266 12.8 CNY

  2. WS2811 LED strip 5 meters 36.4 CNY

  3. 12V 4A power supply 14.9 CNY

  4. 3 Dupont wires, DC female power cable Less than 5 CNY

Tutorial

1. Arrange the LED strip on the TV. I started from the bottom left corner of the TV with the first LED and wrapped it around the back of the TV in a clockwise direction. The first time I did this without experience; with the purpose of testing, I did not directly use double-sided tape to stick the LED strip to the TV but temporarily used transparent tape to fix a few stress points. I just wrapped it around, and finally, I used 105 LEDs for the 65-inch TV.

2. For NodeMcu8266, flash the WLED firmware. There are tutorials available in the forum: https://bbs.hassbian.com/thread-14736-1-1.html. Let me introduce the WS2811 LED strip, which is powered by 12V. Testing shows that powering a single end of 4 meters in length is fine, and the price is relatively cheap. However, one chip controls three lights, which greatly reduces color resolution. The length configured on the WLED page should be the number of control chips, so when configuring, it needs to be the actual number of LEDs divided by 3. I configured 45. However, it actually needs to be configured according to your type of LED strip. In my configuration, the automatic brightness limit was removed, the color order is GRB, and the length is 45.

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

3. Use the hyperion.ng software. Project address: https://github.com/hyperion-project/hyperion.ng. Official installation tutorial: https://docs.hyperion-project.org/en/user/Installation.html. After installation, open the web configuration page at http://device_ip:8090/. First, change the language to Chinese:

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

Then click on the sidebar LED examples -> LED hardware -> LED layout, fill in the number of LEDs up and down, left and right according to the LED strip on the TV, and then modify the input position corresponding to the first LED of your strip as shown in the figure below:

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

Then switch to the LED controller tab, select the controller type as WLED, fill in the HOSTNAME/IP of your NodeMcu, and then click identify. It will automatically recognize the total number of hardware LEDs. After that, click save.

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

Finally, return to the dashboard page, and the controller type should be WLED, as shown below:

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

At this point, hyperion.ng has been configured.

4. Install the Android version of Kodi 18 on the TV. There are many tutorials available online for downloading and installing it. Install the hyperion.kodi plugin: https://github.com/hyperion-project/hyperion.kodi. I downloaded the Release version 1.0.2, and there are many tutorials online for installing the zip plugin locally, so I won’t elaborate here. After installation, open the plugin as shown below:

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

It states that it does not support Raspberry Pi series and Android devices with hardware acceleration enabled.

Click settings, and after opening the settings interface, it looks like the picture below. Change the hyperion host IP address to the IP of the device where you installed hyperion.ng, change the hyperion priority channel to 150, enable the Enable addon (Grabbing) option, and click OK.

Simple Implementation of Colorful Light Effects on Xiaomi TV Using NodeMcu and WS2811

In settings -> Player -> Video -> find the hardware acceleration options. I remember there were two options; turn them off. You don’t need a single line of code throughout the process; just click with the mouse and remote control, haha.

Try playing a video with Kodi!

The test video was cast to Kodi using the iQIYI app on my phone. I don’t have a movie locally, so I don’t know if turning off hardware acceleration affects the smoothness of movie playback.

The next morning, the LED strip fell off because the transparent tape did not stick well. I was initially planning to test it, so I removed everything. I plan to finally use WS2812 to create colorful light effects, as I feel the color will be better with WS2812. However, it may require 5V dual-end power supply. I will wait for the goods to arrive and then study it.

For more information on the latest methods and tutorials for Home Assistant, please follow this public account:

▼ Please click “Read the original text” to interact with the author on the forum.

Leave a Comment

Your email address will not be published. Required fields are marked *