[Tutorial] Hyperion Ambilight on Linux

  Thread Rating:
  • 1 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
illiac4 Offline
Fan
Posts: 521
Joined: May 2009
Reputation: 3
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:
Code:
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
cmake -DENABLE_DISPMANX=OFF
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:
Code:
import os, sys
os.system('/media/scripts/hyperion_startup.sh');
sys.exit()

So now lets create the script under /media/scripts/hyperion_startup.sh
The content of the script should be:
Code:
#!/bin/bash
/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.

Note:
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:
Code:
/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
Fan
Posts: 604
Joined: Nov 2008
Reputation: 5
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 Offline
Posting Freak
Posts: 1,288
Joined: Aug 2011
Reputation: 14
Post: #3
Anyone got this working in OpenELEC and does it have a addon to configure?
find quote
ijsbeer79 Offline
Member
Posts: 53
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: 3
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?

Thanks

Edit:
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 Offline
Junior Member
Posts: 30
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: 112
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
Muttly Offline
Junior Member
Posts: 16
Joined: Jun 2014
Reputation: 0
Location: Tamworth, UK
Post: #9
Great tutorial! I am running ubuntu 12.04 on a dual core atom 330 @ 1.6Ghz, and love the idea of the low overhead. I have the arduino all plumbed in and programmed via sketch. I have gone through the software install process above but am struggling to run the "Hypercon.jar". I read that it wont run as you need to mark it executable in the permissions, which I have. However it still fails to work. Any suggestions?
Oh yes I'm running V11.0 Eden.
(This post was last modified: 2014-06-25 21:17 by Muttly.)
find quote
Muttly Offline
Junior Member
Posts: 16
Joined: Jun 2014
Reputation: 0
Location: Tamworth, UK
Post: #10
(2014-06-25 20:49)Muttly Wrote:  Great tutorial! I am running ubuntu 12.04 on a dual core atom 330 @ 1.6Ghz, and love the idea of the low overhead. I have the arduino all plumbed in and programmed via sketch. I have gone through the software install process above but am struggling to run the "Hypercon.jar". I read that it wont run as you need to mark it executable in the permissions, which I have. However it still fails to work. Any suggestions?
Oh yes I'm running V11.0 Eden.

I will raise this as a seperate topic.
Thanks
find quote
Muttly Offline
Junior Member
Posts: 16
Joined: Jun 2014
Reputation: 0
Location: Tamworth, UK
Post: #11
Just wanted to add that if you want to use the config tool then you will need jre7 installed. However you need to purge the old java runtime first.
find quote
illiac4 Offline
Fan
Posts: 521
Joined: May 2009
Reputation: 3
Post: #12
You can run this tool on other system like windows. It is just for generating the config file.

About update you can run the script again. But before replacing compiled files you will need to stop hyperion.
I have wrote a simple script that it does this for me so i do not need to do it every time i want to update hyperon.
find quote