ianhaynes wroteThe IQAudio site has a code example for adding a switch to turn the Pi off. You'll also find details of how to install and run scripts here on the forum.
I'm building my Pi + IQAudio Dac+ into a box with a linear PSU and wanted to switch the whole thing off properly. I've ended up switching an LED on from the GPIO pins when the Pi boots up, and when it shuts down, am safe to switch mains power off when this LED goes out. Not quite as good as a full automatic switch-off but an adequate solution for other members of the family.
Ian
I was thinking something much simpler : just installing in serie on the power cable a nc (normally closed ) button switch. Since you can power off rune in the mpd, you just have to press the button to re-open the PI. It acts exactly lile unpluging and repluging!
Sent from my Armor using Tapatalk