[Tutorial] Hyperion Ambilight on Linux

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
illiac4 Offline
Posts: 486
Joined: May 2009
Reputation: 2
Post: #1
Updated: Now includes effect engine. Also update Hyperion on Android to v1.3.

On Raspberry Pi it is very popular. So here is the tutorial how to compile it on Linux and use it. It is uses almost no CPU usage like 1% for 100LEDs compared to boblight which was using around 30-35% of cpu usage on AppleTV with CB2. On my Atom D2550 it is not worth a mention.
I am using it also on regular HTPC based on Linux.

First install pre-requirements and then compile:
sudo apt-get update
sudo apt-get install git cmake build-essential libprotobuf-dev libQt4-dev libusb-1.0-0-dev protobuf-compiler python-dev
cd /tmp
git clone https://github.com/tvdzwan/hyperion.git
cd hyperion
sudo make
sudo mkdir -p /media/scripts/hyperion
sudo cp -a /tmp/hyperion/effects /media/scripts/hyperion/effects
sudo cp /tmp/hyperion/bin/hyperion-remote /usr/bin/
sudo cp /tmp/hyperion/bin/hyperiond /usr/bin/
sudo chmod +x /usr/bin/hyperion-remote
sudo chmod +x /usr/bin/hyperiond

Now you have compiled Hyperion and the binaries are now in place.
In next step we will make it autostart. In Rpi it uses upstart script but in Linux HTPC the best way to start it is using autoexec.py under userdata folder of XBMC.
If the file is not there then just create it and put this inside:
import os, sys

So now lets create the script under /media/scripts/hyperion_startup.sh
The content of the script should be:
/usr/bin/hyperiond /etc/hyperion.config.json >/dev/null 2>&1 &
And also do not forget to make it executable.

Maybe you can put the line (/usr/bin/hyperiond /etc/hyperion.config.json >/dev/null 2>&1 &) directly into autoexec.py, but i did not try.

Now we need to create config file for Hyperion. Just download the file HyperCon from their page https://github.com/tvdzwan/hyperion/wiki/configuration and do a little reading.
With the tool create a config file. Make sure that you will set the right type like "adaligh,...", the right bound rate (very important!!!). adalight is using 115200 boundrate, the right type of LEDs (2801,...). For non RPi devices you can disable XBMC checker under the tab "External".
After you have created hyperion.config.json file, copy them under /etc/

Now you need to download the addon for Hyperion. It is similar like the one from Boblight. You can get it here https://github.com/tvdzwan/hyperion/wiki...for-RPi%29

This was the first step of compiling and basic installation of Hyperion.

Boblight and Hyperion can not run at the same time since they are using the same port and the same device. So disable the boblight first.

If you would like to use the Hyperion with the light on all the time, also on visualizations and also on menus then you can use the boblight-x11 daemon. You will need to compile boblight and use just the binaries boblight-x11 (boblightd and boblight-constant you can delete).
With this command you can call Hyperion with X11:
/usr/bin/hyperiond /etc/hyperion.config.json >/dev/null 2>&1 &
DISPLAY=:0.0 /usr/bin/boblight-X11 -f -x > /dev/null 2>&1 &

For easy finding of perfect light configuration use Android app Hyperion from the google market. With this app you can see in realtime how the parameters effects the ambilight. When you will find the perfect spot just enter it into HyperConf.

You can visit http://bite-in.com/?p=9 on how to build standalone ambilight system based on Hyperion and RPi.
(This post was last modified: 2013-12-15 17:58 by illiac4.)
find quote
Swifty Offline
Posts: 591
Joined: Nov 2008
Reputation: 4
Post: #2
Just want to say thanks for this post, I stumbled upon Hyperion yesterday and will be trying it out on my ION box soon Smile
find quote
schumi2004 Online
Posting Freak
Posts: 1,055
Joined: Aug 2011
Reputation: 9
Post: #3
Anyone got this working in OpenELEC and does it have a addon to configure?

[Image: all-thin-banner.jpg]
find quote
ijsbeer79 Offline
Junior Member
Posts: 35
Joined: Jan 2014
Reputation: 0
Post: #4
See the wiki: https://github.com/tvdzwan/hyperion/wiki...h-OpenELEC

The only thing what went wrong: nothing added in the autostart.sh, so it didn't startup automaticlly. Create one before i nstalling with:

echo "#!/bin/sh" > /storage/.config/autostart.sh && chmod +x /storage/.config/autostart.sh
find quote
MisterT Offline
Junior Member
Posts: 1
Joined: Feb 2014
Reputation: 0
Post: #5
Hello !
Thank you for the tuto. I'm trying to set up an ambilight clone too with Hyperion.
But I have some troubles installing it..

Actually, I've no hardware yet: I'm trying to install all the soft-part first before buying the hard-part. Anyway.
I want to install it on my ubuntu laptop (I don't want to buy a rasberry pi: I will use ambilight only for film/tvshow played with my PC-laptop on my TV).
So, I would like to control LED using Hyperion+Arduino. Am-I a fool ?

I've succeeded to install hyperion on Ubuntu 13.10 !
(The LED test hyperion-remort --list seems to work)

So, if I understand everything, hyperiond is the server on MyIpAddress:19444 which will control the hardware part (Arduino).
Then I need a deamon which will capture screenshot of my video and send them to hyperiond, isn't it ?

But, I would like to not use the XBMC plugin...
Is-it possible ? I don't know how to do this...
Could you help me ?
find quote
Combl Offline
Junior Member
Posts: 1
Joined: Feb 2014
Reputation: 0
Post: #6
Hey there,

thanks for your tutorial. But the make command exits with an error.

Ubuntu 12.10 - XBMCbuntu (GNU/Linux 3.5.0-39-generic)
[ 3%] Built target jsoncpp
[ 5%] Built target getoptPlusPlus
[ 7%] Built target serialport
[ 8%] Built target hidapi-libusb
[ 14%] Built target hyperion-utils
[ 28%] Built target leddevice
[ 30%] Built target blackborder
[ 39%] Built target effectengine
[ 54%] Built target hyperion
[ 62%] Built target jsonserver
[ 71%] Built target protoserver
[ 77%] Built target boblightserver
[ 80%] Built target xbmcvideochecker
Linking CXX executable ../../bin/hyperiond
../../lib/libeffectengine.a(Effect.cpp.o): In function `Effect::run()':
Effect.cppSad.text+0xdf3): undefined reference to `Py_InitModule4'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/hyperiond] Error 1
make[1]: *** [src/hyperiond/CMakeFiles/hyperiond.dir/all] Error 2
make: *** [all] Error 2

Any idea how I can compile it?


Got it working now: https://github.com/tvdzwan/hyperion/issues/49 (look @ post "benagricola commented February 22, 2014")
(This post was last modified: 2014-02-25 21:33 by Combl.)
find quote
aperfectme Online
Junior Member
Posts: 24
Joined: Feb 2013
Reputation: 2
Post: #7
In lubuntu how do I chek if the daemon is running? I'm trying to install it
but not luck yet.

Zotac ZBOX HD-ID11-U - Lubuntu 13.10 - XBMC Frodo 12.3
find quote
Eoghlear Offline
Senior Member
Posts: 106
Joined: Aug 2009
Reputation: 0
Location: Netherlands
Post: #8
How do you guys update hyperion? By running the install script again?

[Image: widget]
find quote