Hyperion loses connection without and warning

  • Following up from the discord.


    My instance of hyperion stops working after a period of time (nothing that follows a pattern).


    I have to manual run the command to kill and restart hyperion for the lights to start working again. However, after that it will repeat this behavior.



    WS2818 + Rpi4


    I use sudo /usr/bin/hyperiond -d to start and log via Raspcontroller.


    [MEDIA=pastebin]yxLHAYMC[/MEDIA]


    When the lights stay on it seems to happen at random. The picture is fine but the lights freeze. Turning off the led from the gui doesn't work nor does the instance. I have to sudo killall hyperiond (Raspicontroller apk) and then sudo /usr/bin/hyperiond -d


    I can't use the led on and off in the gui because it doesn't work. The led toggle doesn't do anything per my comment above.


    It looks like hyperion crashes and the gui shows a lost connection so I can't see the log before it crashes.


    [MEDIA=pastebin]Rbqar8C9[/MEDIA]

    • Offizieller Beitrag

    Could you do a


    sudo journalctl --since "2021-02-27" --until now


    and share the output via a fileshare?


    On the 2nd log, it seems that your grabber connects and disconnects.
    You see it as the LED switches off and on when the input sources goes away.


    2021-02-27T02:42:58.533 hyperiond HYPERION : <DEBUG> Hyperion.cpp:562:handlePriorityChangedLedDevice() | No source left -> switch LED-Device off
    ..
    2021-02-27T02:42:59.184 hyperiond HYPERION : <DEBUG> Hyperion.cpp:569:handlePriorityChangedLedDevice() | new source available -> switch LED-Device on
    ..
    2021-02-27T02:43:00.207 hyperiond HYPERION : <DEBUG> Hyperion.cpp:562:handlePriorityChangedLedDevice() | No source left -> switch LED-Device off
    ...
    2021-02-27T02:43:00.867 hyperiond HYPERION : <DEBUG> Hyperion.cpp:569:handlePriorityChangedLedDevice() | new source available -> switch LED-Device on


    That is why you might find that LEDs behave strangely....

    • Offizieller Beitrag

    Bboy486 I am sorry, I missed to add one option to the journalctrl command. You only share the first page of the output....

    Here is the command to have everything in one go...

    sudo journalctl --since "2021-02-27" --until now --no-pager

    Alternatively you can already pipe the output into a file for upload

    sudo journalctl --since "2021-02-27" --until now --no-pager > journal_20210227_now.txt

    In case you had the errors lately, it might be good, if you limit the date range to that period to reduce the size of teh output.

    • Offizieller Beitrag
    Zitat

    Bboy486 I use sudo /usr/bin/hyperiond -d to start and log via Raspcontroller.

    Looks like I missed that before. Are you saying that you start hyperiond via a session from Raspcontroller?
    In case yes, I would say it looks like that the raspcontroller session is closed which mean that hyperiond is stopped.
    Standard Unix behaviour.


    You need to start hyperiond with "&" to have it surviving, if the session closes, i.e. you start a process which is not linked to the terminal process.


    sudo /usr/bin/hyperiond -d &

    or you start it as a systemd process, which is teh standard when installing the package on raspian-OS.

  • I'll try that. A few things for clarification.


    1. I start via raspcontroller via tasker as it gives me control to start via home automation. But even if I start from a computer command line the leds freezes -- even leaving the computer running. On raspi I have it continue in background but they still freeze.


    2. I tried to have it start via systemd but it I get a failed to connect message.


    3. Since I have the raspcontroller running in background it should continue unless I interrupt or kill the process, either if which I have done. I'll try & and see if that helps. I also use flask so it starts (home automation without needing raspcontroller). Basically when the tv turns on flask runs hyperion.py file which runs the command in raspcontroller. (I just added the & per your instructions).


    • Offizieller Beitrag

    Bboy486 I would suggest you start exploring with a "standard" setup-up (e.g. systemd) and then increase the complexity.
    Let us check what was the systemd problem before...

    Given that your posts are distributed via Discord and here, it might be beneficial for everybody to outline your setup, configuration and problem (incl. log)s
    and we have a fresh start exploring the situation from there.

  • Bboy486 I would suggest you start exploring with a "standard" setup-up (e.g. systemd) and then increase the complexity.
    Let us check what was the systemd problem before...

    Given that your posts are distributed via Discord and here, it might be beneficial for everybody to outline your setup, configuration and problem (incl. log)s
    and we have a fresh start exploring the situation from there.

    The sudo /usr/bin/hyperiond -d & actually worked. Thank you. For the remaining issues I am happy to post if you tell me where to do and what specifically you need.



    MY SETUP

    Hyperion running on a P4



    sudo apt-get update

    sudo apt-get dist-upgrade

    sudo apt-get autoremove

    sudo rpi-update

    wget https://github.com/hyperion-pr…-alpha.9-Linux-armv7l.deb

    sudo dpkg -i Hyperion-2.0.0-alpha.9-Linux-armv7l.deb


    sudo apt-get install -f

    sudo reboot

    sudo apt install ./Hyperion-2.0.0-alpha.9-Linux-armv7l.deb


    chmod +x start_hyperion_as_service.sh


    ////

    [Unit] Description=Hyperion ambient light systemd service for user After=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/bin </search/%23WorkingDirectory%3D%2Fstorage%2Fdownloads%2FHyperion-2.0.0-alpha.4-Linux-armv7hf%2Fshare%2Fhyperion%2Fbin%0D%0A> TimeoutStopSec=5 KillMode=mixed Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target


    ////


    sudo systemctl daemon-reload

    sudo systemctl start hyperion-ng.service


    sudo systemctl status hyperion-ng.service

    systemctl enable hyperion-ng.service


    sudo killall hyperiond /usr/bin/hyperiond /etc/hyperion.config.json &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp; hyperion-remote --effect "Rainbow swirl fast" --duration 3000


    sudo reboot


    journalctl -u hyperion.service


    systemctl status hyperiond@pi.service





    sudo /usr/bin/hyperiond

    /etc/hyperion.config.json &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;

    sudo hyperion-remote --effect "Rainbow swirl fast" --duration 3000



    I then setup flask with a .sh file running in /home/pi called hyperion.sh to run hyperion with Hubitat to automate it turning on when a virtual device turns on.


    curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -

    sudo apt install nodejs


    node --version

    npm install pm2@latest -g


    sudo touch hyperion.sh

    sudo nano hyperion.sh

    ///////


    export FLASK_APP=~webcore/hyperionstart.py

    export FLASK_ENV=development

    flask run --host=IP of RPi


    //////


    sudo chmod 755 hyperion.sh

    pm2 start hyperion.sh


    pm2 start bashscript.sh

    pm2 start python-app.py --watch

    pm2 start binary-file -- --port 1520


    sudo apt-get update

    sudo apt-get install python-pip


    sudo pip install python-dotenv


    sudo pip install flask


    mkdir webcore

    cd webcore


    touch hyperionstart.py

    sudo nano hyperionstart.py

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!