Maybe I did not get your message correctly, but if you just need to connect an external power LED (e.g. to GPIO 26) to indicate the running state of Zynthian, the easiest solution is probably to add the following configuration to /boot/config.txt (or just into “Display” > “Config” in the webconf):
Thanks for this…, that’s pretty much what I implemented, except I wanted the led to stay on as long as the Zynthian is running (and it works even when the screen is off) and the led to blink during the shutdown phase (I didn’t want to add a NE555 or something to blink the led). So, I created a service with a personal script that makes me blink the LED. Then, the LED turns off as soon as the RPI has exited all these processes. For information and for those who may not know, with systemd, it is possible to define the order of launching the scripts at startup as well as at shutdown of the machines.
For us battery types, this is a useful functionality…
I’ve implemented a hardware battery protect based on a hardware potentiometer but a software signal that could also shut down the supply would be useful and rather more elegant…
Also for the nice handy single shut down the studio button.
I just want to mention that enabling rc.local is the only solution that worked for me to run a script in the background on startup. In my case it is a standalone Python program that interfaces a Stream Deck to a DIY Zynthian running Oram on a Pi5. I developed the program using a SSH login and since python in that situation runs in a virtual environment you have to use /zynthian/venv/bin/python to run the script from rc.local if you had to install anything with pip.