custom-effects - where?

  • This is driving me nuts but I'm out of ideas.

    I compiled hyperion myself from latest main/HEAD - and now want to write/add/test a custom plugin.

    From how I understand the docs custom effects are imported from $USERDIR/custom-effects - whereas $USERDIR is ~/.hyperion/ by default, but can be changed via the -u arg to hyperiond.

    Checking the config - weird part here: everywhere they refer to a JSON config file, while I seem to have an sqlite config file(?) - a variable named effects refers to {"disable":[""],"paths":["$ROOT/custom-effects"]}, whereas according to the code - at least how I understand it - string $ROOT is substituted at runtime, again with $USERDIR.

    Anyway, I don't get my custom effect(s) loaded / listed, no what I do / where I place them.

    Log set to DEBUG does not reveal anything - grepping debug output for "effect" prints:

    Code
    2024-12-10T22:02:07.746 |__| EFFECTFILES       : <INFO> 41 effects loaded from directory :/effects/
    2024-12-10T22:02:07.752 |__| EFFECTFILES       : <INFO> 23 effect schemas loaded from directory :/effects/schema/

    Any idea / hint?

    PS: Potentially interesting bit: I can't change the password via webinterface. Webinterface says "Failed to update user password" - nothing in the logs.

    Edited once, last by mirko (December 10, 2024 at 11:09 PM).

  • In About Hyperion you can see the Config path.

    Quote from Log output

    2024-12-11T19:19:32.204Z [EFFECTFILES] (INFO) 41 effects loaded from directory :/effects/

    2024-12-11T19:19:32.216Z [EFFECTFILES] (INFO) 23 effect schemas loaded from directory :/effects/schema/

    2024-12-11T19:19:32.218Z [EFFECTFILES] (INFO) 1 effects loaded from directory /home/root/.hyperion/custom-effects/

    2024-12-11T19:19:32.220Z [EFFECTFILES] (INFO) 2 effect schemas loaded from directory /home/root/.hyperion/custom-effects/schema/

    Command Line Interface

    regards pclin

    Dreambox ONE / TWO

    dreamOS OE2.6

    Amlogic S922X - 53.000 DMIPS - 2 GB RAM - 16 GB Flash - Twin-DVB-S2X Tuner - HDR10 - HLG
    -
    AudioDSP: miniDSP 2x4HD - Amp: Pentagon - Lautsprecher ELAC / ARENDAL
    LG OLED65BX9LB (PicCap, hyperion.NG webOS)

    FireTV 4K max

    -
    hyperion (classic) & Plugin HyperionControl | hyperion-ng 2.0.16-beta.1 (dreamOS)
    Hyperion-ng (Debian bullseye)
    -
    6 x ESP32/Wemos D1 mini - WLED - SK6812 RGBW-NW 60 LEDs/m
    FeinTech VSP01201 - Grabber Macrosilicon

    LG TV Hyperion webOS & PicCap

    Ambilight for ever

    Edited 3 times, last by pclin (December 11, 2024 at 9:08 PM).

  • Anyway, I don't get my custom effect(s) loaded / listed, no what I do / where I place them.

    You to get you an idea how your directory should look like.

    Note: MyModdedEffect.json will only be there when you saved an instance of your defined custom effect.

  • PS: Potentially interesting bit: I can't change the password via webinterface. Webinterface says "Failed to update user password" - nothing in the logs.

    Thank you for reporting! I will have a look.

    Edit: Could you share your configuration and how you try to change the password?

  • Having the same problem loading custom effects...


    using the same version, my config path is

    Code
    - Config path:       /root/.hyperion

    I intend to create a custom effect to turn off extra leds because sometimes they are off, sometimes not. Most of the time I can turn off the extra leds by clicking like crazy on the instance on/off button and after a (shorter or longer) while it happens that all leds are turned off and only the relevant leds (124, led stripe has about 150 leds...) are active.

    But since a few days I have no luck using this method ^^ so my idea was to create a custom effect that turns off all leds

    These are briefly my steps:

    cd /usr/share/hyperion/effects

    sudo nano TurnOffExtraLeds.py

    import hyperion

    import time

    # led area

    total_leds = 150

    leds = [(0, 0, 0)] * total_leds

    hyperion.setColor(leds)


    sudo chmod 755 TurnOffExtraLeds.py

    sudo nano TurnOffExtraLeds.json

    {

    "name": "TurnOffExtraLeds",

    "script": "TurnOffExtraLeds.py",

    "args": {}

    }



    after doing so, I rebooted the pi but the effect was not listed up.

    within the logs I saw a folder and tried:

    sudo mv /usr/share/hyperion/effects/TurnOffExtraLeds.* /root/.hyperion/custom-effects/

    after rebooting the pi, the effect was listed up under..#remote and #effects_configurator

    but selecting the scrpit under #remote produces this log:

    2024-12-19T14:17:16.871Z [EFFECTENGINE] (ERROR) ###### PYTHON EXCEPTION ######
    2024-12-19T14:17:16.871Z [EFFECTENGINE] (ERROR) ## In effect 'TurnOffExtraLeds'
    2024-12-19T14:17:16.872Z [EFFECTENGINE] (ERROR) ## RuntimeError: Argument is not a bytearray
    2024-12-19T14:17:16.922Z [MUXER|First LED Hardware instance] (DEBUG) (PriorityMuxer.cpp:359:updatePriorities()) Removed source priority 1
    2024-12-19T14:17:17.564Z [EFFECTENGINE] (ERROR) ## Traceback (most recent call last):
    2024-12-19T14:17:17.565Z [EFFECTENGINE] (ERROR) ## File "<string>", line 8, in <module>
    2024-12-19T14:17:17.565Z [EFFECTENGINE] (ERROR) ## RuntimeError: Argument is not a bytearray
    2024-12-19T14:17:17.565Z [EFFECTENGINE] (ERROR) ###### EXCEPTION END ######

    and under #effects_configurator the effect can be loaded but is not editable/testable.

    I'll continue try and error... x)


    I fixed the python script as follows:

    import hyperion

    import time

    hyperion.setColor(0,0,0)

    while not hyperion.abort():

    time.sleep(1)


    and it worked, the script is being executed.

    but I solved my problem regarding the additional leds on another way....
    just needed to change controller led count from 124 to 159 xD

    seems that I misunderstood something regarding total count, layount count, blacklist led etc .... ^^

    Edited once, last by freiherrvw: Ein Beitrag von freiherrvw mit diesem Beitrag zusammengefügt. (December 19, 2024 at 4:37 PM).

Participate now!

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