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

[hyperiond LEDDEVICE] <ERROR> Failed to open device

Discussion in 'German Talk' started by Cosmicbase, 1 November 2019.

  1. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Fri Nov 1 22:15:17 2019 from 192.168.2.30
    [email protected]:~$ sudo systemctl enable hyperion.service
    Failed to enable unit: File hyperion.service: Bad message
    [email protected]:~$
     
  2. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    mit was hast du die datei erstellt?
     
  3. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    gib mir bitte die ausgabe von:

    Code:
    cat hyperion.service
     
  4. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    sudo nano hyperion.service
     
  5. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Fri Nov 1 22:35:29 2019 from 192.168.2.30
    [email protected]:~$ cat hyperion.service
    cat: hyperion.service: No such file or directory
    [email protected]:~$ cd /etc/systemd/system/
    [email protected]:/etc/systemd/system$ cat hyperion.service
    [Unit] Description=Hyperion ambient light systemd service for user %i
    After=network.target [Service] ExecStart=/usr/bin/hyperiond
    WorkingDirectory=/usr/share/hyperion/bin User=%i TimeoutStopSec=5
    KillMode=mixed Restart=on-failure RestartSec=2 [Install]
    WantedBy=multi-user.target
    [email protected]:/etc/systemd/system$
     
  6. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Solltest du diesen Befehl nicht lieber im /etc/systemd/system verzeichnis ausführen?
     
  7. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Fri Nov 1 22:35:29 2019 from 192.168.2.30
    [email protected]:~$ cat hyperion.service
    cat: hyperion.service: No such file or directory
    [email protected]:~$ cd /etc/systemd/system/
    [email protected]:/etc/systemd/system$ cat hyperion.service
    [Unit] Description=Hyperion ambient light systemd service for user %i
    After=network.target [Service] ExecStart=/usr/bin/hyperiond
    WorkingDirectory=/usr/share/hyperion/bin User=%i TimeoutStopSec=5
    KillMode=mixed Restart=on-failure RestartSec=2 [Install]
    WantedBy=multi-user.target
    [email protected]:/etc/systemd/system$ cd ..
    [email protected]:/etc/systemd$ sudo systemctl enable hyperion.service
    Failed to enable unit: File hyperion.service: Bad message
    [email protected]:/etc/systemd$
     
  8. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Warum zum Geier wechselst du in das unterliegende Verzeichnis? :facepalm:

    Ladst dir am besten die datei von github runter:
    Code:
    wget -O hyperion.service https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/service/hyperion.systemd
     
  9. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Fri Nov 1 22:44:49 2019 from 192.168.2.30
    [email protected]:~$ wget -O hyperion.service https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/service/hyperion.systemd
    --2019-11-01 23:01:16-- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/service/hyperion.systemd
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 283 [text/plain]
    Saving to: 'hyperion.service'

    hyperion.service 100%[================>] 283 --.-KB/s in 0s

    2019-11-01 23:01:17 (2.38 MB/s) - 'hyperion.service' saved [283/283]

    [email protected]:~$
     
  10. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    :thumbsup:
    Jetzt nur noch in das systemd verzeichnis kopieren und aktivieren.
    Ich glaube du wartest bis morgen.
    Dann machen wir ein how-to dazu.
     
  11. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    OK danke und bis morgen.
    Melde dich bitte. Vielen lieben Dank für deine Hilfe.
    ;):)
     
    Last edited: 2 November 2019
  12. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Nimm es auch mal zum Vorteil für andere. Die können aus der Sache auch was lernen. ;)
     
  13. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    [RPi] Hyperion.NG unter OSMC

    Inhaltsverzeichnis:
    • Schritt 1: SPI aktivieren
    • Schritt 2: Abhängigkeiten installieren
    • Schritt 3: Hyperion.NG kompilieren und installieren
    • Schritt 4: Hyperion als Dienst ausführen

    Schritt 1:
    Verbindet euch mit Putty zu eurem RPi und gebt folgenden Befehl ein:
    Code:
    sudo nano /boot/config.txt
    Sucht nach der Zeile #dtparam=spi=on und entfernt das Raute (Hash) Symbol davor.
    Danach speichert ihr die Datei (Strg + o), beendet nano (Strg + x) und startet euren RPi mir diesem Befehl neu:
    Code:
    sudo reboot
    edit: Ihr könnt auch unter My OSMC -> Pi Config -> Hardware Support -> Enable SPI Support
    SPI aktivieren.


    Schritt 2:
    Die Abhängigkeiten installiert ihr über folgende Befehle 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
    Schritt 3:
    Um Hyperion.NG zu kompilieren und installieren, führt ihr diesen Einzeiler in Putty aus und kocht euch am besten eine Tee oder Kaffee. ;)
    Code:
    wget -qO- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/compile.sh | sh -s hyperion Release install
    Schritt 4:
    Ihr habt euer Heißgetränk bestimmt schon ausgetrunken?!?:)
    Kommen wir nun zum automatisierten ausführen (Dienst) von Hyperion.NG.
    Mit folgendem Befehl (unter Putty) erstellt ihr eine neue Datei namens hyperion.service unter /lib/systemd/system/
    Code:
    sudo nano /lib/systemd/system/hyperion.service
    ...und fügt folgenden Inhalt darin ein.
    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:Abspeichern (Strg + o) und benden (Strg + x) von nano nicht vergessen.

    Zum Schluß startet ihr noch den systemd Dienst neu und den Hyperion.NG Dienst aktiviert/startet ihr.
    Code:
    sudo systemctl daemon-reload
    sudo systemctl enable hyperion.service
    sudo systemctl start hyperion.service
    voilà
     
    Last edited: 2 November 2019
    • Like Like x 4
    • Informative Informative x 1
  14. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Vielen Dank für deine ausführliche Beschreibung.

    Im letzten Part habe ich folgende Ausgabe...
    Warum?

    GNU nano 2.7.4 File: /boot/config.txt
    gpu_mem_1024=256
    hdmi_ignore_cec_init=1
    disable_overscan=1
    start_x=1
    disable_splash=1
    gpu_mem_256=112
    sdtv_aspect=3
    gpu_mem_512=144
    hdmi_force_hotplug=1
    dtoverlay=lirc-rpi
    dtparam=gpio_in_pin=18
    sdtv_mode=2
    dtoverlay=spi-bcm2835-overlay
    dtparam=gpio_out_pin=17
    dtparam=spi=on



    GNU nano 2.7.4 File: /lib/systemd/system/hyperion.service Modified
    [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


















    nit] Description=Hyperion ambient light systemd service


    GNU nano 2.7.4 File: /lib/systemd/system/hyperion.service
    [Unit] Description=Hyperion ambient light systemd service
    After=network.target [Service] ExecStart=/usr/local/bin/hyperiond WorkingDirectory=/usr/local/share/hyperion/bin User=osmc nit] Description=Hyperion ambient light systemd serviceartSec=2 [Install]
    WantedBy=multi-user.target
    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

    [email protected]:~$ sudo systemctl daemon-reload
    [email protected]:~$ sudo systemctl enable hyperion.service
    Failed to enable unit: File hyperion.service: Bad message
    [email protected]:~$ sudo systemctl start hyperion.service
    Failed to start hyperion.service: Unit hyperion.service is not loaded properly: Bad message.
    See system logs and 'systemctl status hyperion.service' for details.
    [email protected]:~$
     
  15. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Hast du Schritt 1 bis 4 befolgt?
     
  16. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Ja, ich poste mal Punkt für Punkt die Ausgabe.
     
  17. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    1. Punkt

    GNU nano 2.7.4 File: /boot/config.txt
    gpu_mem_1024=256
    hdmi_ignore_cec_init=1
    disable_overscan=1
    start_x=1
    disable_splash=1
    gpu_mem_256=112
    sdtv_aspect=3
    gpu_mem_512=144
    hdmi_force_hotplug=1
    dtoverlay=lirc-rpi
    dtparam=gpio_in_pin=18
    sdtv_mode=2
    dtoverlay=spi-bcm2835-overlay
    dtparam=gpio_out_pin=17
    dtparam=spi=on


























    [ Read 15 lines ]
    ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify
    ^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell
     
  18. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    852
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    So wird das mit dir nichts.
    Ich gebs langsam auf. Bedienen musst du deinen Computer schon von alleine.
    Ich habe alle schritte selber durchgetestet. und es funktioniert alles.
     
  19. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    2.

    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Sat Nov 2 15:57:49 2019 from 192.168.2.30
    [email protected]:~$ sudo apt-get update
    Hit:1 http://security.debian.org stretch/updates InRelease
    Ign:2 http://ftp.debian.org/debian stretch InRelease
    Hit:3 http://ftp.debian.org/debian stretch-updates InRelease
    Hit:4 http://ftp.debian.org/debian stretch Release
    Hit:6 http://ftp.fau.de/osmc/osmc/apt stretch InRelease
    Reading package lists... Done
    [email protected]:~$ sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libavahi-core-dev is already the newest version (0.6.32-2).
    build-essential is already the newest version (12.3).
    cmake is already the newest version (3.7.2-1).
    git is already the newest version (1:2.11.0-3+deb9u4).
    libusb-1.0-0-dev is already the newest version (2:1.0.21-1).
    libxrender-dev is already the newest version (1:0.9.10-1).
    python3-dev is already the newest version (3.5.3-1).
    qtbase5-dev is already the newest version (5.7.1+dfsg-3+deb9u1).
    libqt5serialport5-dev is already the newest version (5.7.1~20161021-2).
    0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
    [email protected]:~$

    3.

    Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Sat Nov 2 15:57:49 2019 from 192.168.2.30
    [email protected]:~$ sudo apt-get update
    Hit:1 http://security.debian.org stretch/updates InRelease
    Ign:2 http://ftp.debian.org/debian stretch InRelease
    Hit:3 http://ftp.debian.org/debian stretch-updates InRelease
    Hit:4 http://ftp.debian.org/debian stretch Release
    Hit:6 http://ftp.fau.de/osmc/osmc/apt stretch InRelease
    Reading package lists... Done
    [email protected]:~$ sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libavahi-core-dev is already the newest version (0.6.32-2).
    build-essential is already the newest version (12.3).
    cmake is already the newest version (3.7.2-1).
    git is already the newest version (1:2.11.0-3+deb9u4).
    libusb-1.0-0-dev is already the newest version (2:1.0.21-1).
    libxrender-dev is already the newest version (1:0.9.10-1).
    python3-dev is already the newest version (3.5.3-1).
    qtbase5-dev is already the newest version (5.7.1+dfsg-3+deb9u1).
    libqt5serialport5-dev is already the newest version (5.7.1~20161021-2).
    0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
    [email protected]:~$ wget -qO- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/compile.sh | sh -s hyperion Release install
    Hit:1 http://security.debian.org stretch/updates InRelease
    Ign:2 http://ftp.debian.org/debian stretch InRelease
    Hit:3 http://ftp.debian.org/debian stretch-updates InRelease
    Hit:4 http://ftp.debian.org/debian stretch Release
    Hit:6 http://ftp.fau.de/osmc/osmc/apt stretch InRelease
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libavahi-compat-libdnssd-dev is already the newest version (0.6.32-2).
    libavahi-core-dev is already the newest version (0.6.32-2).
    build-essential is already the newest version (12.3).
    cmake is already the newest version (3.7.2-1).
    git is already the newest version (1:2.11.0-3+deb9u4).
    libusb-1.0-0-dev is already the newest version (2:1.0.21-1).
    libxrender-dev is already the newest version (1:0.9.10-1).
    python3-dev is already the newest version (3.5.3-1).
    qtbase5-dev is already the newest version (5.7.1+dfsg-3+deb9u1).
    libqt5serialport5-dev is already the newest version (5.7.1~20161021-2).
    0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
    fatal: destination path 'hyperion' already exists and is not an empty directory.
    [email protected]:~$
     
  20. Cosmicbase

    Cosmicbase Member

    Messages:
    315
    Hardware:
    RPi3, +Arduino
    Müssen Berechtigungen von hyperion.service geändert werden?