I have recently installed a Lightberry HD and set it up using RasPlex and I thought I would make a post with some notes on a few things I found or worked out along the way. Lots of things are undocumented or dotted all over the web. I wrote this using a Lightberry HD and RasPlex 0.7.0, the instructions will likely work for other similar setups but this is the one I have used.
#Update History
- August 31 - Initial Post
- September 1st - Fixed instructions regarding editing the hyperion on file on your PC not on the Pi directly.
- Saturday 12th - Updated Hyperion script section using suggestions by @Kwiboo - It now sets the enabled/disabled state in a better way making the System Settings update correctly. I also added notifications. Also added the file and the launch script at attachments to this post.
- Saturday 12th Part 2 - Added a new “Default Settings” section with some example setups.
#Hardware Setup
This part I have no notes, the instructions from Lightberry worked you just have to follow them.
#Software Setup
You’ll need to create a custom configuration file for your Lightberry HD. Part of this will need to be custom depending on your LED layout for your TV size. Other parts of it need to be standard. Before you go any further you’ll need to record how many LEDs you have the vertical and horizontal sides. You also need to note if you have LEDs in the corners or not.
Now you should install this Java application onto your desktop computer (not the Pi).
https://github.com/tvdzwan/hyperion/wiki/configuration → It also has some good expplatations of what all the settings do.
Hardware - Construction
First the “Construction” section. Items in bold are ones where you will need to enter custom details depending on your setup.
- Direction - counter_clockwise
- LED in top / bottom corners - Change this to true or false depending on how you setup your LEDs
- Horizonal # - Number of horizontal LEDs
- Vertical # - Number of Vertical LEDSs
- Bottom Gap - Not needed unless you left a gap at the bottom of your lights.
-
1st LED offset - If you followed the lightberry instructions then your LEDs start in the bottom right of the image and go round the TV in a counter clockwise rotation. Remember the image show you looking at the TV on the screen side so make sure you keep that in mind as it looks flipped when you wired up the back of the TV.
The key is to make sure the numbers and how you setup your LEDs line up the first LED on your string starts at 0 and the last one. If you get this bit wrong then you’ll get colours in the wrong place.
Hardware - Image Process
Make sure Blackborder Detector is on and the threshold is set to 1% this means films that have black borders (both widescreen and 4:3) will have the correct lighting and ignore the borders.
Process - Frame Grabber
It’s enabled by default just leave the settings as they are
Process - Frame Grabber
This setting is down to personal preference but without some form of smoothing you’ll get annoying flickers. I suggest enabling it with a 100ms Time setting and see how that works for you. I had it at 200ms which worked well but perhaps is a little slow for fast scenes.
Process - Colours
These settings will need to be tweaked per your preferences but after some trial and error I have the following suggestions based on my latest attempts. These are what control the lighting colours and intensity, I have spent time trying to get the best match across multiple types of film from vivid films like Avatar and Fifth Element to things with a more brown/dark palette like Game Of Thrones. These are based on Lightberry HD which use WS2801 LED strips.
- HSV Saturation gain - 1.47
- HSV Value gain - 0.5
Leave RGB Gamma, BlackLvl and WhiteLvl at defaults. The only variation you might want to alter is the threshold value. You can bump this value by a small amount if you are experiencing flickers of colour when in a dark scene. This value however will also effect the colour of certain scenes as it will stop the colours from lighting up.
Initially I have the threshold settings at:
- Red 0.08
- Green 0.05
- Blue 0.05
However I found it means the colours didn’t match as well so I reverted back to having them all set to 0. In most cases this works out much better with more accurate colour mapping but I am sure in certain scenes you might get a little flicker if the colour is on the edge.
The problem is all these settings effect each other so if you tweak one you need to modify all the others to fit. I would be very interested to see what values others have been using.
External
XBMC Checker - Enabled using defaults
JSON Server - Enabled using defaults
Proto Server - Enabled using defaults
Boblight Server - Disabled
Effect Engine - Enabled
- Directory - This needs to be altered slightly for RasPlex use the following path: /usr/share/hyperion/effects
- Bootsequence - enabled (use defaults)
Share your settings on this thread
If people using Lightberry HD’s or similar WS2801 strips can share their:
- HSV Saturation gain
- HSV Value gain
- Threshold, Gamma, BlackLvl & WhiteLvl for RGB
It would be interesting if we can try and build up some good settings that work with different films and lighting conditions. I am happy with my settings as a first stage but I am very keen to try and see what others are trying out with the aim of having some good recommended defaults for Lightberry HD (or similar LED strip) users.
Installing settings
There should be a number of guides on this forum about what apps and how to use sftp or ssh, I am assuming you know about those or can google. With that out the way connect to your RasPlex using ssh (or sftp)
Server Name: RasPlex.local
Username: root
Password: rasplex
Directory: /storage/.config/
Backup the original file (called hyperon.config.json) and replace it with the one you just generated. If something goes wrong you can compare the original to the one you made to track down any mistakes or problems.
I have attached my working json that I am using currently (which is setup for my LEDs layout) as a sample zip file to help if people have issues.
Turning on Hyperion
Go into your System Preferences and turn on Hyperion. If all has gone well you should get the rainbow effect round your TV. Now go and play a movie or TV show and enjoy!
Extra Credit - Toggle Hyperion using a button on your remote
There are times when you might want to disable/enable Hyperion without having to go into the menus. This is both for times when you just don’t want to use it and also if you just want to restart Hyperion after altering settings. I wrote a script to do this and hooked it up to the Blue button on the remote.
This needs two parts adding a script to rasplex to toggle Hyperion and second a file to add the button to the remote. I am also assuming for this part you are happy with ssh and some very basic scripting.
Create a file called hyperionswitch.sh in the following location /storage/hyperion/ you will need to create the hyperion folder. Make sure it has the following contents.
#!/bin/sh SERVICE=hyperion if systemctl is-active $SERVICE >/dev/null 2>&1 then echo "Stop Hyperion" systemctl stop $SERVICE [ -f /storage/.cache/services/$SERVICE.conf ] && mv /storage/.cache/services/$SERVICE.conf /storage/.cache/services/$SERVICE.disabled /usr/bin/xbmc-send --host=127.0.0.1 --port=9778 --action="Notification(Hyperion,Shutting Down)" else echo "Start Hyperion" [ -f /storage/.cache/services/$SERVICE.disabled ] && mv /storage/.cache/services/$SERVICE.disabled /storage/.cache/services/$SERVICE.conf [ ! -f /storage/.cache/services/$SERVICE.conf ] && touch /storage/.cache/services/$SERVICE.conf systemctl start $SERVICE /usr/bin/xbmc-send --host=127.0.0.1 --port=9778 --action="Notification(Hyperion,Starting Up)" fi
You will need to make the script executable using chmod +x hyperionswitch.sh via ssh.
You will now need to make a second file called remote.xml and make sure it has the following contents.
<keymap> <global> <remote> <blue>XBMC.System.Exec("/storage/hyperion/hyperionswitch.sh")</blue> </remote> </global> </keymap>
Now connect to your RasPlex again and put this file in the following folder location (it should already exist so you won’t need to do anything but add the file).
/storage/.plexht/userdata/keymaps/remote.xml
Reboot your RasPlex, the blue button will now toggle Hyperion on and off.
I have attached the scripts to this post in a zip.
Useful Apps
There is an iOS and Android app that allows you to tweak the values of Hyperion in realtime it’s a little fiddly but is very useful and allows you to see how certain settings will look without having to edit the setup file and restart Hyperion.
That’s it for now, I’ll look to date this as I get more details and answer any questions people might have. I hope some of you using RasPlex and Hyperion might find this useful.
#Default Settings
Below are a list of different settings you might want to try.
My Current Settings
The aim of these settings are to give the best overall colour for films, the brightness is lower so it doesn’t take away from the films you’re watching but it high enough to enhance the experience. It’s my personal favourite overall.
"color" : { "transform" : [ { "id" : "default", "leds" : "*", "hsv" : { "saturationGain" : 1.4700, "valueGain" : 0.5000 }, "red" : { "threshold" : 0.0800, "gamma" : 1.0000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 }, "green" : { "threshold" : 0.0500, "gamma" : 1.0000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 }, "blue" : { "threshold" : 0.0500, "gamma" : 1.0000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 } } ], "smoothing" : { "type" : "linear", "time_ms" : 100, "updateFrequency" : 20.0000, "updateDelay" : 0 } },
@Kwiboo Settings
I have not tested these but I would expect they will have stronger colours than my defaults. I’ll update this once I give it a better test.
"color" : { "transform" : [ { "id" : "default", "leds" : "*", "hsv" : { "saturationGain" : 1.5000, "valueGain" : 0.5000 }, "red" : { "threshold" : 0.0500, "gamma" : 1.7000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 }, "green" : { "threshold" : 0.0500, "gamma" : 1.7000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 }, "blue" : { "threshold" : 0.0500, "gamma" : 1.7000, "blacklevel" : 0.0000, "whitelevel" : 1.0000 } } ], "smoothing" : { "type" : "linear", "time_ms" : 100, "updateFrequency" : 20.0000, "updateDelay" : 0 } },


