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

RPi + LibreELEC [HowTo] Install Hyperion.ng on LibreELEC x86_64/RPi (inoffiziell/unofficially)

Discussion in 'Software Support' started by Paulchen-Panther, 19 March 2020.

  1. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    203
    Hardware:
    RPi3, 32/64bit
    @Rene Zuch Sorry, if I misled you regarding APA102. The issue occurs, if a LED-Device has Rewrite Time >0 configured.
    Therefore, it might also apply to your installation.
    You could test it installing the PR1008. How to do this is outlined at the beginning of this thread.
     
  2. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    Hi,

    I tried with PR 1008 but it doesn´t change anything. I also tried putting the refresh time to 0 ms, also no change.

    One question I´m not sure about: Can I immediately start PR 1008 with ~/hyperion_pr1008/1008.sh or do I have to stop the other instance (alpha 8) before I do so?

    My guess is that it has to do with the Vmin, Vmax, Hmin, Hmax settings. They seem to have completely different behaviour. Even when I set all RGB treshold values to 100 it does not switch off the source. I have a blue screen when switching off so basically I don´t need these settings. It´s nowhere documented but my guess is that these are coordinates between 0 and 1 that reflect the screen size horizontally and vertically, but. In alpha 6 it worked for me with the default 0.25 - 0.75 but in alpha 8 and PR 1008 it does not.

    I tried for hours to find settings that work but without succeess. The only thing I see is when I put Vmin and Hmin to 0.5 and Vmax and Hmax to 0.51 it´s switching off but then a few seconds later on in blue again. That game goes on forever. Is there any way to disable the usage of VHmin / max in general?

    Thanks for your effort
    René

    Edit: Some logs also show the signal detection thing.



    2020-09-19T15:08:26.087 hyperiond JSONSERVER : <DEBUG> JsonServer.cpp:119:closedConnection() | Connection closed
    2020-09-19T15:08:28.112 hyperiond V4L2:/DEV/VI : <INFO> Signal lost
    2020-09-19T15:08:29.124 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now inactive
    2020-09-19T15:08:29.124 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 255
    2020-09-19T15:08:29.124 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[255], previousPriority[240]
    2020-09-19T15:08:29.125 hyperiond HYPERION : <DEBUG> Hyperion.cpp:541:handlPriorityChangedLedDevice() | No source left -> switch LED-Device off
    2020-09-19T15:08:29.872 hyperiond V4L2:/DEV/VI : <INFO> Signal detected
    2020-09-19T15:08:29.873 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now active
    2020-09-19T15:08:29.873 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 240
    2020-09-19T15:08:29.876 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[240], previousPriority[255]
    2020-09-19T15:08:29.876 hyperiond HYPERION : <DEBUG> Hyperion.cpp:548:handlPriorityChangedLedDevice() | new source available -> switch LED-Device on
    2020-09-19T15:08:32.669 hyperiond V4L2:/DEV/VI : <INFO> Signal lost
    2020-09-19T15:08:33.680 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now inactive
    2020-09-19T15:08:33.681 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 255
    2020-09-19T15:08:33.681 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[255], previousPriority[240]
    2020-09-19T15:08:33.682 hyperiond HYPERION : <DEBUG> Hyperion.cpp:541:handlPriorityChangedLedDevice() | No source left -> switch LED-Device off
    2020-09-19T15:08:43.180 hyperiond V4L2:/DEV/VI : <INFO> Signal detected
    2020-09-19T15:08:43.180 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now active
    2020-09-19T15:08:43.181 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 240
    2020-09-19T15:08:43.182 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[240], previousPriority[255]
    2020-09-19T15:08:43.182 hyperiond HYPERION : <DEBUG> Hyperion.cpp:548:handlPriorityChangedLedDevice() | new source available -> switch LED-Device on
    2020-09-19T15:08:46.853 hyperiond V4L2:/DEV/VI : <INFO> Signal lost
    2020-09-19T15:08:47.817 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now inactive
    2020-09-19T15:08:47.817 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 255
    2020-09-19T15:08:47.818 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[255], previousPriority[240]
    2020-09-19T15:08:47.818 hyperiond HYPERION : <DEBUG> Hyperion.cpp:541:handlPriorityChangedLedDevice() | No source left -> switch LED-Device off
    2020-09-19T15:08:54.167 hyperiond V4L2:/DEV/VI : <INFO> Signal detected
    2020-09-19T15:08:54.167 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 240 is now active
    2020-09-19T15:08:54.167 hyperiond HYPERION : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 240
    2020-09-19T15:08:54.169 hyperiond HYPERION : <DEBUG> Hyperion.cpp:538:handlPriorityChangedLedDevice() | priority[240], previousPriority[255]
    2020-09-19T15:08:54.169 hyperiond HYPERION : <DEBUG> Hyperion.cpp:548:handlPriorityChangedLedDevice() | new source available -> switch LED-Device on
    ^[[A^[[A^[[A2020-09-19T15:08:56.047 hyperiond JSONSERVER : <DEBUG> JsonServer.cpp:103:newConnection() | New connection from: ::ffff:192.168.0.18
    2020-09-19T15:08:56.048 hyperiond JSONCLIENTCO : <DEBUG> JsonAPI.cpp:81:handleInstanceSwitch() | Client '::ffff:192.168.0.192' switch to Hyperion instance 0
    2020-09-19T15:08:56.088 hyperiond JSONSERVER : <DEBUG> JsonServer.cpp:119:closedConnection() | Connection closed
     
    Last edited: 19 September 2020
  3. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    824
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    The registered hyperion service is stopped before the PR starts. So there shouldn't be any problems when testing a PR with the existing installation. To start the Hyperion service of the existing installation, simply restart the PI.
     
  4. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    I did not see this post until now. Is the log I put in the post before good enough or you need something else?

    Regards
    René
     
  5. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    Thx for clarification. I understand more and more. Just a matter of years until I´m an expert ;-)
     
    • Like Like x 1
  6. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    203
    Hardware:
    RPi3, 32/64bit
    @Rene Zuch As your Grabber switches on/off and has blue as no signal indicator, it lloks like the blue is from the grabber...?

    I would suggest you

    1.Remove the Grabber and test, if the problem after start-up effect is there too
    2. Install PR1008 and verify that it is running (via UI, System->About)
    3. Test without Grabber again
    4. Test withGrabber

    Just to see, if your problem is grabber related or not
     
  7. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    Hi,

    I don´t see the point here. The blue is coming from the HDMI to AV converter when it gets no HDMI signal.

    But If everything is working fine in alpha 6 how can the problem be grabber (AV converter) related?

    So I strongly believe that my problem is something else. As told I also put the Refresh time to 0 in alpha 8 and it did not solve the signal detection problem.
    For me signal detection and especially the Vmin, Vmax, Hmin, Hmax functionality is broken in alpha 8.

    René

    Some more infos:

    Alpha 6
    I switch off my HDMI source the LED´s turn blue and after 4 seconds Signal detection is working and the LED´s turn off

    Alpha 8
    I switch off my HDMI source the LED´s turn blue but they never turn off. The settings for signal detection are identical. When I play with the Vmin, Vmax, Hmin, Hmax the blue sometimes goes off but few seconds later goes on again.
     
    Last edited: 20 September 2020
  8. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    203
    Hardware:
    RPi3, 32/64bit
    @Rene Zuch Fair enough. I tried to rule out that you face the issue of #1007 and the observed behavious is indeed related to the grapper signal detection.
     
  9. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    @Lord-Grey

    Ok. I did the tests. Here are the results:

    1.Remove the Grabber and test, if the problem after start-up effect is there too --> I guess you meant alpha 8. The start effect does not disappear even without grabber
    2. Install PR1008 and verify that it is running (via UI, System->About) --> checked and version is correct
    3. Test without Grabber again --> start effect is going away after defined time --> LED´s stay off afterwards
    4. Test withGrabber --> start effect is going away after defined time --> source USB Grabber is activated --> LEDs turn blue. Signal detection for blue is not working

    René
     
  10. Lord-Grey

    Lord-Grey Moderator Staff Member Developer

    Messages:
    203
    Hardware:
    RPi3, 32/64bit
    Thanks for the testing!
    That confirms that the issue is related to grabbing and not Led-output.
     
  11. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    824
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    @Rene Zuch what kind of external grabber do you use
     
  12. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    EasyCAP USB 2.0 Audio und Video Grabber mit Syntek STK1160 Chipsatz

    But it´s working perfectly fine in alpha 6 and 8 except Signal detection is not working in alpha 8.
     
  13. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    824
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    @Rene Zuch As soon as my new micro HDMI to HDMI cable arrives, I'll look into it.
     
  14. Rene Zuch

    Rene Zuch New Member

    Messages:
    24
    Hardware:
    RPi3, +PhilipsHue
    Perfect thanks. If I can help in any way (remote connection to my Hyperion etc.) let me know.

    Regards
    René
     
  15. AmbiMod

    AmbiMod Member

    Messages:
    56
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    Hi all,

    I modify the LibreELEC.sh script to install latest Hyperion NG Alpha or HyperHDR relase with user choice. ( 1 or 2 ).

    So you can choose between Hyperion NG and HyperHDR. The script will install the Hyperion/HyperHDR packages and dependencies depending the system you are running and the Raspberry you have automaticaly, as librelec script does.

    If a version of HyperHDR is found and you want to install Hyperion, it will uninstall Hyperion First and vice versa.

    You can't install HyperHDR on LibreELEC so if you choose to install it on LibreELEC ( maybe @Awawa can do something for that, i don't know. Some librairies are missing when i want to install it ), it will install Hyperion NG instead without user entry.

    You can find the file here : HyperionInstall.bash. I'm writing a Tutorial on Hyperion NG too( not finished yet ). You can find it here.

    https://ambimod.jimdofree.com/2020/09/14/tuto-mettre-en-place-une-installation-en-utilisant-hyperion-ng-sous-pc-windows-micropc-raspbian-hyperbian-libreelec-avec-différents-éléments-lumineux/

    Thanks to the writer. ( I delete all i don't need, sorry for that ). Script is in French but i can translate it.

    Code:
    Updated 
     
    Last edited: 3 October 2020
  16. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    824
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Thanks to the developers in the script would definitely be appropriate.
     
    • Like Like x 1
  17. Awawa

    Awawa Active Member

    Messages:
    166
    Hardware:
    RPi1/Zero, RPi3, +nodeMCU/ESP8266
    @AmbiMod maybe you've got some output with missing packages? BTW latest version is for Debian Buster based system. Don't know how it's related to Libreelec but you could try the previous one intended for Debian Stretch to see if something's changed.
     
    Last edited: 2 October 2020
    • Like Like x 1
  18. AmbiMod

    AmbiMod Member

    Messages:
    56
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    Sorry for that, my bad, i indicate the source on my blog but not in the script.

    As i said i delete all the lines that i don’t need when i made the modification.

    I will add this info as soon as possible.

    Last words. Is not in my « habitude » to take for me the works of other. Nervermind...
     

    Attached Files:

    Last edited: 2 October 2020
  19. AmbiMod

    AmbiMod Member

    Messages:
    56
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    When i can i will post a screenshot with the error of the missing library.

    I will test your previous version too to see if i have the same error.

    ‘Thanks for you HyperHDR by the way.

    And if you want to put the script of @Paulchen-Panther modified by me on your GitHub you can.
     
    Last edited: 2 October 2020
  20. AmbiMod

    AmbiMod Member

    Messages:
    56
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    Here you will find the error i have when i want to install the v8.2.0.8A2 package. I can't install the previous version because you don't provide an arm .tar.gz package in your release.

    @Paulchen-Panther Here you will find the code of modified script as expected. ;)

    Code:
    #!/bin/sh
    # Script for installing Hyperion.NG or HyperHDR release on many Raspberry Pi Operating System
    
    #Set welcome message
    echo '*******************************************************************************'
    echo 'This script will install Hyperion.NG or HyperHDR on LibreELEC and Raspberry Pi OS ( or other system )'
    echo ''
    echo 'Created by brindosch and modified by Paulchen-Panther (thanks to horschte from kodinerds)'
    echo 'hyperion-project.org - the official Hyperion source'
    echo ''
    echo 'Modified by AmbiMod to have some new features'
    echo ''
    echo '*******************************************************************************'
    
    
    # Verification que nous sommes sur LibreELEC
    OS_LIBREELEC=`grep -m1 -c LibreELEC /etc/issue`
    
    # Verification du type de Processeur pour savoir si nous sommes en presence d'un Raspberry Pi ou d'un ordinateur x86_64
    CPU_RPI=`grep -m1 -c 'BCM2708\|BCM2709\|BCM2710\|BCM2835\|BCM2836\|BCM2837\|BCM2711' /proc/cpuinfo`
    CPU_x86_64=`grep -m1 -c 'Intel\|AMD' /proc/cpuinfo`
    # Check that
    if [ $CPU_RPI -ne 1 ] && [ $CPU_x86_64 -ne 1 ]; then
        echo "---> Erreur critque : On est pas sur Raspberry Pi ou en presence d'un processeur x86_64 -> Annulation."
        exit 1
    fi
    
    # Recuperation du modele de Raspberry Pi
    RPI_1=`grep -m1 -c 'BCM2708' /proc/cpuinfo`
    RPI_2_3_4=`grep -m1 -c 'BCM2709\|BCM2710\|BCM2835\|BCM2836\|BCM2837\|BCM2711' /proc/cpuinfo`
    Intel=`grep -m1 -c 'Intel' /proc/cpuinfo`
    AMD=`grep -m1 -c 'AMD' /proc/cpuinfo`
    
    # Recuperation du script init à utiliser
    USE_SYSTEMD=`grep -m1 -c systemd /proc/1/comm`
    
    # Verification de la non-execution du deamon boblight
    BOBLIGHT_PROCNR=$(pidof boblightd | wc -l)
    if [ $BOBLIGHT_PROCNR -eq 1 ]; then
        echo "---> Erreur critique : Une instance de Boblight est en cours d'execution. Priere de l'arreter dans le menu de Kodi avant d'installer Hyperion -> Annulation."
        exit 1
    fi
    
    #Verification de la presence de dtparam=spi=on dans config.txt sur libreELEC
    if [ $OS_LIBREELEC -ne 0 ]; then
            if [ $CPU_RPI -eq 1 ]; then
                    SPIOK=`grep '^\dtparam=spi=on' /flash/config.txt | wc -l`
                            if [ $SPIOK -ne 1 ]; then
                                    mount -o remount,rw /flash
                                    echo '---> LibreELEC tournant sur Raspberry trouvé mais "dtparam=spi=on" absent de /flash/config.txt. Rajout de ce parametre de configuration.'
                                    sed -i '$a dtparam=spi=on' /flash/config.txt
                                    mount -o remount,ro /flash
                            fi
            fi
    fi
    
    OTHEROS_HYPERIONFILE_RPI1=Linux-armv6l.deb
    OTHEROS_HYPERIONFILE_RPI234=Linux-armv7l.deb
    LIBREELEC_HYPERIONFILE_RPI1=Linux-armv6l.tar.gz
    LIBREELEC_HYPERIONFILE_RPI234=Linux-armv7l.tar.gz
    REBOOTMESSAGE='Veuillez redemarrer votre Pi afin que la ligne dtparam=spi=on copié dans le fichier config.txt soit prise en compte.'
    
    Uninstall_Hyperion()
    {
    if sudo dpkg-query -l | grep hyperion; then
            echo ""
            echo "Version d'Hyperion detecté. Desinstallation de la version existante d'Hyperion avant installation."
            echo ""
            sudo dpkg --remove hyperion
    else
            if sudo dpkg-query -l | grep hyperhdr; then
            echo ""
            echo "Version d'HyperHDR detecté. Desinstallation de la version existante d'HyperHDR avant installation."
            echo ""
            sudo dpkg --remove hyperhdr
            fi
    fi
    }
    
    Verif_Dependences()
    {
    echo ""
    echo "Installation des dependences si neccessaire."
    if apt list libglvnd0 cec-utils | awk -F "/" '{ $2 = "" ; print $0 }' > list.txt; then
            packages=$(cat list.txt)
            grep -q '[^[:space:]]' < list.txt
            sudo apt-get install -y $packages
            rm list.txt
    fi
    }
    
    Source_HyperionNG()
    {
    HYPERION_DOWNLOAD_URL="https://github.com/hyperion-project/hyperion.ng/releases/download"
    HYPERION_RELEASES_URL="https://api.github.com/repos/hyperion-project/hyperion.ng/releases"
    HYPERION_LATEST_VERSION=$(curl -sL "$HYPERION_RELEASES_URL" | grep "tag_name" | head -1 | cut -d '"' -f 4)
    HYPERIONVERSION=Hyperion
    }
    
    Source_HyperHDR()
    {
    HYPERION_DOWNLOAD_URL="https://github.com/awawa-dev/HyperHDR/releases/download"
    HYPERION_RELEASES_URL="https://github.com/awawa-dev/HyperHDR/releases"
    HYPERION_LATEST_VERSION=$(curl -sLo /dev/null -w '%{url_effective}' github.com/awawa-dev/HyperHDR/releases/latest | cut -d 'v' -f 3)
    HYPERION_LATEST_VERSIONv=$(curl -sLo /dev/null -w '%{url_effective}' github.com/awawa-dev/HyperHDR/releases/latest | cut -d '/' -f 8)
    HYPERIONVERSION=HyperHDR
    }
    
    Installation_HyperHDR()
    {
    Source_HyperHDR
    if [ $RPI_1 -eq 1 ]; then
            echo "Installation d'HyperHDR sur Raspberry Pi OS qui tourne sur un Raspberry 0 ou 1."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSIONv/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI1
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI1
    elif [ $RPI_2_3_4 -eq 1 ]; then
            echo "Installation d'HyperHDR sur Raspberry Pi OS qui tourne sur un Raspberry 2,3 ou 4."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSIONv/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI234
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI234
    fi
    }
    
    Installation_HyperNG_LibreELEC()
    {
    Source_HyperionNG
    if [ $RPI_1 -eq 1 ]; then
            echo "Installation d'Hyperion NG Alpha sur LibreELEC qui tourne sur un Raspberry 0 ou 1."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSION/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$LIBRELEC_HYPERIONFILE_RPI1
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$LIBREELEC_HYPERIONFILE_RPI1
    elif [ $RPI_2_3_4 -eq 1 ]; then
            echo "Installation d'Hyperion NG Alpha sur LibreELEC qui tourne sur un Raspberry 2,3 ou 4."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSION/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$LIBREELEC_HYPERIONFILE_RPI234
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$LIBREELEC_HYPERIONFILE_RPI234
    fi
    }
    
    Installation_HyperNG_AutreOS()
    {
    Source_HyperionNG
    if [ $RPI_1 -eq 1 ]; then
            echo "Installation d'Hyperion NG Alpha sur un autre systeme que LibreELEC qui tourne sur un Raspberry 0 ou 1."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSION/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI1
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI1
    elif [ $RPI_2_3_4 -eq 1 ]; then
            echo "Installation d'Hyperion NG Alpha sur un autre systeme que LibreELEC qui tourne sur un Raspberry 2,3 ou 4."
            HYPERION_RELEASE=$HYPERION_DOWNLOAD_URL/$HYPERION_LATEST_VERSION/$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI234
            HYPERIONFILE=$HYPERIONVERSION-$HYPERION_LATEST_VERSION-$OTHEROS_HYPERIONFILE_RPI234
    fi
    }
    
    Installation_LibreELEC()
    {
    if [ -d hyperion ]; then
            echo ""
            echo "Suppression de l'ancien dossier hyperion et desactivation du service."
            systemctl disable hyperion.service --now
            rm -R /storage/hyperion
    fi
    
    if [ -f $HYPERIONFILE ]; then
            echo ""
            echo "---> Installation d'$HYPERIONFILE qui se trouve localement."
            tar -xzf $HYPERIONFILE --strip-components=1 -C /storage share/hyperion/
            Script_Hyperion
    else
            echo ""
            echo "---> Telechargement et installation d'$HYPERIONFILE"
            curl -# -L --get $HYPERION_RELEASE | tar --strip-components=1 -C /storage share/hyperion -xz
            Script_Hyperion
    fi
    }
    
    Installation_AutreOS()
    {
            if [ -f $HYPERIONFILE ]; then
                    echo ""
                    echo "---> Installation de $HYPERIONFILE qui se trouve localement."
                    sudo dpkg -i $HYPERIONFILE
            else
                    echo ""
                    echo "---> Telechargement et installation d'$HYPERIONFILE"
                    wget $HYPERION_RELEASE && sudo dpkg -i $HYPERIONFILE
            fi
    }
    
    Script_Hyperion()
    {
    # Suppression des dependences inutile sur la version Alpha 7
    if [ "$HYPERION_LATEST_VERSION" = "2.0.0-alpha.7" ]; then
            rm /storage/hyperion/lib/libcec*
            rm /storage/hyperion/lib/libz*
    fi
    
    # Activation des droits d'execution
    chmod +x -R /storage/hyperion/bin
    
    # Creation du service
    echo "---> Installation du script dans system.d"
    SERVICE_CONTENT="[Unit]
    Description=Hyperion ambient light systemd service
    After=network.target
    
    [Service]
    Environment=DISPLAY=:0.0
    ExecStart=/storage/hyperion/bin/hyperiond --userdata /storage/hyperion/
    TimeoutStopSec=2
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=default.target"
    
    # Mise en place et activation du service hyperion
    echo "$SERVICE_CONTENT" > /storage/.config/system.d/hyperion.service
    systemctl -q enable hyperion.service --now
    echo "*******************************************************************************"
    echo "Installation d'Hyperion NG terminé !"
    echo $REBOOTMESSAGE
    echo "*******************************************************************************"
    exit 0
    }
    
    choix=0
    while [ "$choix" -eq 0 ]; do
            echo '*******************************************************************************'
            echo "Script d'installation HyperHDR / Hyperion NG Alpha"
            echo "Quelle version d'Hyperion voulez-vous installer ? "
            echo "1. Pour HyperHDR, Tapez 1"
            echo "2. Pour Hyperion NG Alpha, Tapez 2"
            echo '*******************************************************************************'
            read -r choix
            case "$choix" in
            1)
            if [ $OS_LIBREELEC -ne 0 ]; then
                    echo ""
                    echo "Installation d'HyperHDR impossible sur LibreELEC. Installation d'Hyperion NG Alpha à la place."
                    echo ""
                    Uninstall_Hyperion
                    Installation_HyperNG_LibreELEC
                    Installation_LibreELEC
            else
                    Verif_Dependences
                    Uninstall_Hyperion
                    Installation_HyperHDR
                    Installation_AutreOS
            fi;;
    
            2)
            if [ $OS_LIBREELEC -ne 0 ]; then
                    Uninstall_Hyperion
                    Installation_HyperNG_LibreELEC
                    Installation_LibreELEC
            else
                    Verif_Dependences
                    Uninstall_Hyperion
                    Installation_HyperNG_AutreOS
                    Installation_AutreOS
            fi;;
    
            *)
            echo ""
            echo "Mauvais choix. Entrez soit 1, soit 2."
            echo ""
            sh HyperionInstall.bash
        esac
    done
    
     

    Attached Files:

    Last edited: 3 October 2020
    • Like Like x 1