[Blinkt LED strip] LEDs don't clear when the script is finished

As the title implies this post is concerning the Blinkt LED strip and the LEDs remaining active when the script is complete.

I have imported RPi.GPIO into my python script and called GPIO.cleanup() at the end of my script. I am essentially trying to trigger a light pattern when shutdown has been executed, made my script executable and copied it to the /etc/rc0.d/ with a “K01” prefix of the script.

Tl;dr - The LEDs remain active when the Pi has turned off and i wan’t them to not be active

Thanks for any help

The LEDs recieve data from the GPIO pins but after that they can keep themselves running as long as they’re still connected to the power pins. Unfortunately you can’t toggle the power pins so you’re going to have to run python code to set the LEDs off I think.

The controller is likely retaining the last state you set them too. That state stays until you change it or remove the power. My sense does something similar and I have to use the clear command to turn all the LEDs off.
One way around it is to do your pattern for X seconds, clear it, then do your shutdown. Put one or two time.sleeps in there between them. pattern > time.sleep > clear leds > timesleep > shutdown.

They stay on, you need to set them to clear() and the show() to make that happen.

There is a clear on exit command/setting in the API (of the python program) that is suppose to clear on exit by default, but it never seems to work. That or it doesn’t actually do what I think it should.