Since there is no English tutorial yet, and I've struggled quite a bit today, I decided to make a guide on how to install the latest alpha4 hyperion on your Raspberry pi 2 and run it as a service.
Enable SSH on your raspberry pi through the user interface
Use your favourite SSH client to log in to your raspberry pi (default username is root, default password is libreelec)
Navigate to /storage/downloads:
If the folder doesn't exist, create it:
Download the latest alpha version of hyperion:
wget https://github.com/hyperion-project/hyperion.ng/releases/download/2.0.0-alpha.4/Hyperion-2.0.0-alpha.4-Linux-armv7hf-rpi.sh
Wait for the download to complete. Then make it executable and execute the script:
chmod +x Hyperion-2.0.0-alpha.4-Linux-armv7hf-rpi.sh
./Hyperion-2.0.0-alpha.4-Linux-armv7hf-rpi.sh
[INDENT][/INDENT]
Wait for the installation to complete and if needed, say Y to everything.
Now you can in principle already start hyperion simply by navigating to the directory and running hyperiond:
However, we are going to set up hyperion as a service, and create an additional log file to send the hyperion output to. This makes it easier for debugging.
First we are going to create a script that will run hyperion, and output the so-called stdout to a logfile, with a timestamp prepended to it. Make sure you are in the right directory, and then create a file called start_hyperion_as_service.sh
cd /storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin/
nano start_hyperion_as_service.sh
This will open a text editor. Paste the text below, and exit by pressing :x. When asked to save the modified buffer, press Y and enter.
#!/bin/bash
/storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin/hyperiond --userdata /storage/.hyperion | /usr/bin/awk '{ print strftime("%c: "), $0; fflush(); }' | /usr/bin/tee -a /storage/logfiles/hyperion-ng-service.log
Make sure the file is executable:
Now that we have the start script, we are going to create the service. First navigate to the system.d directory and create a service file there:
In the text editor, paste the content below, and then close the text editor by pressing :x, saving the modified buffer.
[Unit]Description=Hyperion ambient light systemd service for userAfter=network.target[Service]ExecStart= /bin/bash /storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin/start_hyperion_as_service.sh#WorkingDirectory=/storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/share/hyperion/binTimeoutStopSec=5KillMode=mixedRestart=on-failureRestartSec=5[Install]WantedBy=multi-user.target
Before we can run the service, we need to reload systemctl:
Then we can finally test the service:
To test if we are successful, type:
And you should see a hyperiond logfile. You should also be able to navigate to libreelec:8090 and see the hyperion.ng interface.
Now we want to start hyperion on boot, so we type:
And we are done! If you don't care about logfiles, you can skip making start_hyperion_as_service.sh, and simply add /storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin/hyperiond --userdata /storage/.hyperion to hyperion-ng.service.