Alpha 10 question - Hyperion doesn't seem to start automatically after a reboot

  • Sorry if this is an obvious question, but I upgraded a hyperbian install (alpha9) to alpha10 last week, and after some fiddling (uninstalling and reinstalling hyperion via apt install), I got it working and set up fully.


    However, I rebooted the Pi that it is running on today because things weren't working correctly (I think I had inadvertently changed the IP of the WLED instance that it is driving), and when it rebooted, the UI never came back up. I eventually tried running the following through an SSH connection:


    Code
    sudo systemctl enable --now hyperion


    and this got it running again.


    So my question: is there a toggle somewhere in the UI that determines if the service starts at boot, or does this need to be manually set up by editing some files?

  • going by your command you may be facing this problem



    :thumbup:

  • oops my bad, yeah im with your thoughts. ignore my last post


    Ideally you want to login to your router/modem and reserve an ip for your most used network devices - thats good practise to do so that if it did ever reboot it always gets assigned the same ip and your stuff just works. Nowadays most routers will do this at the click of a button rather than going down the static ip route and assigning it all manually


    try and find a login and password and login to your router though and see if you can see what IP WLED is using and go from there


    typing this command should show you what hyperion is currently running as

    Code
    ps aux | grep hyperion


    im on LE so you can see mine is running as root - look after the 1st number


    403 root 5h16 /storage/hyperion/bin/hyperiond --userdata /storage/hyperion/


    but as you mentioned it shouldn't affect you as you are not driving the leds directly, but at least you will know what user its currently running under and going by recent posts is should not be root and instead be pi user, then you can just re-enable auto startup of hyperion

  • So I am poking around online to look at the process for starting services at boot. I see TWO .service files in my /etc/systemd/system directory. The contents are as follows:


    hyperion.service

    and


    hyperiond@.service


    When I run the following command immediately after boot (and before attempting to manually start a hyperion service, I get the following two entries for hyperion (sorry for the ugly formatting):

    systemctl --all

    Code
      hyperion.service                                                           loaded    inactive dead      Hyperion ambient light sy
      hyperiond@pi.service                                                       loaded    inactive dead      Hyperion ambient light sy

    I am not sure if there are supposed to be two of them. When I have been starting it manually, I just use the hyperion verbiage (without d), and that gets that one running successfully. The fact that both of the services after boot are "inactive dead" is odd.


    My rough understanding of linux leads me to think that the hyperiond@.service can accept an argument of a user and run it as that user. However when I attempted to run:

    sudo systemctl enable --now hyperiond@root

    I am pretty sure I got an error about the file not existing.


    I guess I might try just disabling the hyperiond@ service and editing the hyperion.service file to include a line for user=root and see if that works.

  • UPDATE: The above worked!


    I did the following:

    • Edit the hyperion.service file in /etc/systemd/system to add a line to the [Service] section:

    User=root


    • Run: sudo systemctl disable --now hyperiond@pi
    • Run: sudo systemctl daemon-reload (not sure if this was necessary)
    • Run: sudo reboot

    After rebooting, the service hyperion was showing up under systemctl --all, and the hyperiond@pi is gone.


    The web ui loads as expected, but my configuration was gone (as others have mentioned when switching to running it as root). I assume this is happening because running it as root is like starting from scratch, and the configuration files have to be recreated in the root users folder structure. My setup is simple to configure, so that was easy. Unfortunately I lost the configuration I did to the colors, so I have to figure out how to redo that. Maybe I can find the config file for the pi user and grab the values from there...


    Back in business!

  • The config for pi should be in the pi user‘s home Directory. Just look for the .hyperion/db directory. You can copy the db file to the root users director, same place.

    Suggest you backup the current dB file for root before…

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!