Reactive TV Lights

Ambilight just too expensive or not cutting it for you? Same. I did it myself, and like most of my projects it involves a Raspberry Pi.

Here’s what you’ll need for my setup:

  • Raspberry Pi 4B
  • Pimoroni Mote LED Kit
  • 4K HDMI Splitter
  • HDMI-to-USB 3.0 Capture Card
  • Lots of USB outlets and cables, some included and some not.

I used HyperBian, which is basically Raspbian pre-flashed with Hyperion. This handy image does 90% of the work, so take a moment to appreciate how much you don’t have to do.

Note: Python 2.x has been deprecated and I have therefore updated the scripts/syntax to reflected that as needed.

I’m not gonna mention the parts that are standard, like setting up Mote lights. I will go over the wiring though:

Media > Splitter > HDMI Capture Card > Pi > TV

First, follow these instructions. I’ve listed the relevant portions below as well.

sudo apt-get install python3-dev python3-pip
sudo pip3 install twisted
sudo pip3 install pyserial mote numpygit clone
cd artnet-unicorn-hat
sudo nano artnet-server.service
sudo cp artnet-unicorn-hat-mote/artnet-server.service
sudo systemctl enable artnet-server
sudo systemctl start artnet-server

Before copying over artnet-server.service, modify it with nano, make sure the path to the script matches where it is on your installation.

For me, I had to change the user folder from “osmc” to “pi”. If you try to start or enable the service you’ll probably get the following error:

Description = Artnet/OPC/FadeCandy Server - control of LEDs

Type = idle
ExecStart = /usr/bin/python3 /home/osmc/

WantedBy =

Original error was: cannot open shared object file: No such file or directory.

This can be easily fixed by running the following command:

sudo apt-get install libatlas-base-dev

Go to Hyperion Dashboard. It should be localhost:8090 from your Pi. Set the Capture Input to the USB device detected (the capture card), and the LED output format to “fadecandy”. Set the number of pixels to “64”. Save the settings and everything should work! Don’t forget to configure your lighting orientation to match the placement of your lights!

Leave a Reply