Audiophonics Power Management Add-on

Hi there,
i started today my test account in Roon.
I build a Raspberry Pi with Audiophonics DAC ES9038Q2M and the 7" Official Touch Display.
Ropieee works fine with it, great Software.

I have ordered an additional Power Management Board the Audiophonics PI-SPC V2.
https://www.audiophonics.fr/en/raspberry-pi-and-other-sbc-accessories/audiophonics-pi-spc-v2-power-management-module-for-raspberry-pi-p-10912.html

I can start Ropieee with the Push Button, this works.
After start the LED an the Button is only blinking.
Soft Shutdown is not possible.
Only Hard Shutdown is possible.

So now my question.
Is it possible to implement in Ropieee a Soft Shutdown?
If yes, how can i do it?
Is it possible to control the LED Light, so after Ropieee is startet to stop blinking?

Many thanks.
Barbaros

The functionality for the LED is already present, please have a look on the ‘advanced’ tab.

Right now there’s no support for the Audiophonics board, but I’ll have a look if this could be interesting to support.

Hi Harry ten Berge,

thank you very much for the reply.

My LED is on the Push Button.
On Advanced tab you can only configure the onboard LED, not the LED from the Power Module.

If you can implement this nice Add-on board, i will be happy.
I found some infos for PiCorePlayer on this URL:
https://forums.slimdevices.com/showthread.php?109270-PiCore-Player-and-gpio-poweroff-gpio-shutdown-overlays

Maybe we can implement it on Ropieee too?

Hi all,
after 2 days hard work, i bring the Audiophonics Power Management Module to work.
If i push the power button short, it will be shutdown and go off.
The power LED will go after success boot from blinking to constant light.

Here are the doings that i made via SSH:

pacman -S nano
pacman -S wiringpi
mkdir /home/root
cd /home/root

-----------------------------------------------------------------

nano /home/root/softshutdown.sh

#!/bin/bash
#Audiophonics
#Shutdown detection script
#Script to set GPIO 4 High for 1sec
PATH=/usr/bin
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”
shutdown -h -P now
exit 0

Test softshutdown:

bash /home/root/softshutdown.sh &

-----------------------------------------------------------------

nano /home/root/softreboot.sh

#!/bin/bash
#Audiophonics
#Shutdown detection script
#Script to set GPIO 4 High for 1sec
PATH=/usr/bin
#Script to set GPIO 4 High and Reboot
#Reboot blink will stop after Boot OK return
echo “setting pin GPIO 4 High”
gpio -g mode 4 out
gpio -g write 4 1
echo “Raspberry Pi Reboot”
reboot
exit 0

Test softreboot:

bash /home/root/softreboot.sh &

-----------------------------------------------------------------

nano /home/root/sds.sh

#!/bin/bash
#RoPieee version
PATH=/usr/bin
echo “Audiophonics Shutdown 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…”
shutdown -h -P now
break
fi
/bin/sleep 0.25
done
exit 0

Test sds

bash /home/root/sds.sh &

-----------------------------------------------------------------

nano /lib/systemd/system/pwrmgmt.service

[Unit]
Description=Power Management Module
[Service]
Type=oneshot
ExecStart=bash /home/root/sds.sh &
[Install]
WantedBy=multi-user.target

systemctl enable pwrmgmt.service

Test pwrmgmt.service:

systemctl start pwrmgmt.service

-----------------------------------------------------------------

Script will be autorun after next reboot

4 Likes

Hi @Barbaros_Arslan,
It’s exactly what I’ve been looking in in the past couple of weeks to implement, great job! Thanks for sharing, I will look at implementing it into my setups in the next couple of days.

@spockfish, will these modifications/files be overwritten after each upgrade of RoPieee? It would be great if these scripts could be natively implemented into RoPieee. Similar scripts for Audiophonics Power Management are available natively within the DietPi OS.

@Barbaros_Arslan It’s working like a charm! Thanks a lot!
@spockfish Would be real great to implement within RoPieee!

Hi @Guy_Maurier,
I am very happy that it worked for you as well.
I wish you much fun with the solution.

During this fix, one thing was great for me, I learned the great distribution Arch.
Yes, it will be nice if @spockfish can implement this solution in RoPieee.

Best regards
Barbaros

Thanks a lot perfectly working

Wow this is amazing! Thanks a lot, worked like a charm.

THAT’S FANTASTIC!
Could you please explain how newbies might integrate this?
For example: Where do you put all this? All in the same place?
I have this module and would like to add it to my RaspTouch.
Thanks in advance

Hi @richard_austin
all the infos i described in my Post on 4. September 2019 is enough to implement the Audiophonics Power Module.
Additional infos on how to access via SSH or using a editor, in this case nano you can find via a google search.
Nano works with key commands, this you will find on several pages on internet.
If you have trouble or problems on a specific step, you can ask me, i can help you there.

Best regards
Barbaros Arslan

Windows 10 64 Pro Hewlett Packard 8Gb SSD .
Diddling finally got it playing, but not sure if I could repeat settings if I needed to.

Have you tried to use dtoverlays directly, without any script ?
I have a similar OnOff shim from Pimoroni and is working this way.

dtoverlay=gpio-shutdown

works for me (shutdown and start after shutdown) with GPIO3 (default).

Pi 3 Model B

hey @Barbaros_Arslan,
thanks for sharing. works perfectly for me :slight_smile:
pj

Thank you, great job. It works perfect with rasberry pi 3 b+ and with iqaudio dac pro as ROON endpoint. Because a better PSU sounds specially classical and voices much better.
Thank you

It also works with this modul. I use it with 2 RoPieee endpoints.
This is the regulated version
AUDIOPHONICS PI-SPC II Power Management / Power supply for Raspberry Pi - Audiophonics

My modules have aditional pins to use with IR controll. It’s a version 2. I don’t know how it works with ropieee.