Having the same problem loading custom effects...
using the same version, my config path is
- 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 .... 