1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + LibreELEC [Guide] Install latest alpha as a service

Discussion in 'Software Support' started by Blokmeister, 3 April 2020.

  1. Blokmeister

    Blokmeister Member

    RPi2, 32/64bit, +AtmoOrb
    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:
    cd /storage/downloads
    If the folder doesn't exist, create it:
    cd /storage
    mkdir downloads
    cd downloads
    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

    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:
    cd /storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin

    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.
    /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:
    chmod +x start_hyperion_as_service.sh
    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:
    cd /storage/.config/system.d
    nano hyperion-ng.service
    In the text editor, paste the content below, and then close the text editor by pressing :x, saving the modified buffer.
    Description=Hyperion ambient light systemd service for user
    ExecStart= /bin/bash /storage/downloads/Hyperion-2.0.0-alpha.4-Linux-armv7hf/bin/start_hyperion_as_service.sh

    Before we can run the service, we need to reload systemctl:
    systemctl daemon-reload
    Then we can finally test the service:
    systemctl start hyperion-ng.service
    To test if we are successful, type:
    systemctl status hyperion-ng.service
    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:

    systemctl enable hyperion-ng.service

    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.
    • Thank you Thank you x 2
    • Informative Informative x 1
  2. Zenairo

    Zenairo New Member

    RPi3, +PhilipsHue
    Excellent little guide, I meant to comment on this literally hours after you posted it but my account was too new to reply and this forum doesn't provide a clear way of knowing when a new account can post, unless I missed that?

    I followed your instructions and now have Hyperion running on a Raspberry Pi 4 v1.2 using WS2815 strips. I am grabbing the HDMI signal from my Onkyo TX-RZ3100 using the Zone 2 output.

    To use my RPI4 v1.2 with ws281x I had to update what Hyperion uses to include the latest version of this file: https://github.com/jgarff/rpi_ws281x/blob/master/rpihw.c

    Here is a video showing my results:

    I've since hidden my cables, I am using 3-conductor wire in the wall connected to a 3-pin DMX wall plate behind the TV and behind the entertainment center for easy connect/disconnect.
    Last edited: 21 April 2020
    • Like Like x 2
  3. Claudio Branco

    Claudio Branco Cranco

    Greetings !

    Great tutorial! Clean and precise , hard to find. Have been thinking of switching but always unclear as to how.

    Is this the same procedure for Raspbian?
    I currently run Hyperion classic flawlessy. Reckon I should upgrade ?
    Should I do it on a different SD card just for safety ? Can I import my current configs ?

    Thanks a mil
  4. jonaspaulo

    jonaspaulo New Member

    Sorry can delete, duplicate