[HowTo] [RPi] Hyperion.NG under OSMC (english)

[RPi] Hyperion.NG under OSMC (english)

Contents:

Step 1: Activate SPI
Step 2: Install dependencies
Step 3: Compile and install Hyperion.NG
Step 4: Run Hyperion as a service

Step 1:
Connect with Putty to your RPi and enter the following command:

Code:
sudo nano /boot/config.txt

Search for the line # dtparam = spi = on and remove the hash (hash) symbol in front of it.
Then save the file (Ctrl + o), quit nano (Ctrl + x) and restart your RPi with this command:

Code:

sudo reboot

edit: You can also go to My OSMC ā†’ Pi Config ā†’ Hardware Support ā†’ Enable SPI Support
Activate SPI.

Step 2:
The dependencies are installed via the following commands in Putty:

Code:

sudo apt-get update sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libqt5sql5-sqlite rbp-userland-dev-osmc

Step 3:
To compile and install Hyperion.NG, run this one-liners in Putty and cook your best tea or coffee. :wink:
Code:

wget -qO- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/compile.sh | sh -s hyperion Release install

Step 4:
Youā€™ve probably already drunk your hot drink?!? :slight_smile:
Let us now turn to the automated execution (service) of Hyperion.NG.
With the following command (under Putty) you create a new file called hyperion.service under /lib/systemd/system/

Code:

sudo nano /lib/systemd/system/hyperion.service

ā€¦ and insert the following content in it.

Code:

[Unit]
Description=Hyperion ambient light systemd service
After=network.target

[Service]
ExecStart=/usr/local/bin/hyperiond
WorkingDirectory=/usr/local/share/hyperion/bin
User=osmc
TimeoutStopSec=5
KillMode=mixed
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

edit: do not forget to save (Ctrl + o) and finish (Ctrl + x) of nano.

Finally, restart the systemd service and activate / start the Hyperion.NG service.

Code:

sudo systemctl daemon-reload
sudo systemctl enable hyperion.service
sudo systemctl start hyperion.service

voilĆ 

2 Likes

I hope this HowTo is useful.

3 Likes

Can I follow these instructions to install hyperion on a Vero 4k+?

The thread for Vero 4k is here

1 Like

So there is stuff missing that ti thought i append to this howto

the webui which was missing which is the key feature for hyperion.ng is reached on

http://<insert your ip here>:8090/

there is a great setup tool and wizards available under the webui but for lightpack users running under osmc will result in segment fault when a it tries to recover a serial for the application since it cant retrieve the serial from usb this an be solved by either running it as root or creating a udev rule

/etc/udev/rules.d/90-usbpermission.rules

SUBSYSTEM==ā€œusbā€,GROUP=ā€œusersā€,MODE=ā€œ0666ā€

then type sudo udevadm control --reload to get the serial type

sudo lsusb -d 1d50:6022 -v | grep iSerial

another method is to apply sudo to the systemd file see opening post to the line ExecStart so it looks like this

ExecStart=/usr/bin/sudo /usr/local/bin/hyperiond -u /home/osmc/.hyperion

then it wont result in the application going into segfault its nice too see that there is a path forward from the devs which hyperion was clearly missing it has some bugs and is in beta so remember it wont run stable and it is missing key features like menus being lit up instead of just movies like in the older version but im sure it will get a patch for that in the future

Hello,
First of all thanks @Cosmicbase for the excellent step by step!
I was able to setup HyperionNG on a Raspi3.
Iā€™ve a question though - cause I canā€™t accomplish a thing which is almostā€¦essential :slight_smile:

When I turn Off the TV the leds are still on.
Iā€™ve setup that OSMC should Hibernate,sleep, ā€¦ through CEC but without luck.
I then though well, I could start/stop the hyperionNG service through a buttonā€¦ but the only PY Script I found is for Hyperion not for HyperionNG.

I noticed also, that when I stop manually the HyperionNG Service (sudo systemctl stop hyperion.service) the led stay powered on on WHITE (led stripe is an APA102c)

Can someone help?
Thanks in advice :slight_smile:

check my hyperion helper it could be modified to suit your needs it just need to check for cec status instead of time

Iā€™ll check it out when I get home.
Iā€™m not really good with bash scripting since Iā€™m a WinEng, then your script should become something like this?
if [[ $(echo 'pow 0' | cec-client -s -d 1 RPI) =~ "power status: on" ]]; then hyperion_service_check_disabled; exit 1; fi hyperion_service_check_enabled else if if [[ $(echo 'pow 0' | cec-client -s -d 1 RPI) =~ "power status: standby" ]]; then hyperion_service_check_disabled; fi

Needs to be a while do statement

https://www.cyberciti.biz/faq/bash-while-loop/

Hello,
Iā€™m having trouble setting up OSMC with Hyperion.
Till yesterday it worked without problems, today I had to reinstall the whole thing and now only the FIRST led is lit up.
All other are shut down.

Does somebody know what it could be?

You were right to post here in the first place so I deleted to new thread you started and moved it here.

Hi,

Apologises to resurrect this, but Iā€™m trying to install Hyperion NG on my raspberry pi and get stuck at step 3, when i put this command in, the script starts and asks a question to continue Y/n for additional disk space, but its automatically aborting and not letting me interact to say yes.

I have tried running it again but get the same result. If i continue you on, i dont seem to get the webui so i assume this failure is stopping me from proceeding.

I also tried the install procedure on the hyperion ng github, but that doesnā€™t seem to work for me either. I have tried several OSMC build images from 2019 to the latest also.

Any help would be appreciated.

Just to update this, I ended up using the pre-built image ā€˜hyperbianā€™ (GitHub - Paulchen-Panther/HyperBian: Hyperion pre installed on Raspberry Pi OS Lite)

This got me up and running with hyperion but Iā€™m now stuck trying to get my original ā€˜lightpackā€™ to work . As per the helpful instructions from @toast i can see the usb lightpack detected by the pi , Iā€™ve retrieved the serial and created a udev rule, but it still wont initiate the lighpack. Iā€™m unsure if its the udev rule that is not correct or iā€™m missing something else.

update:- ignore above, I made a mistake on the udev rule. its now working fine now.

I installed it on a raspb 2b using OSMC. Then i set up a led strip connected to a nodemcu running WLED. Everything connect well and the lights are working good but the problem is that as soon as the hyperion service start image the image of the OSMC start to blink (image-black)
I have search everywhere but nobody is having this kind of issue

Any advice really appreciate