I figured it’d be nice to have a guide to get the non latching power button for the Audiophonics I-Sabre V3 working with a DietPi image! Feel free to suggest additions/changes. These are a laymans work and probably can be bettered!
The source code have been put together from various pages and repositories, mostly from Audiophonics french forums…
Download the latest DietPi image for Raspberry Pi (http://dietpi.com/)
Install the image onto your MicroSD using Apple Pi Baker or Win32 Disk Imager or whatever you like.
Insert the MicroSD into your Audiophonics RaspDAC (or similar with a non latching button)
Apply power and push the button to initiate bootup
Give the Pi a couple of minutes to resize storage and perform necessary duties.
Login using SSH:
ssh root@<Raspberry IP Adress>(Password: dietpi)
Upon first login there will be some updating, be patient, grab a beer or other beverage of choice.
When it’s ready it will reboot. Give it another minute, then login once more
General configuration & software packages
The Diet-Pi Software meny will be shown.
Select Diet-Pi Config - Audio Options
Chose Soundcard and then select ”hifiberry-dac” from the list of options
When the necessary config is complete you will be returned to the meny.
I like to do the PSU Noise reduction choice also, your mileage may vary.
When done, go back to the DietPi-Software menu and chose Software Optimized
Scroll down to option 121 - Roon Bridge and select it. Exit and then use the Install option
This will take a few minutes, refill your drinks ladies and gents…
After reboot, login once more
Let get started with the Audiophonics requisites
Okay, lets get the necessary software aboard:
apt-get install rpi.gpio
apt-get install wiringpi
After the install, check to see that the GPIO API is available:
You should see a table showing the different GPIO connectors status.
Now, lets create the monitoring script that will kill the blink and allow you to press the button to shutdown:
echo "Audiophonics Power Management script starting..."
echo "Asserting pins : "
echo "ShutDown : GPIO17=in, Low"
echo "BootOK : GPIO22=out, High"
echo "SoftSD : GPIO04=out, Low"
gpio -g mode 04 out
gpio -g write 04 0
gpio -g mode 17 in
gpio -g write 17 0
gpio -g mode 22 out
gpio -g write 22 1
while [ 1 ]; do
if [ "$(gpio -g read 17)" = "1" ]; then
echo "ShutDown order received, RaspBerry pi will now enter in standby mode..."
Save the script and make it executable:
chmod +x pwrmgmt.sh
Move the executable script to a known location:
mv pwrmgmt.sh /home/dietpi/pwrmgmt.sh
Now we need to create another script, called softstop.sh:
Add this code:
#!/bin/bash # Audiophonics # Shutdown detection script # Script to set GPIO 4 High for 1sec
echo "Setting pin GPIO4 High" gpio mode 7 out gpio write 7 1 /bin/sleep 1 echo "Setting pin GPIO4 Low" gpio write 7 0
echo "RaspberryPi shutdown" sudo shutdown -h -P now exit 0
Save and exit
Make the script executable and move it to the same location as the other script:
chmod +x softstop.sh
mv softstop.sh /home/dietpi/softstop.sh
Now we will add the main script to the startup sequence:
Add this line before the line that reads
Save and exit.
Reboot the RaspDAC by issuing a normal
In a few moments the RaspDAC will reboot and the blinkin’ LED will come to a stable state! Your RaspDAC will be available in Roon at this time if everything has gone OK.
Now push the power button briefly. The LED should start blinking and an in few seconds the RaspDAC will shutdown and the LED should go out.